Skip to content

Commit

Permalink
Disable tx creation while catalyst registration is being submitted
Browse files Browse the repository at this point in the history
  • Loading branch information
refi93 committed Sep 14, 2021
1 parent 0316c9a commit 607cecd
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions app/frontend/components/pages/voting/transactionPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import Alert from '../../common/alert'
import VotingDialogBottom from './votingDialogBottom'
import styles from './voting.module.scss'
import {WalletOperationStatusType} from '../dashboard/walletOperationStatus'
import {shouldDisableSendingButton} from '../../../helpers/common'

const TransactionPage = ({
nextStep,
Expand All @@ -17,7 +18,7 @@ const TransactionPage = ({
votingPublicKey: HexString
}): h.JSX.Element => {
const {registerVotingKey} = useActions(actions)
const {txSuccessTab} = useSelector((state) => ({
const {txSuccessTab, walletOperationStatusType} = useSelector((state) => ({
txSuccessTab: state.txSuccessTab,
walletOperationStatusType: state.walletOperationStatusType,
}))
Expand All @@ -42,7 +43,9 @@ const TransactionPage = ({
<div className={styles.reviewTransactionRow}>
<button
className="button primary"
disabled={txSuccessTab === 'voting'}
disabled={
txSuccessTab === 'voting' || shouldDisableSendingButton(walletOperationStatusType)
}
onClick={submitHandler}
data-cy="VotingReviewTransactionBtn"
>
Expand Down

0 comments on commit 607cecd

Please sign in to comment.