From 2e3f559bf72527d05fb71c0b9cce551ce270634d Mon Sep 17 00:00:00 2001 From: sneurlax Date: Tue, 9 Jan 2024 16:57:53 -0600 Subject: [PATCH] uncomment code needed to run TODO: recomment? --- .../coins/namecoin/namecoin_wallet.dart | 22 +++++++++---------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/lib/services/coins/namecoin/namecoin_wallet.dart b/lib/services/coins/namecoin/namecoin_wallet.dart index a51ecd808..44a16c802 100644 --- a/lib/services/coins/namecoin/namecoin_wallet.dart +++ b/lib/services/coins/namecoin/namecoin_wallet.dart @@ -2329,9 +2329,9 @@ class NamecoinWallet extends CoinServiceAPI } } - // int estimateTxFee({required int vSize, required int feeRatePerKB}) { - // return vSize * (feeRatePerKB / 1000).ceil(); - // } + int estimateTxFee({required int vSize, required int feeRatePerKB}) { + return vSize * (feeRatePerKB / 1000).ceil(); + } /// The coinselection algorithm decides whether or not the user is eligible to make the transaction /// with [satoshiAmountToSend] and [selectedTxFeeRate]. If so, it will call buildTrasaction() and return @@ -3405,14 +3405,14 @@ class NamecoinWallet extends CoinServiceAPI } // TODO: Check if this is the correct formula for namecoin - // Amount roughFeeEstimate(int inputCount, int outputCount, int feeRatePerKB) { - // return Amount( - // rawValue: BigInt.from( - // ((42 + (272 * inputCount) + (128 * outputCount)) / 4).ceil() * - // (feeRatePerKB / 1000).ceil()), - // fractionDigits: coin.decimals, - // ); - // } + Amount roughFeeEstimate(int inputCount, int outputCount, int feeRatePerKB) { + return Amount( + rawValue: BigInt.from( + ((42 + (272 * inputCount) + (128 * outputCount)) / 4).ceil() * + (feeRatePerKB / 1000).ceil()), + fractionDigits: coin.decimals, + ); + } Future sweepAllEstimate(int feeRate) async { int available = 0;