Skip to content

Commit

Permalink
pcli: skip creating zero-bid transactions
Browse files Browse the repository at this point in the history
  • Loading branch information
hdevalence authored and cronokirby committed Oct 30, 2023
1 parent add7ce9 commit c56fa18
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions crates/bin/pcli/src/command/ceremony.rs
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,12 @@ async fn handle_bid(app: &mut App, to: Address, from: AddressIndex, bid: &str) -

let value = bid.parse::<Value>()?;

// If the bid is 0, skip creating a transaction. For instance, this allows reconnecting
// without paying extra.
if value.amount == 0u64.into() {
return Ok(());
}

let memo_plaintext = MemoPlaintext {
sender: app.config.full_viewing_key.payment_address(from).0,
text: "E PLURIBUS UNUM".to_owned(),
Expand Down

0 comments on commit c56fa18

Please sign in to comment.