From 602bb25ec9a6da5857781d27e0e9af2eb6d97506 Mon Sep 17 00:00:00 2001 From: Gary Yu Date: Tue, 25 Dec 2018 12:09:43 +0800 Subject: [PATCH] fix: a silly mistake on the keybase recipients count (#2226) --- wallet/src/adapters/keybase.rs | 4 ++-- wallet/src/types.rs | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/wallet/src/adapters/keybase.rs b/wallet/src/adapters/keybase.rs index 6282635ad..75565af95 100644 --- a/wallet/src/adapters/keybase.rs +++ b/wallet/src/adapters/keybase.rs @@ -344,7 +344,7 @@ impl WalletCommAdapter for KeybaseWalletCommAdapter { // Reject multiple recipients channel for safety { - if channel.matches(",").count() > 0 { + if channel.matches(",").count() > 1 { error!( "Incoming tx initiated on channel \"{}\" is rejected, multiple recipients channel! amount: {}(g), tx uuid: {}", channel, @@ -373,7 +373,7 @@ impl WalletCommAdapter for KeybaseWalletCommAdapter { Ok(_) => match send(slate, channel, SLATE_SIGNED, TTL) { true => { notify_on_receive( - config.keybase_notify_ttl, + config.keybase_notify_ttl.unwrap_or(1440), channel.to_string(), tx_uuid.to_string(), ); diff --git a/wallet/src/types.rs b/wallet/src/types.rs index f05b606e1..7a58f7fa3 100644 --- a/wallet/src/types.rs +++ b/wallet/src/types.rs @@ -58,7 +58,7 @@ pub struct WalletConfig { /// if enabled, wallet command output color will be suitable for black background terminal pub dark_background_color_scheme: Option, // The exploding lifetime (minutes) for keybase notification on coins received - pub keybase_notify_ttl: u16, + pub keybase_notify_ttl: Option, } impl Default for WalletConfig { @@ -74,7 +74,7 @@ impl Default for WalletConfig { tls_certificate_file: None, tls_certificate_key: None, dark_background_color_scheme: Some(true), - keybase_notify_ttl: 1440, + keybase_notify_ttl: Some(1440), } } }