Skip to content

Commit

Permalink
Merge pull request #394 from TheCharlatan/displayExchangeRate
Browse files Browse the repository at this point in the history
Taker Command: Display exchange rate when reviewing offer
zkao authored Dec 20, 2021

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
2 parents ae1a682 + 802c7ea commit 60cc2d1
Showing 1 changed file with 12 additions and 3 deletions.
15 changes: 12 additions & 3 deletions src/cli/command.rs
Original file line number Diff line number Diff line change
@@ -182,7 +182,6 @@ impl Exec for Command {
);
return Ok(());
}
// println!("{:#?}", &public_offer);
let PublicOffer {
version: _,
offer,
@@ -196,8 +195,18 @@ impl Exec for Command {
println!(
"\nWant to buy {}?\n\nCarefully validate offer!\n",
match taker_role {
SwapRole::Alice => format!("{} for {}", arb_amount, acc_amount),
SwapRole::Bob => format!("{} for {}", acc_amount, arb_amount),
SwapRole::Alice => format!(
"{} for {} at {} BTC/XMR",
arb_amount,
acc_amount,
arb_amount.as_btc() / acc_amount.as_xmr()
),
SwapRole::Bob => format!(
"{} for {} at {} XMR/BTC",
acc_amount,
arb_amount,
acc_amount.as_xmr() / arb_amount.as_btc()
),
}
);
println!("Trade counterparty: {}@{}\n", &node_id, peer_address);

0 comments on commit 60cc2d1

Please sign in to comment.