Skip to content

Commit

Permalink
skipping load from db if already active account (#137)
Browse files Browse the repository at this point in the history
  • Loading branch information
surinder83singh authored Jan 9, 2025
1 parent b8d09db commit 1b1a3e6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions wallet/core/src/wallet/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,9 @@ impl Wallet {
.as_legacy_account()?;
legacy_account.clone().start().await?;
legacy_account.clear_private_context().await?;
} else if let Some(account) = self.active_accounts().get(account_storage.id()) {
//lets start the account again
account.clone().start().await?;
} else {
let account = try_load_account(self, account_storage, meta).await?;
account.clone().start().await?;
Expand Down

0 comments on commit 1b1a3e6

Please sign in to comment.