Skip to content

Commit

Permalink
fix: dont lock files with wasm
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuef committed Jan 24, 2024
1 parent 3697080 commit 6e96353
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sn_transfers/src/wallet/watch_only.rs
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ use crate::{
transfers::create_unsigned_transfer, wallet::data_payments::PaymentDetails, CashNote,
DerivationIndex, Hash, MainPubkey, NanoTokens, UniquePubkey, UnsignedTransfer,
};
#[cfg(not(target_arch = "wasm32"))]
use fs2::FileExt;
use serde::Serialize;
use std::{
Expand Down Expand Up @@ -296,6 +297,8 @@ impl WatchOnlyWallet {
.write(true)
.truncate(true)
.open(lock)?;

#[cfg(not(target_arch = "wasm32"))]
file.lock_exclusive()?;
Ok(file)
}
Expand Down

0 comments on commit 6e96353

Please sign in to comment.