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

adding condition check to verify token data is loaded before rendering approve screen (#10606)

This commit is contained in:
Niranjana Binoy 2021-03-08 16:50:37 -05:00 committed by GitHub
parent 80266cf33c
commit 85181aaff4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -19,6 +19,7 @@ import {
getNativeCurrency,
} from '../../selectors';
import { currentNetworkTxListSelector } from '../../selectors/transactions';
import Loading from '../../components/ui/loading-screen';
import { getCustomTxParamsData } from './confirm-approve.util';
import ConfirmApproveContent from './confirm-approve-content';
@ -87,7 +88,7 @@ export default function ConfirmApprove() {
? getCustomTxParamsData(data, { customPermissionAmount, decimals })
: null;
return (
return tokenSymbol ? (
<ConfirmTransactionBase
toAddress={toAddress}
identiconAddress={tokenAddress}
@ -141,5 +142,7 @@ export default function ConfirmApprove() {
hideSenderToRecipient
customTxParamsData={customData}
/>
) : (
<Loading />
);
}