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

Resetting spending cap value to empty when a token allowance request is rejected. (#16659)

This commit is contained in:
Niranjana Binoy 2022-11-24 14:14:41 -05:00 committed by seaona
parent 6625c542d9
commit 23ff58268f

View File

@ -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());