mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 01:37:54 +00:00
bandaid fix for fetching and parsing spark transactions where the electrumx call sometimes fails when the tx was recently submitted
This commit is contained in:
parent
5fbd22d939
commit
b1e67b154f
1 changed files with 14 additions and 5 deletions
|
@ -135,11 +135,20 @@ class FiroWallet extends Bip39HDWallet
|
|||
|
||||
// if (storedTx == null ||
|
||||
// !storedTx.isConfirmed(currentHeight, MINIMUM_CONFIRMATIONS)) {
|
||||
final tx = await electrumXCachedClient.getTransaction(
|
||||
txHash: txHash["tx_hash"] as String,
|
||||
verbose: true,
|
||||
coin: info.coin,
|
||||
);
|
||||
|
||||
// firod/electrumx seem to take forever to process spark txns so we'll
|
||||
// just ignore null errors and check again on next refresh.
|
||||
// This could also be a bug in the custom electrumx rpc code
|
||||
final Map<String, dynamic> tx;
|
||||
try {
|
||||
tx = await electrumXCachedClient.getTransaction(
|
||||
txHash: txHash["tx_hash"] as String,
|
||||
verbose: true,
|
||||
coin: info.coin,
|
||||
);
|
||||
} catch (_) {
|
||||
continue;
|
||||
}
|
||||
|
||||
// check for duplicates before adding to list
|
||||
if (allTransactions
|
||||
|
|
Loading…
Reference in a new issue