always add lelantus coin to locale db

This commit is contained in:
julian 2023-07-25 16:08:54 -06:00
parent c1f73a89be
commit 5d3e976601

View file

@ -370,7 +370,6 @@ Future<Map<String, dynamic>> isolateRestore(
// Logging.instance.log("jmints $spendTxIds", addToDebugMessagesDB: false); // Logging.instance.log("jmints $spendTxIds", addToDebugMessagesDB: false);
result['_lelantus_coins'] = lelantusCoins; result['_lelantus_coins'] = lelantusCoins;
result['jindex'] = jindexes;
result['spendTxIds'] = spendTxIds; result['spendTxIds'] = spendTxIds;
return result; return result;
@ -2992,9 +2991,7 @@ class FiroWallet extends CoinServiceAPI
} }
await db.isar.lelantusCoins.putAll(updatedCoins); await db.isar.lelantusCoins.putAll(updatedCoins);
if (int.parse(jmint.value) > 0) {
await db.isar.lelantusCoins.put(jmint); await db.isar.lelantusCoins.put(jmint);
}
}); });
} catch (e, s) { } catch (e, s) {
Logging.instance.log( Logging.instance.log(
@ -3074,10 +3071,9 @@ class FiroWallet extends CoinServiceAPI
isJMint: false, isJMint: false,
otherData: null, otherData: null,
); );
if (int.parse(mint.value) > 0) {
updatedCoins.add(mint); updatedCoins.add(mint);
} }
}
// Logging.instance.log(coins); // Logging.instance.log(coins);
try { try {
await db.isar.writeTxn(() async { await db.isar.writeTxn(() async {