From 2c737e30c407213605bc4e79d9d0e93d99ee6a71 Mon Sep 17 00:00:00 2001 From: rocky-fleek Date: Thu, 30 Jun 2022 00:15:22 +0200 Subject: [PATCH] Disable transaction after accepted --- source/Pages/Notification/components/Sign/index.jsx | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/source/Pages/Notification/components/Sign/index.jsx b/source/Pages/Notification/components/Sign/index.jsx index 1e53f3c3..93accebf 100644 --- a/source/Pages/Notification/components/Sign/index.jsx +++ b/source/Pages/Notification/components/Sign/index.jsx @@ -28,6 +28,7 @@ const AssetsWarning = ({ const dispatch = useDispatch(); const classes = useStyles(); const [showModal, setShowModal] = useState(false); + const [accepted, setAccepted] = useState(false); const shouldWarn = args?.requestInfo?.shouldWarn; @@ -91,6 +92,11 @@ const AssetsWarning = ({ }); }, []); + const handleAcceptRequest = () => { + setAccepted(true); + handleAccept(); + }; + return ( @@ -117,14 +123,16 @@ const AssetsWarning = ({ onClick={() => window.close()} fullWidth style={{ width: '96%' }} + disabled={accepted} />