Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(autonomi): resolve wasm build error due to merge #2303

Merged
merged 1 commit into from
Oct 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading