1
0
mirror of https://github.com/kremalicious/metamask-extension.git synced 2024-11-26 04:20:53 +01:00

Render correct image in the asset dropdown while sending an NFT (#19787)

* show native token image for native token in asset dropdown list

* remove console statements
This commit is contained in:
Nidhi Kumari 2023-07-04 18:30:11 +05:30 committed by GitHub
parent a3974d8462
commit fa84aa8b0a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -186,14 +186,8 @@ export default class SendAssetRow extends Component {
renderNativeCurrency(insideDropdown = false) { renderNativeCurrency(insideDropdown = false) {
const { t } = this.context; const { t } = this.context;
const { const { accounts, selectedAddress, nativeCurrency, nativeCurrencyImage } =
accounts, this.props;
selectedAddress,
nativeCurrency,
nativeCurrencyImage,
sendAsset,
} = this.props;
const { sendableTokens, sendableNfts } = this.state; const { sendableTokens, sendableNfts } = this.state;
const balanceValue = accounts[selectedAddress] const balanceValue = accounts[selectedAddress]
@ -211,15 +205,11 @@ export default class SendAssetRow extends Component {
onClick={() => this.selectToken(AssetType.native)} onClick={() => this.selectToken(AssetType.native)}
> >
<div className="send-v2__asset-dropdown__asset-icon"> <div className="send-v2__asset-dropdown__asset-icon">
{sendAsset?.type === AssetType.NFT && sendAsset?.details?.image ? (
<img width={36} src={sendAsset.details.image} />
) : (
<Identicon <Identicon
diameter={36} diameter={36}
image={nativeCurrencyImage} image={nativeCurrencyImage}
address={nativeCurrency} address={nativeCurrency}
/> />
)}
</div> </div>
<div className="send-v2__asset-dropdown__asset-data"> <div className="send-v2__asset-dropdown__asset-data">
<div className="send-v2__asset-dropdown__symbol"> <div className="send-v2__asset-dropdown__symbol">