Skip to content

Commit

Permalink
prevent double submit for claiming tokens #395
Browse files Browse the repository at this point in the history
  • Loading branch information
creed-victor committed Mar 5, 2021
1 parent f154904 commit 5637ee8
Showing 1 changed file with 4 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,10 @@ export function OriginClaimDialog(props: Props) {

const { send, ...tx } = useSendContractTx('OriginInvestorsClaim', 'claim');
const handleSubmit = useCallback(() => {
send([], { from: account }, { type: TxType.SOV_ORIGIN_CLAIM });
}, [account, send]);
if (!tx.loading) {
send([], { from: account }, { type: TxType.SOV_ORIGIN_CLAIM });
}
}, [account, send, tx]);

const handleClosing = useCallback(() => {
if (tx.status === TxStatus.CONFIRMED) {
Expand Down

1 comment on commit 5637ee8

@vercel
Copy link

@vercel vercel bot commented on 5637ee8 Mar 5, 2021

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please sign in to comment.