Skip to content

Commit

Permalink
Disable transaction after accepted
Browse files Browse the repository at this point in the history
  • Loading branch information
rocky-fleek committed Jun 29, 2022
1 parent e237e5a commit 2c737e3
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion source/Pages/Notification/components/Sign/index.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down Expand Up @@ -91,6 +92,11 @@ const AssetsWarning = ({
});
}, []);

const handleAcceptRequest = () => {
setAccepted(true);
handleAccept();
};

return (
<Provider store={store}>
<ThemeProvider theme={theme}>
Expand All @@ -117,14 +123,16 @@ const AssetsWarning = ({
onClick={() => window.close()}
fullWidth
style={{ width: '96%' }}
disabled={accepted}
/>
<Button
variant="rainbow"
value={t('common.confirm')}
onClick={handleAccept}
onClick={handleAcceptRequest}
fullWidth
style={continueButtonStyles}
wrapperStyle={{ textAlign: 'right' }}
disabled={accepted}
/>
</div>
</div>
Expand Down

0 comments on commit 2c737e3

Please sign in to comment.