mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2024-09-29 21:06:21 +00:00
Open means opening the current wallet
This commit is contained in:
parent
ab4c98678c
commit
5b798217bc
@ -165,7 +165,7 @@ async fn init_wallets(
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Setup the Monero wallet
|
// Setup the Monero wallet
|
||||||
let open_wallet_response = monero_wallet.open_wallet(DEFAULT_WALLET_NAME).await;
|
let open_wallet_response = monero_wallet.open().await;
|
||||||
if open_wallet_response.is_err() {
|
if open_wallet_response.is_err() {
|
||||||
monero_wallet
|
monero_wallet
|
||||||
.create_wallet(DEFAULT_WALLET_NAME)
|
.create_wallet(DEFAULT_WALLET_NAME)
|
||||||
|
@ -293,9 +293,7 @@ async fn init_monero_wallet(
|
|||||||
);
|
);
|
||||||
|
|
||||||
// Setup the temporary Monero wallet necessary for monitoring the blockchain
|
// Setup the temporary Monero wallet necessary for monitoring the blockchain
|
||||||
let open_monitoring_wallet_response = monero_wallet
|
let open_monitoring_wallet_response = monero_wallet.open().await;
|
||||||
.open_wallet(MONERO_BLOCKCHAIN_MONITORING_WALLET_NAME)
|
|
||||||
.await;
|
|
||||||
if open_monitoring_wallet_response.is_err() {
|
if open_monitoring_wallet_response.is_err() {
|
||||||
monero_wallet
|
monero_wallet
|
||||||
.create_wallet(MONERO_BLOCKCHAIN_MONITORING_WALLET_NAME)
|
.create_wallet(MONERO_BLOCKCHAIN_MONITORING_WALLET_NAME)
|
||||||
|
@ -240,7 +240,7 @@ pub trait CreateWalletForOutputThenLoadDefaultWallet {
|
|||||||
|
|
||||||
#[async_trait]
|
#[async_trait]
|
||||||
pub trait OpenWallet {
|
pub trait OpenWallet {
|
||||||
async fn open_wallet(&self, file_name: &str) -> Result<()>;
|
async fn open(&self) -> Result<()>;
|
||||||
}
|
}
|
||||||
|
|
||||||
#[async_trait]
|
#[async_trait]
|
||||||
|
@ -166,8 +166,12 @@ impl CreateWalletForOutputThenLoadDefaultWallet for Wallet {
|
|||||||
|
|
||||||
#[async_trait]
|
#[async_trait]
|
||||||
impl OpenWallet for Wallet {
|
impl OpenWallet for Wallet {
|
||||||
async fn open_wallet(&self, file_name: &str) -> Result<()> {
|
async fn open(&self) -> Result<()> {
|
||||||
self.inner.lock().await.open_wallet(file_name).await?;
|
self.inner
|
||||||
|
.lock()
|
||||||
|
.await
|
||||||
|
.open_wallet(self.default_wallet_name.as_str())
|
||||||
|
.await?;
|
||||||
Ok(())
|
Ok(())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user