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

feature/default_network_editable
Niranjana Binoy 2 years ago committed by GitHub
parent 6c00785271
commit 5666d0a71c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 2
      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());

Loading…
Cancel
Save