mirror of
https://github.com/kremalicious/metamask-extension.git
synced 2024-11-22 18:00:18 +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:
parent
a3974d8462
commit
fa84aa8b0a
@ -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 ? (
|
<Identicon
|
||||||
<img width={36} src={sendAsset.details.image} />
|
diameter={36}
|
||||||
) : (
|
image={nativeCurrencyImage}
|
||||||
<Identicon
|
address={nativeCurrency}
|
||||||
diameter={36}
|
/>
|
||||||
image={nativeCurrencyImage}
|
|
||||||
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">
|
||||||
|
Loading…
Reference in New Issue
Block a user