Commit d8c4ebc2 authored by Ian Lapham's avatar Ian Lapham Committed by GitHub

add fix for ETH balance fetching (#662)

parent 2b15979e
...@@ -416,6 +416,10 @@ export function useAllBalances(): Array<TokenAmount> { ...@@ -416,6 +416,10 @@ export function useAllBalances(): Array<TokenAmount> {
Object.keys(state[chainId]).map(address => { Object.keys(state[chainId]).map(address => {
return Object.keys(state[chainId][address]).map(tokenAddress => { return Object.keys(state[chainId][address]).map(tokenAddress => {
if (state[chainId][address][tokenAddress].value) { if (state[chainId][address][tokenAddress].value) {
// fix if ETH found in local storage from old storage
if (tokenAddress === 'ETH') {
tokenAddress = WETH[chainId]
}
newBalances[chainId] = { newBalances[chainId] = {
...newBalances[chainId], ...newBalances[chainId],
[address]: { [address]: {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment