Skip to content

Commit

Permalink
fix: close popup
Browse files Browse the repository at this point in the history
  • Loading branch information
heisenberg-2077 committed Sep 27, 2023
1 parent bb97653 commit 1177059
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions src/ui/views/CommonPopup/CancelApproval/CancelApproval.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { CancelItem } from './CancelItem';
import { useTranslation } from 'react-i18next';

export const CancelApproval = () => {
const { data, setTitle, setHeight } = useCommonPopupView();
const { data, setTitle, setHeight, closePopup } = useCommonPopupView();
const {
onCancel,
displayBlockedRequestApproval,
Expand Down Expand Up @@ -32,13 +32,18 @@ export const CancelApproval = () => {
wallet.blockedDapp();
};

const handleCancel = () => {
onCancel();
closePopup();
};

return (
<div>
<div className="text-r-neutral-body text-13 font-normal text-center leading-[16px]">
{t('page.signFooterBar.detectedMultipleRequestsFromThisDapp')}
</div>
<div className="space-y-10 mt-20">
<CancelItem onClick={onCancel}>
<CancelItem onClick={handleCancel}>
{t('page.signFooterBar.cancelCurrentTransaction')}
</CancelItem>
{displayCancelAllApproval && (
Expand Down

0 comments on commit 1177059

Please sign in to comment.