diff --git a/ui/pages/token-allowance/token-allowance.js b/ui/pages/token-allowance/token-allowance.js index 4d02f788e..83bd4f29c 100644 --- a/ui/pages/token-allowance/token-allowance.js +++ b/ui/pages/token-allowance/token-allowance.js @@ -76,7 +76,9 @@ export default function TokenAllowance({ const [showContractDetails, setShowContractDetails] = useState(false); const [showFullTxDetails, setShowFullTxDetails] = useState(false); - const [isFirstPage, setIsFirstPage] = useState(true); + const [isFirstPage, setIsFirstPage] = useState( + dappProposedTokenAmount !== '0', + ); const [errorText, setErrorText] = useState(''); const currentAccount = useSelector(getCurrentAccountWithSendEtherInfo); @@ -181,6 +183,8 @@ export default function TokenAllowance({ setIsFirstPage(true); }; + const isEmpty = customTokenAmount === ''; + return ( {isFirstPage && t('setSpendingCap')} {!isFirstPage && - (customTokenAmount === 0 + (customTokenAmount === '0' || isEmpty ? t('revokeSpendingCap') : t('reviewSpendingCap'))} @@ -309,7 +313,11 @@ export default function TokenAllowance({ handleBackClick()} /> )}