Closed boriskubrik closed 7 months ago
I also can't work out whats going on here but something isn't right:
When I switch to Avalance we're trying to run balanceOf
on this contract, but it's not a token, so it returns 0x
and fails, spamming the console again - is this one of ours? Doesn't look like it from the multichain activity as far as I can tell.
https://etherscan.io/address/0x2791bca1f2de4661ed88a30c99a7a9449aa84174#multichain-portfolio
My understanding is we're only supposed to be running balanceOf
directly on the currently selected to
and from
tokens for the most up to date balance, so this seems unexpected.
Oh I think I worked it out.
Currently if you change networks it will take the previously selected token and then try and fetch the balance for the old token address on the new network resulting in a failure.
This can probably be fixed separately, I don't think it's caused by the changes here.
@immutablegoblin I've suppressed the Coingecko errors. e3bd912
We still see 500 (Internal Server Error)
s from the SDK, but it is a separate matter.
balanceMaps
in state, using thechainId
as a key. We fetch once and get the balances for all tokens.useRefetchBalances
hook.isLoading
is stored in state. CoinSelector does not yet support it for the balances, this needs to be added to shared-ui.0
for coins without balances. Not displaying anything while we are fetching the balances. This should be replaced with the loading state.