mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 17:57:40 +00:00
possible epiccash duplicate tx in history fix
This commit is contained in:
parent
c29e1f0307
commit
393e27b15e
1 changed files with 9 additions and 3 deletions
|
@ -946,7 +946,7 @@ class EpiccashWallet extends Bip39Wallet {
|
||||||
final slatesToCommits = info.epicData?.slatesToCommits ?? {};
|
final slatesToCommits = info.epicData?.slatesToCommits ?? {};
|
||||||
|
|
||||||
for (final tx in transactions) {
|
for (final tx in transactions) {
|
||||||
// Logging.instance.log("tx: $tx", level: LogLevel.Info);
|
Logging.instance.log("tx: $tx", level: LogLevel.Info);
|
||||||
|
|
||||||
final isIncoming =
|
final isIncoming =
|
||||||
tx.txType == epic_models.TransactionType.TxReceived ||
|
tx.txType == epic_models.TransactionType.TxReceived ||
|
||||||
|
@ -1043,7 +1043,13 @@ class EpiccashWallet extends Bip39Wallet {
|
||||||
txns.add(txn);
|
txns.add(txn);
|
||||||
}
|
}
|
||||||
|
|
||||||
await mainDB.updateOrPutTransactionV2s(txns);
|
await mainDB.isar.writeTxn(() async {
|
||||||
|
await mainDB.isar.transactionV2s
|
||||||
|
.where()
|
||||||
|
.walletIdEqualTo(walletId)
|
||||||
|
.deleteAll();
|
||||||
|
await mainDB.isar.transactionV2s.putAll(txns);
|
||||||
|
});
|
||||||
} catch (e, s) {
|
} catch (e, s) {
|
||||||
Logging.instance.log(
|
Logging.instance.log(
|
||||||
"${cryptoCurrency.runtimeType} ${cryptoCurrency.network} net wallet"
|
"${cryptoCurrency.runtimeType} ${cryptoCurrency.network} net wallet"
|
||||||
|
|
Loading…
Reference in a new issue