From b6d8291dfc5b801924bcb1b91c2a1a4998029fb2 Mon Sep 17 00:00:00 2001 From: Alex Donesky Date: Wed, 28 Apr 2021 00:07:43 -0500 Subject: [PATCH] use token custom icons where possible (#10939) --- .../send-asset-row/send-asset-row.component.js | 8 +++++++- .../send-asset-row/send-asset-row.container.js | 2 ++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js b/ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js index b4bcc2118..35c89a041 100644 --- a/ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js +++ b/ui/app/pages/send/send-content/send-asset-row/send-asset-row.component.js @@ -16,6 +16,7 @@ export default class SendAssetRow extends Component { }), ).isRequired, accounts: PropTypes.object.isRequired, + assetImages: PropTypes.object, selectedAddress: PropTypes.string.isRequired, sendTokenAddress: PropTypes.string, setSendToken: PropTypes.func.isRequired, @@ -155,6 +156,7 @@ export default class SendAssetRow extends Component { renderAsset(token, insideDropdown = false) { const { address, symbol } = token; const { t } = this.context; + const { assetImages } = this.props; return (
this.selectToken(token)} >
- +
{symbol}
diff --git a/ui/app/pages/send/send-content/send-asset-row/send-asset-row.container.js b/ui/app/pages/send/send-content/send-asset-row/send-asset-row.container.js index f536c4fd7..c511a47b8 100644 --- a/ui/app/pages/send/send-content/send-asset-row/send-asset-row.container.js +++ b/ui/app/pages/send/send-content/send-asset-row/send-asset-row.container.js @@ -4,6 +4,7 @@ import { getNativeCurrency, getNativeCurrencyImage, getSendTokenAddress, + getAssetImages, } from '../../../../selectors'; import { updateSendToken } from '../../../../store/actions'; import SendAssetRow from './send-asset-row.component'; @@ -16,6 +17,7 @@ function mapStateToProps(state) { accounts: getMetaMaskAccounts(state), nativeCurrency: getNativeCurrency(state), nativeCurrencyImage: getNativeCurrencyImage(state), + assetImages: getAssetImages(state), }; }