Skip to content

Commit

Permalink
Handle error while signing cert tx
Browse files Browse the repository at this point in the history
  • Loading branch information
xdzurman committed Oct 27, 2020
1 parent 081124d commit 32b2682
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 8 deletions.
16 changes: 9 additions & 7 deletions app/frontend/actions.ts
Expand Up @@ -1251,13 +1251,15 @@ export default ({setState, getState}: {setState: SetStateFn; getState: GetStateF
},
})
} catch (e) {
} finally {
// setState({
// poolCertTxVars: {
// ...state.poolCertTxVars,
// shouldShowPoolCertSignModal: false,
// },
// })
debugLog(`Certificate transaction file signing failure: ${e}`)
stopLoadingAction(state, {})
setErrorState(
'poolRegTxError',
NamedError('TransactionRejectedWhileSigning', {
message: 'An unexpected error occured.',
})
)
resetPoolCertificateTxVars(state)
}
}

Expand Down
Expand Up @@ -88,7 +88,9 @@ const SignPoolCertTxModal = ({

export default connect(
(state) => ({
poolCert: state.poolCertTxVars.plan.certs[0].poolRegistrationParams,
poolCert: state.poolCertTxVars.plan
? state.poolCertTxVars.plan.certs[0].poolRegistrationParams
: {},
ttl: state.poolCertTxVars.ttl,
}),
actions
Expand Down

0 comments on commit 32b2682

Please sign in to comment.