pokkst 3 weeks ago committed by GitHub
commit a34174a8dd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -36,6 +36,7 @@ pub trait MoneroWalletRpc {
async fn refresh(&self) -> Refreshed;
async fn sweep_all(&self, address: String) -> SweepAll;
async fn get_version(&self) -> Version;
async fn store(&self);
}
#[jsonrpc_client::implement(MoneroWalletRpc)]

@ -361,7 +361,8 @@ async fn init_monero_wallet(
env_config,
)
.await?;
let _ = wallet.refresh().await?;
wallet.store().await?;
Ok(wallet)
}

@ -69,6 +69,11 @@ impl Wallet {
Ok(())
}
pub async fn store(&self) -> Result<()> {
self.inner.lock().await.store().await?;
Ok(())
}
/// Close the wallet and open (load) another wallet by generating it from
/// keys. The generated wallet will remain loaded.
pub async fn create_from_and_load(

@ -146,6 +146,8 @@ where
)
})?;
monero_wallet.store().await?;
AliceState::XmrLocked {
monero_wallet_restore_blockheight,
transfer_proof,
@ -352,6 +354,8 @@ where
)
.await?;
monero_wallet.store().await?;
AliceState::XmrRefunded
}
AliceState::BtcPunishable {

Loading…
Cancel
Save