Skip to content

Commit

Permalink
showing error on gov tools tab
Browse files Browse the repository at this point in the history
  • Loading branch information
Nebyt committed Aug 14, 2024
1 parent 81227f5 commit 86d8056
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions src/components/cards/cip95BuildSignSubmitCard.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,12 @@ const Cip95BuildSignSubmitCard = (props) => {
const {setCertBuilder, setVotingBuilder} = setters
const {certBuilder, votingBuilder, changeAddress, usedAddress, totalRefunds, hexUtxos} = getters

const errorHappen = (errorMessage) => {
onWaiting(false)
onError()
console.error(errorMessage)
}

const buildSignSubmit = () => {
onWaiting(true)
try {
Expand Down Expand Up @@ -69,20 +75,16 @@ const Cip95BuildSignSubmitCard = (props) => {
console.log('The transaction is sent:', txId)
})
.catch((e) => {
onWaiting(false)
console.log(e)
errorHappen(e)
})
})
.catch((e) => {
onWaiting(false)
console.log(e)
errorHappen(e)
})

onWaiting(false)
} catch (e) {
console.error(e)
onError()
onWaiting(false)
errorHappen(e)
}
}

Expand Down

0 comments on commit 86d8056

Please sign in to comment.