From af1993cc015e880b2334d162df5fd58583fcf150 Mon Sep 17 00:00:00 2001 From: sneurlax Date: Mon, 10 Apr 2023 16:56:17 -0500 Subject: [PATCH] amount-related ui fixes for firo/spend-mints --- lib/services/coins/firo/firo_wallet.dart | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/lib/services/coins/firo/firo_wallet.dart b/lib/services/coins/firo/firo_wallet.dart index fc0d2a6eb..49d0bda1f 100644 --- a/lib/services/coins/firo/firo_wallet.dart +++ b/lib/services/coins/firo/firo_wallet.dart @@ -914,8 +914,16 @@ class FiroWallet extends CoinServiceAPI type: isar_models.TransactionType.outgoing, subType: isar_models.TransactionSubType.none, // precision may be lost here hence the following amountString - amount: (txData["recipientAmt"] as Amount).raw.toInt(), - amountString: (txData["recipientAmt"] as Amount).toJsonString(), + amount: Amount( + rawValue: BigInt.from(txData["recipientAmt"] as int), + fractionDigits: coin.decimals) + .raw + .toInt(), + amountString: Amount( + rawValue: BigInt.from(txData["recipientAmt"] as int), + fractionDigits: coin.decimals) + .raw + .toString(), fee: txData["fee"] as int, height: null, isCancelled: false, @@ -2663,7 +2671,7 @@ class FiroWallet extends CoinServiceAPI Future>> createMintsFromAmount(int total) async { var tmpTotal = total; - var index = 1; + var index = 1; // var mints = >[]; final nextFreeMintIndex = firoGetMintIndex()!; while (tmpTotal > 0) {