Skip to content

Commit 941b553

Browse files
committed
Fix factorn wallet overrides
1 parent 9c765c9 commit 941b553

1 file changed

Lines changed: 8 additions & 4 deletions

File tree

lib/wallets/wallet/impl/fact0rn_wallet.dart

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff 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
}

0 commit comments

Comments
 (0)