mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-10 20:54:33 +00:00
assume mints listed in lelantus txs are confirmed
TODO make sure that mints/_mintTxnData only contains confirmed tx / filter unconfirmed
This commit is contained in:
parent
240f091892
commit
77b1e23144
1 changed files with 8 additions and 1 deletions
|
@ -900,6 +900,10 @@ class FiroWallet extends CoinServiceAPI
|
|||
.findAll();
|
||||
// _transactionData ??= _refreshTransactions();
|
||||
|
||||
// Query for lelantus txs / mints
|
||||
Future<List<isar_models.Transaction>> get _mintsTxnData =>
|
||||
db.getTransactions(walletId).filter().isLelantusEqualTo(true).findAll();
|
||||
|
||||
// models.TransactionData? cachedTxData;
|
||||
|
||||
// hack to add tx to txData before refresh completes
|
||||
|
@ -2385,6 +2389,7 @@ class FiroWallet extends CoinServiceAPI
|
|||
}
|
||||
final jindexes = firoGetJIndex();
|
||||
final transactions = await _txnData;
|
||||
final mints = await _mintsTxnData;
|
||||
final lelantusTransactionsd = await db
|
||||
.getTransactions(walletId)
|
||||
.filter()
|
||||
|
@ -2413,7 +2418,9 @@ class FiroWallet extends CoinServiceAPI
|
|||
if (!jindexes!.contains(lelantusCoinsList[i].index) &&
|
||||
transactions
|
||||
.where((e) => e.txid == lelantusCoinsList[i].txId)
|
||||
.isEmpty) {
|
||||
.isEmpty &&
|
||||
mints.where((e) => e.txid == lelantusCoinsList[i].txId).isEmpty) {
|
||||
// TODO make sure that mints is filtered to remove unconfirmed tx
|
||||
isUnconfirmed = true;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue