1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-12-23 01:39:44 +01:00

use token custom icons where possible (#10939)

This commit is contained in:
Alex Donesky 2021-04-28 00:07:43 -05:00 committed by GitHub
parent 13a0389c96
commit b6d8291dfc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 9 additions and 1 deletions

View File

@ -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 (
<div
@ -163,7 +165,11 @@ export default class SendAssetRow extends Component {
onClick={() => this.selectToken(token)}
>
<div className="send-v2__asset-dropdown__asset-icon">
<Identicon address={address} diameter={36} />
<Identicon
address={address}
diameter={36}
image={assetImages[address]}
/>
</div>
<div className="send-v2__asset-dropdown__asset-data">
<div className="send-v2__asset-dropdown__symbol">{symbol}</div>

View File

@ -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),
};
}