Skip to content

Commit

Permalink
Merge pull request #2303 from maqi/address_wasm_build_error
Browse files Browse the repository at this point in the history
chore(autonomi): resolve wasm build error due to merge
  • Loading branch information
jacderida authored Oct 23, 2024
2 parents e1ffa01 + 8c8b7da commit d2d3749
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
5 changes: 2 additions & 3 deletions autonomi/src/client/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -136,7 +136,6 @@ mod archive {
#[cfg(feature = "vault")]
mod vault {
use super::*;
use bls::SecretKey;

#[wasm_bindgen(js_name = UserData)]
pub struct JsUserData(UserData);
Expand Down Expand Up @@ -306,7 +305,7 @@ pub struct JsWallet(evmlib::wallet::Wallet);
/// Get a funded wallet for testing. This either uses a default private key or the `EVM_PRIVATE_KEY`
/// environment variable that was used during the build process of this library.
#[wasm_bindgen(js_name = getFundedWallet)]
pub fn funded_wallet() -> Wallet {
pub fn funded_wallet() -> JsWallet {
let network = evmlib::utils::get_evm_network_from_env()
.expect("Failed to get EVM network from environment variables");
if matches!(network, evmlib::Network::ArbitrumOne) {
Expand All @@ -321,7 +320,7 @@ pub fn funded_wallet() -> Wallet {
let wallet = evmlib::wallet::Wallet::new_from_private_key(network, &private_key)
.expect("Invalid private key");

Wallet(wallet)
JsWallet(wallet)
}

/// Enable tracing logging in the console.
Expand Down
1 change: 1 addition & 0 deletions sn_networking/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -761,6 +761,7 @@ impl Network {
/// Handle the split record error.
/// Spend: Accumulate spends and return error if more than one.
/// Register: Merge registers and return the merged record.
#[cfg(not(target_arch = "wasm32"))]
fn handle_split_record_error(
result_map: &HashMap<XorName, (Record, HashSet<PeerId>)>,
key: &RecordKey,
Expand Down

0 comments on commit d2d3749

Please sign in to comment.