From b39de1d57655f6511404f3d6e8a0be2b66f884af Mon Sep 17 00:00:00 2001 From: kumulynja Date: Fri, 13 Dec 2024 20:41:22 +0100 Subject: [PATCH] fix: BigInt to int conversions --- lib/_pkg/wallet/bdk/transaction.dart | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/_pkg/wallet/bdk/transaction.dart b/lib/_pkg/wallet/bdk/transaction.dart index af0d9e86..f272d84b 100644 --- a/lib/_pkg/wallet/bdk/transaction.dart +++ b/lib/_pkg/wallet/bdk/transaction.dart @@ -128,7 +128,7 @@ class BDKTransactions { if (foundStoredTx) storedTx = storedTxs.elementAtOrNull(storedTxIdx); - final vsize = await bdkTx.transaction?.vsize() ?? 1; + final vsize = await bdkTx.transaction?.vsize() ?? BigInt.from(1); final isNativeRbf = storedTx?.rbfEnabled ?? true; // await tx.transaction?.isExplicitlyRbf() ?? @@ -149,7 +149,7 @@ class BDKTransactions { received: bdkTx.received.toInt(), sent: bdkTx.sent.toInt(), fee: bdkTx.fee?.toInt() ?? 0, - feeRate: (bdkTx.fee?.toInt() ?? 1) / (vsize as int).toDouble(), + feeRate: (bdkTx.fee ?? BigInt.from(1)) / vsize, height: bdkTx.confirmationTime?.height ?? 0, timestamp: bdkTx.confirmationTime?.timestamp.toInt() ?? 0, bdkTx: bdkTx,