Skip to content

Commit 86d8056

Browse files
committed
showing error on gov tools tab
1 parent 81227f5 commit 86d8056

File tree

1 file changed

+9
-7
lines changed

1 file changed

+9
-7
lines changed

src/components/cards/cip95BuildSignSubmitCard.js

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,12 @@ const Cip95BuildSignSubmitCard = (props) => {
1717
const {setCertBuilder, setVotingBuilder} = setters
1818
const {certBuilder, votingBuilder, changeAddress, usedAddress, totalRefunds, hexUtxos} = getters
1919

20+
const errorHappen = (errorMessage) => {
21+
onWaiting(false)
22+
onError()
23+
console.error(errorMessage)
24+
}
25+
2026
const buildSignSubmit = () => {
2127
onWaiting(true)
2228
try {
@@ -69,20 +75,16 @@ const Cip95BuildSignSubmitCard = (props) => {
6975
console.log('The transaction is sent:', txId)
7076
})
7177
.catch((e) => {
72-
onWaiting(false)
73-
console.log(e)
78+
errorHappen(e)
7479
})
7580
})
7681
.catch((e) => {
77-
onWaiting(false)
78-
console.log(e)
82+
errorHappen(e)
7983
})
8084

8185
onWaiting(false)
8286
} catch (e) {
83-
console.error(e)
84-
onError()
85-
onWaiting(false)
87+
errorHappen(e)
8688
}
8789
}
8890

0 commit comments

Comments
 (0)