fix: a silly mistake on the keybase recipients count (#2226)

This commit is contained in:
Gary Yu 2018-12-25 12:09:43 +08:00 committed by GitHub
parent 0364168572
commit 602bb25ec9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 4 additions and 4 deletions

View file

@ -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(),
);

View file

@ -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<bool>,
// The exploding lifetime (minutes) for keybase notification on coins received
pub keybase_notify_ttl: u16,
pub keybase_notify_ttl: Option<u16>,
}
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),
}
}
}