Skip to content

Commit

Permalink
fix: cli wallet reason option
Browse files Browse the repository at this point in the history
  • Loading branch information
grumbach committed Mar 8, 2023
1 parent 642920f commit 6db3103
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions sn_cli/src/subcommands/wallet.rs
Original file line number Diff line number Diff line change
Expand Up @@ -77,7 +77,7 @@ pub enum WalletSubCommands {
/// The reason why this DBC is spent
/// (Used for data payments: currently not yet implemented)
#[clap(long = "reason")]
reason: DbcReason,
reason: Option<DbcReason>,
},
}

Expand Down Expand Up @@ -232,7 +232,9 @@ pub async fn wallet_commander(
} else {
None
};
let dbc = safe.wallet_reissue(&from, &amount, pk, reason).await?;
let dbc = safe
.wallet_reissue(&from, &amount, pk, reason.unwrap_or_default())
.await?;
let dbc_hex = dbc.to_hex()?;

// Write the DBC to a file if the user requested it, but fall
Expand Down

0 comments on commit 6db3103

Please sign in to comment.