File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -305,18 +305,22 @@ class Fact0rnWallet<T extends ElectrumXCurrencyInterface>
305305
306306 // Typical SegWit estimation
307307 @override
308- Amount roughFeeEstimate (int inputCount, int outputCount, int feeRatePerKB) {
308+ Amount roughFeeEstimate (
309+ int inputCount,
310+ int outputCount,
311+ BigInt feeRatePerKB,
312+ ) {
309313 return Amount (
310314 rawValue: BigInt .from (
311315 ((42 + (272 * inputCount) + (128 * outputCount)) / 4 ).ceil () *
312- (feeRatePerKB / 1000 ).ceil (),
316+ (feeRatePerKB. toInt () / 1000 ).ceil (),
313317 ),
314318 fractionDigits: cryptoCurrency.fractionDigits,
315319 );
316320 }
317321
318322 @override
319- int estimateTxFee ({required int vSize, required int feeRatePerKB}) {
320- return vSize * (feeRatePerKB / 1000 ).ceil ();
323+ int estimateTxFee ({required int vSize, required BigInt feeRatePerKB}) {
324+ return vSize * (feeRatePerKB. toInt () / 1000 ).ceil ();
321325 }
322326}
You can’t perform that action at this time.
0 commit comments