diff --git a/wallet/src/libwallet/error.rs b/wallet/src/libwallet/error.rs index be108cddb..867e7b63e 100644 --- a/wallet/src/libwallet/error.rs +++ b/wallet/src/libwallet/error.rs @@ -104,7 +104,7 @@ pub enum ErrorKind { CallbackImpl(&'static str), /// Wallet backend error - #[fail(display = "Wallet store error")] + #[fail(display = "Wallet store error: {}", _0)] Backend(String), /// Callback implementation error conversion diff --git a/wallet/src/libwallet/internal/updater.rs b/wallet/src/libwallet/internal/updater.rs index 678fa9632..b878b7344 100644 --- a/wallet/src/libwallet/internal/updater.rs +++ b/wallet/src/libwallet/internal/updater.rs @@ -473,7 +473,10 @@ where let parent_key_id = wallet.parent_key_id(); let key_id = match key_id { - Some(key_id) => keys::retrieve_existing_key(wallet, key_id, None)?.0, + Some(key_id) => match keys::retrieve_existing_key(wallet, key_id, None) { + Ok(k) => k.0, + Err(_) => keys::next_available_key(wallet)?, + }, None => keys::next_available_key(wallet)?, };