The non-persistent wallet path (when sqlite/redb features are
disabled) was creating the wallet twice: first as immutable to
create the blockchain_client, then again as mutable. This caused
the blockchain_client to be initialized with the first wallet
instance, but then used with the second wallet instance, creating
a mismatch.
};
#[cfg(not(any(feature = "sqlite", feature = "redb")))]
let result = {
- let wallet = new_wallet(network, wallet_opts)?;
+ let mut wallet = new_wallet(network, wallet_opts)?;
let blockchain_client =
crate::utils::new_blockchain_client(wallet_opts, &wallet, database_path)?;
- let mut wallet = new_wallet(network, wallet_opts)?;
handle_online_wallet_subcommand(&mut wallet, blockchain_client, online_subcommand)
.await?
};