mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2025-01-10 20:54:33 +00:00
fix firo lelantus sends to non wallet addresses not showing as confirmed in wallet ui
This commit is contained in:
parent
c0096a08de
commit
ca95612d69
1 changed files with 24 additions and 0 deletions
|
@ -3352,6 +3352,30 @@ class FiroWallet extends CoinServiceAPI
|
||||||
|
|
||||||
List<Map<String, dynamic>> allTransactions = [];
|
List<Map<String, dynamic>> allTransactions = [];
|
||||||
|
|
||||||
|
// some lelantus transactions aren't fetched via wallet addresses so they
|
||||||
|
// will never show as confirmed in the gui.
|
||||||
|
final unconfirmedTransactions =
|
||||||
|
await db.getTransactions(walletId).filter().heightIsNull().findAll();
|
||||||
|
for (final tx in unconfirmedTransactions) {
|
||||||
|
final txn = await cachedElectrumXClient.getTransaction(
|
||||||
|
txHash: tx.txid,
|
||||||
|
verbose: true,
|
||||||
|
coin: coin,
|
||||||
|
);
|
||||||
|
final height = txn["height"] as int?;
|
||||||
|
|
||||||
|
if (height != null) {
|
||||||
|
// tx was mined
|
||||||
|
// add to allTxHashes
|
||||||
|
final info = {
|
||||||
|
"tx_hash": tx.txid,
|
||||||
|
"height": height,
|
||||||
|
"address": tx.address.value?.value,
|
||||||
|
};
|
||||||
|
allTxHashes.add(info);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
// final currentHeight = await chainHeight;
|
// final currentHeight = await chainHeight;
|
||||||
|
|
||||||
for (final txHash in allTxHashes) {
|
for (final txHash in allTxHashes) {
|
||||||
|
|
Loading…
Reference in a new issue