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.
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fetch balances from Oasis gRPC instead of Web3 RPC #1384
Fetch balances from Oasis gRPC instead of Web3 RPC #1384
Changes from all commits
4f68d27
7998b8b
5143ff7
595ceca
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That doesn't look right, if this is querying ERC-20 tokens as well, each of the ERC-20 token, can have custom decimals specified. So defaulting to paratime decimals here, is wrong.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's only querying e.g. TEST and EUROe; evm_balances are a different field in Nexus API.
But we don't differentiate decimals between TEST and EUROe - related: #1265 (comment)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok, I verified that both Ocean and EUROe use 18 decimals places, so coincidentally this works as expected.
Looking at the documentation at https://docs.pontus-x.eu/docs/Development/quick_start#setup-metamask the native token has been renamed to GX @csillag are we aware of this?Scratch the above, was looking at the wrong documentation. The right documentation is linked here: https://docs.pontus-x.eu/docs/ParaTime/quick_start#setup-metamask
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is iterating twice over an array, for no good reason. This should happen in the previous
map
.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I prefer this, and it mirrors
explorer/src/oasis-nexus/api.ts
Lines 361 to 366 in 2607980
(I also think https://github.com/oasisprotocol/explorer-frontend/blob/26079807ff9a4e91cc42d106d75a0c824533caba/src/oasis-nexus/api.ts#L709-L752 should be split into multiple iterations over an array)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I know it is not a large array, but for me it makes no sense, to iterate over the same array multiple times.
This file was deleted.