Conversation
Asset metadata can be temporarily unavailable while a newly received asset is being indexed. The old refresh cleared the model and appended rows directly, so an error left only the alphabetic prefix processed before the missing metadata. Build a replacement snapshot and publish it only after every balance has been processed, preserving the last complete view during the transient gap.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Problem
When the asset overview refreshes while metadata for a newly received asset is temporarily unavailable,
AssetTablePriv::refreshWallet()clears the current model and appends rows while iterating the alphabetically ordered balances. The metadata lookup can then return early, leaving only the prefix processed before the missing asset visible. This matches issue #617's report of the list stopping at the newly registered asset's letter.Approach
Build the refreshed asset rows in a temporary list and assign it to
cachedBalancesonly after the complete balance iteration succeeds. A transient metadata lookup failure therefore preserves the last complete overview instead of exposing a partial list. A successful refresh, including an empty balance set, still replaces the cached snapshot.Test plan
git diff --checkpython3 -m unittest -v tests/issue_617_asset_overview_test.py— 3 tests passed, including a structural regression assertion and a transient metadata-gap simulationpython3 -m py_compile tests/issue_617_asset_overview_test.pyFixes #617