store jmint separately from updated coins

This commit is contained in:
julian 2023-07-25 15:41:06 -06:00
parent 90b16c576e
commit c1f73a89be

View file

@ -2981,9 +2981,6 @@ class FiroWallet extends CoinServiceAPI
isJMint: true,
otherData: null,
);
if (int.parse(jmint.value) > 0) {
updatedCoins.add(jmint);
}
try {
await db.isar.writeTxn(() async {
@ -2994,6 +2991,10 @@ class FiroWallet extends CoinServiceAPI
);
}
await db.isar.lelantusCoins.putAll(updatedCoins);
if (int.parse(jmint.value) > 0) {
await db.isar.lelantusCoins.put(jmint);
}
});
} catch (e, s) {
Logging.instance.log(