diff --git a/src/logic/tokens/store/actions/loadActiveTokens.js b/src/logic/tokens/store/actions/loadActiveTokens.js index 7f6a4b55..3dc4c59f 100644 --- a/src/logic/tokens/store/actions/loadActiveTokens.js +++ b/src/logic/tokens/store/actions/loadActiveTokens.js @@ -4,19 +4,14 @@ import { List, Map } from 'immutable' import { type TokenProps, type Token, makeToken } from '~/logic/tokens/store/model/token' import { type GlobalState } from '~/store/index' import { getActiveTokens } from '~/logic/tokens/utils/tokensStorage' -import { getEthAsToken } from '~/logic/tokens/utils/tokenHelpers' import saveTokens from './saveTokens' const loadActiveTokens = (safeAddress: string) => async (dispatch: ReduxDispatch) => { try { const tokens: List = await getActiveTokens(safeAddress) - // ETH is active by default and cannot be disabled - const eth = await getEthAsToken(safeAddress) - const tokenRecords: Map = Map().withMutations((map) => { tokens.forEach(token => map.set(token.address, makeToken(token))) - map.set(eth.address, eth) }) dispatch(saveTokens(safeAddress, tokenRecords)) diff --git a/src/logic/tokens/utils/tokenHelpers.js b/src/logic/tokens/utils/tokenHelpers.js index 915ea3b1..cfb740d9 100644 --- a/src/logic/tokens/utils/tokenHelpers.js +++ b/src/logic/tokens/utils/tokenHelpers.js @@ -7,20 +7,20 @@ import { makeToken, type Token } from '~/logic/tokens/store/model/token' export const ETH_ADDRESS = '0x000' export const isEther = (symbol: string) => symbol === 'ETH' -export const getEthAsToken = async (safeAddress: string) => { - const balance = await getBalanceInEtherOf(safeAddress) +// export const getEthAsToken = async (safeAddress: string) => { +// const balance = await getBalanceInEtherOf(safeAddress) - const ethBalance = makeToken({ - address: ETH_ADDRESS, - name: 'Ether', - symbol: 'ETH', - decimals: 18, - logoUri: logo, - funds: balance, - }) +// const ethBalance = makeToken({ +// address: ETH_ADDRESS, +// name: 'Ether', +// symbol: 'ETH', +// decimals: 18, +// logoUri: logo, +// funds: balance, +// }) - return ethBalance -} +// return ethBalance +// } export const calculateActiveErc20TokensFrom = (tokens: List) => { const activeTokens = List().withMutations(list => tokens.forEach((token: Token) => {