From 5666d0a71c90578c05dc71606f15ca8f8f905310 Mon Sep 17 00:00:00 2001 From: Niranjana Binoy <43930900+NiranjanaBinoy@users.noreply.github.com> Date: Thu, 24 Nov 2022 14:14:41 -0500 Subject: [PATCH] Resetting spending cap value to empty when a token allowance request is rejected. (#16659) --- ui/pages/token-allowance/token-allowance.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/ui/pages/token-allowance/token-allowance.js b/ui/pages/token-allowance/token-allowance.js index 83bd4f29c..aea5fecbc 100644 --- a/ui/pages/token-allowance/token-allowance.js +++ b/ui/pages/token-allowance/token-allowance.js @@ -44,6 +44,7 @@ import CustomSpendingCap from '../../components/app/custom-spending-cap/custom-s import Dialog from '../../components/ui/dialog'; import { useGasFeeContext } from '../../contexts/gasFee'; import { getCustomTxParamsData } from '../confirm-approve/confirm-approve.util'; +import { setCustomTokenAmount } from '../../ducks/app/app'; export default function TokenAllowance({ origin, @@ -131,6 +132,7 @@ export default function TokenAllowance({ const handleReject = () => { dispatch(updateCustomNonce('')); + dispatch(setCustomTokenAmount('')); dispatch(cancelTx(fullTxData)).then(() => { dispatch(clearConfirmTransaction());