amount-related ui fixes for firo/spend-mints

This commit is contained in:
sneurlax 2023-04-10 16:56:17 -05:00
parent b45146ac4b
commit af1993cc01

View file

@ -914,8 +914,16 @@ class FiroWallet extends CoinServiceAPI
type: isar_models.TransactionType.outgoing, type: isar_models.TransactionType.outgoing,
subType: isar_models.TransactionSubType.none, subType: isar_models.TransactionSubType.none,
// precision may be lost here hence the following amountString // precision may be lost here hence the following amountString
amount: (txData["recipientAmt"] as Amount).raw.toInt(), amount: Amount(
amountString: (txData["recipientAmt"] as Amount).toJsonString(), 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, fee: txData["fee"] as int,
height: null, height: null,
isCancelled: false, isCancelled: false,
@ -2663,7 +2671,7 @@ class FiroWallet extends CoinServiceAPI
Future<List<Map<String, dynamic>>> createMintsFromAmount(int total) async { Future<List<Map<String, dynamic>>> createMintsFromAmount(int total) async {
var tmpTotal = total; var tmpTotal = total;
var index = 1; var index = 1; //
var mints = <Map<String, dynamic>>[]; var mints = <Map<String, dynamic>>[];
final nextFreeMintIndex = firoGetMintIndex()!; final nextFreeMintIndex = firoGetMintIndex()!;
while (tmpTotal > 0) { while (tmpTotal > 0) {