mirror of
https://github.com/sparrowwallet/drongo.git
synced 2024-11-02 18:26:43 +00:00
match coldcard fee percent calc
This commit is contained in:
parent
b1299f6abf
commit
9663629e34
1 changed files with 5 additions and 1 deletions
|
@ -86,8 +86,12 @@ public class WalletTransaction {
|
|||
return selectedUtxos.keySet().stream().mapToLong(BlockTransactionHashIndex::getValue).sum();
|
||||
}
|
||||
|
||||
/**
|
||||
* Fee percentage matches the Coldcard implementation of total fee as a percentage of total value out
|
||||
* @return the fee percentage
|
||||
*/
|
||||
public double getFeePercentage() {
|
||||
return (double)getFee() / getTotal();
|
||||
return (double)getFee() / (getTotal() - getFee());
|
||||
}
|
||||
|
||||
public boolean isCoinControlUsed() {
|
||||
|
|
Loading…
Reference in a new issue