Fix NEP-5 Tokens Not Displaying on Legacy Wallets #2630
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.
What current issue(s) from Trello/Github does this address?
#2575
What problem does this PR solve?
This PR bypasses a problem with
neon-js
(described in the referenced issue) and allows the token to be displayed correctly in the Activity tab.This PR also fixes a problem where some NEP-5 token balances are not displayed.
How did you solve this problem?
For the first problem, if the original query
getToken
throws an error, we now query Dora to return the token symbol.For the second problem, we first load all the tokens from Dora. Then we check the originally determined balance and check it against the balance from Dora. Any additional tokens are added to the
balances
property manually. I had to use this method because supplementing the token list with the results from Dora does not work. Several of the Flamingo tokens (e.g.fUSDT
) break the code.How did you make sure your solution works?
Live Testing. See screenshots below.
Dashboard Before. Note there is no
fUSDT
displayed.Dashboard After.
Activity Before. Note there is no
FLP-nNEO-fUSDT
displayed.Activity After.
Are there any special changes in the code that we should be aware of?
No
Is there anything else we should know?
No