aboutsummaryrefslogtreecommitdiffstats
path: root/ui/app/components
diff options
context:
space:
mode:
authorEsteban MIno <efmino@uc.cl>2018-08-21 23:59:42 +0800
committerEsteban MIno <efmino@uc.cl>2018-08-21 23:59:42 +0800
commit6fa889abcb2e907073e227379e1fc930d22bfe2d (patch)
tree63a8d61d7cba4155f96f1eaf292472cf31f26fae /ui/app/components
parent68c1b4c17049e3ef18397ae83b0eb9da8cccab2c (diff)
downloadtangerine-wallet-browser-6fa889abcb2e907073e227379e1fc930d22bfe2d.tar
tangerine-wallet-browser-6fa889abcb2e907073e227379e1fc930d22bfe2d.tar.gz
tangerine-wallet-browser-6fa889abcb2e907073e227379e1fc930d22bfe2d.tar.bz2
tangerine-wallet-browser-6fa889abcb2e907073e227379e1fc930d22bfe2d.tar.lz
tangerine-wallet-browser-6fa889abcb2e907073e227379e1fc930d22bfe2d.tar.xz
tangerine-wallet-browser-6fa889abcb2e907073e227379e1fc930d22bfe2d.tar.zst
tangerine-wallet-browser-6fa889abcb2e907073e227379e1fc930d22bfe2d.zip
refactor watchToken related functions
Diffstat (limited to 'ui/app/components')
-rw-r--r--ui/app/components/balance-component.js6
-rw-r--r--ui/app/components/modals/hide-token-confirmation-modal.js6
-rw-r--r--ui/app/components/token-list.js6
3 files changed, 9 insertions, 9 deletions
diff --git a/ui/app/components/balance-component.js b/ui/app/components/balance-component.js
index 042420789..9af27f4ec 100644
--- a/ui/app/components/balance-component.js
+++ b/ui/app/components/balance-component.js
@@ -22,7 +22,7 @@ function mapStateToProps (state) {
network,
conversionRate: state.metamask.conversionRate,
currentCurrency: state.metamask.currentCurrency,
- imageObjects: state.metamask.imageObjects,
+ assetImages: state.metamask.assetImages,
}
}
@@ -33,9 +33,9 @@ function BalanceComponent () {
BalanceComponent.prototype.render = function () {
const props = this.props
- const { token, network, imageObjects } = props
+ const { token, network, assetImages } = props
let imageUrl
- if (token) imageUrl = imageObjects[token.address]
+ if (token) imageUrl = assetImages[token.address]
return h('div.balance-container', {}, [
diff --git a/ui/app/components/modals/hide-token-confirmation-modal.js b/ui/app/components/modals/hide-token-confirmation-modal.js
index 4ed09d2ee..bdecc0593 100644
--- a/ui/app/components/modals/hide-token-confirmation-modal.js
+++ b/ui/app/components/modals/hide-token-confirmation-modal.js
@@ -10,7 +10,7 @@ function mapStateToProps (state) {
return {
network: state.metamask.network,
token: state.appState.modal.modalState.props.token,
- imageObjects: state.metamask.imageObjects,
+ assetImages: state.metamask.assetImages,
}
}
@@ -41,9 +41,9 @@ module.exports = connect(mapStateToProps, mapDispatchToProps)(HideTokenConfirmat
HideTokenConfirmationModal.prototype.render = function () {
- const { token, network, hideToken, hideModal, imageObjects } = this.props
+ const { token, network, hideToken, hideModal, assetImages } = this.props
const { symbol, address } = token
- const imageUrl = imageObjects[address]
+ const imageUrl = assetImages[address]
return h('div.hide-token-confirmation', {}, [
h('div.hide-token-confirmation__container', {
diff --git a/ui/app/components/token-list.js b/ui/app/components/token-list.js
index 7ee8b5faa..bbdb71c7e 100644
--- a/ui/app/components/token-list.js
+++ b/ui/app/components/token-list.js
@@ -15,7 +15,7 @@ function mapStateToProps (state) {
network: state.metamask.network,
tokens: state.metamask.tokens,
userAddress: selectors.getSelectedAddress(state),
- imageObjects: state.metamask.imageObjects,
+ assetImages: state.metamask.assetImages,
}
}
@@ -47,7 +47,7 @@ function TokenList () {
}
TokenList.prototype.render = function () {
- const { userAddress, imageObjects } = this.props
+ const { userAddress, assetImages } = this.props
const state = this.state
const { tokens, isLoading, error } = state
if (isLoading) {
@@ -77,7 +77,7 @@ TokenList.prototype.render = function () {
}
return h('div', tokens.map((tokenData) => {
- tokenData.imageUrl = imageObjects[tokenData.address]
+ tokenData.imageUrl = assetImages[tokenData.address]
return h(TokenCell, tokenData)
}))