Add relative and absolute max transaction fee.

This commit is contained in:
Philipp Hoenisch 2021-05-04 11:34:00 +10:00
parent dc6ab0fa52
commit dc8dd5af28
No known key found for this signature in database
GPG key ID: E5F8E74C672BC666
5 changed files with 168 additions and 46 deletions

View file

@ -325,8 +325,14 @@ mod tests {
let btc_amount = Amount::from_sat(500_000);
let xmr_amount = crate::monero::Amount::from_piconero(10000);
let tx_redeem_fee = alice_wallet.estimate_fee(TxRedeem::weight()).await.unwrap();
let tx_punish_fee = alice_wallet.estimate_fee(TxPunish::weight()).await.unwrap();
let tx_redeem_fee = alice_wallet
.estimate_fee(TxRedeem::weight(), btc_amount)
.await
.unwrap();
let tx_punish_fee = alice_wallet
.estimate_fee(TxPunish::weight(), btc_amount)
.await
.unwrap();
let redeem_address = alice_wallet.new_address().await.unwrap();
let punish_address = alice_wallet.new_address().await.unwrap();