feat: add calculate_fee and calculate_fee_rate on wallet

This commit is contained in:
Matthew committed 2024-01-08 12:18:36 -06:00
1 parent fc25cd709a
commit 3789c1dcd6
11 files changed
+180 -13

No files matched your search

@@ -55,8 +55,14 @@ class LiveWalletTest {
assertTrue(walletDidSign)
val tx: Transaction = psbt.extractTx()
println("Txid is: ${tx.txid()}")
val txFee: ULong = wallet.calculateFee(tx)
println("Tx fee is: ${txFee}")
val feeRate: FeeRate = wallet.calculateFeeRate(tx)
println("Tx fee rate is: ${feeRate.asSatPerVb()} sat/vB")
esploraClient.broadcast(tx)
}
}