Improve error messages when determining BTC amount to be swapped

This commit is contained in:
Thomas Eizinger 2021-03-04 17:39:17 +11:00
parent 4138039ea0
commit 1aa6d177bf
No known key found for this signature in database
GPG key ID: 651AC83A6C6C8B96
2 changed files with 7 additions and 3 deletions

View file

@ -155,7 +155,7 @@ impl Wallet {
tx_builder.set_single_recipient(dummy_script);
tx_builder.drain_wallet();
tx_builder.fee_rate(self.select_feerate());
let (_, details) = tx_builder.finish()?;
let (_, details) = tx_builder.finish().context("Failed to build transaction")?;
let max_giveable = details.sent - details.fees;