diff options
fix images for watched tokens
Diffstat (limited to 'ui/app/selectors.js')
-rw-r--r-- | ui/app/selectors.js | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/ui/app/selectors.js b/ui/app/selectors.js index 1d5f4d4cb..484705b1f 100644 --- a/ui/app/selectors.js +++ b/ui/app/selectors.js @@ -14,6 +14,7 @@ const selectors = { getSelectedAccount, getSelectedToken, getSelectedTokenExchangeRate, + getSelectedTokenAssetImage, getTokenExchangeRate, conversionRateSelector, transactionsSelector, @@ -71,6 +72,13 @@ function getSelectedTokenExchangeRate (state) { return contractExchangeRates[address] || 0 } +function getSelectedTokenAssetImage (state) { + const assetImages = state.metamask.assetImages + const selectedToken = getSelectedToken(state) || {} + const { address } = selectedToken + return assetImages[address] +} + function getTokenExchangeRate (state, address) { const contractExchangeRates = state.metamask.contractExchangeRates return contractExchangeRates[address] || 0 |