-
Notifications
You must be signed in to change notification settings - Fork 7
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
feat: use evm and avalanche modules to load balances CP-9002 #43
Conversation
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.
Great work!
I did a sanity check, comparing returned balances between this branch & current production build - it's mostly consistent.
I found a bug with Beam (which probably also relates to other networks that go through DebankService
in the EvmModule
).
Quick investigation tells me it's caused by the usage of Zodios
in the VM Modules, which internally uses axios
(which does not work in extension land). I see this error when debugging (place a conditional breakpoint in BalancesService.ts:62
with network.chainId === 4337
condition)
"getNativeBalance failed: AxiosError: There is no suitable adapter to dispatch the request since :
- adapter xhr is not supported by the environment
- adapter http is not available in the build"
beam.bam.boom.mov
Other than that, it's working great (even better than prod build when it comes to NFTs, I just noticed).
I left some additional comments, mostly minor / nitpicks.
const funds = | ||
firstAsset && 'decimals' in firstAsset | ||
? normalizeBalance(firstAsset.balance, firstAsset.decimals) ?? new Big(0) | ||
: new Big(0); |
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.
nitpick: I believe this is the same typing issue as in one of the previous comments, where ActiveNetworkWidgetProps
typings allow for NFTs to be passed, but we never actually (intent to) do it...so maybe we could exclude NftTokenWithBalance
from assetList
prop :)
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.
send swap balances onboarding etc seem working well 🐤
Description
Refactor Core Extension to use the vm module system for all balance loading
VM modules PR to add NFT loading: https://github.com/ava-labs/vm-modules/pull/153
Changes
Testing
Screenshots:
No ui changed.
Checklist for the author
Tick each of them when done or if not applicable.