Skip to content

Commit

Permalink
fix(Staking): close modal on submit (#1599)
Browse files Browse the repository at this point in the history
  • Loading branch information
danielsimao authored Nov 16, 2023
1 parent 450d008 commit fedd584
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,13 @@ const StakingAccountDetails = ({
const transaction = useTransaction(Transaction.ESCROW_WITHDRAW_REWARDS, {
onSuccess: () => {
onClaimRewards();
setOpen(false);
}
});

const handleSubmit = () => transaction.execute();
const handleSubmit = () => {
transaction.execute();
setOpen(false);
};

const handleOpen = () => transaction.fee.estimate();

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,13 @@ const StakingWithdrawCard = ({ data, onWithdraw, ...props }: StakingWithdrawCard
const transaction = useTransaction(Transaction.ESCROW_WITHDRAW, {
onSuccess: () => {
onWithdraw();
setOpen(false);
}
});

const handleSubmit = () => transaction.execute();
const handleSubmit = () => {
transaction.execute();
setOpen(false);
};

const handleOpen = () => transaction.fee.estimate();

Expand Down

1 comment on commit fedd584

@vercel
Copy link

@vercel vercel bot commented on fedd584 Nov 16, 2023

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.