Try to open wallet in case generate_from_keys fails

This commit is contained in:
Daniel Karzel 2021-04-08 15:27:00 +10:00
parent bad6ca95e0
commit 548f057726
No known key found for this signature in database
GPG key ID: 30C3FC2E438ADB6E
2 changed files with 16 additions and 4 deletions

View file

@ -64,6 +64,11 @@ impl Wallet {
Ok(())
}
pub async fn open(&self, filename: &str) -> Result<()> {
self.inner.lock().await.open_wallet(filename).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(