Skip to content

Commit

Permalink
Start wallet CLI updater very soon after the open. Then wallet will b…
Browse files Browse the repository at this point in the history
…e blocked until scan is finished.
  • Loading branch information
bayk committed Sep 3, 2024
1 parent 3f3843a commit 4368783
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions libwallet/src/api_impl/owner_updater.rs
Original file line number Diff line number Diff line change
Expand Up @@ -190,16 +190,18 @@ where
let w_provider = w_lock.lc_provider()?;
w_provider.wallet_inst().is_ok()
};
if wallet_opened {

let sec = if wallet_opened {
// Business goes here
owner::update_wallet_state(
self.wallet_inst.clone(),
(&keychain_mask).as_ref(),
status_send_channel,
)?;
}

let sec = frequency.as_secs();
frequency.as_secs()
} else {
1
};

for _ in 0..sec {
if !self.is_running.load(Ordering::Relaxed) {
Expand Down

0 comments on commit 4368783

Please sign in to comment.