sifiorg / sifi

7 stars 1 forks source link

feat(frontend): use the Sifi API for getting token balances #527

Closed boriskubrik closed 7 months ago

boriskubrik commented 7 months ago

image

immutablegoblin commented 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.

immutablegoblin commented 7 months ago

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.

boriskubrik commented 7 months ago

@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.