mirror of
https://github.com/cypherstack/stack_wallet.git
synced 2024-11-17 09:47:37 +00:00
refresh inscriptions after general refresh if any are detected
This commit is contained in:
parent
7da49c7ea0
commit
f32359ac1e
1 changed files with 8 additions and 0 deletions
|
@ -1856,6 +1856,7 @@ class LitecoinWallet extends CoinServiceAPI
|
|||
}
|
||||
|
||||
final List<isar_models.UTXO> outputArray = [];
|
||||
bool inscriptionsRefreshNeeded = false;
|
||||
|
||||
for (int i = 0; i < fetchedUtxoList.length; i++) {
|
||||
for (int j = 0; j < fetchedUtxoList[i].length; j++) {
|
||||
|
@ -1890,10 +1891,12 @@ class LitecoinWallet extends CoinServiceAPI
|
|||
// TODO check the specific output, not just the address in general
|
||||
// TODO optimize by querying the litescribe API for all addresses at once, instead of one API call per output
|
||||
if (utxoOwnerAddress != null) {
|
||||
// TODO add inscription to database
|
||||
if (await inscriptionInAddress(utxoOwnerAddress!)) {
|
||||
shouldBlock = true;
|
||||
blockReason = "Ordinal";
|
||||
label = "Ordinal detected at address";
|
||||
inscriptionsRefreshNeeded = true;
|
||||
}
|
||||
} else {
|
||||
// TODO implement inscriptionInOutput
|
||||
|
@ -1901,6 +1904,7 @@ class LitecoinWallet extends CoinServiceAPI
|
|||
shouldBlock = true;
|
||||
blockReason = "May contain ordinal";
|
||||
label = "Possible ordinal";
|
||||
inscriptionsRefreshNeeded = true;
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -1923,6 +1927,10 @@ class LitecoinWallet extends CoinServiceAPI
|
|||
}
|
||||
}
|
||||
|
||||
if (inscriptionsRefreshNeeded) {
|
||||
await refreshInscriptions();
|
||||
}
|
||||
|
||||
Logging.instance.log(
|
||||
'Outputs fetched: $outputArray',
|
||||
level: LogLevel.Info,
|
||||
|
|
Loading…
Reference in a new issue