fix: handle failed to parse psbt
This commit is contained in:
parent
ae479ee0d0
commit
73265a9951
|
@ -338,14 +338,34 @@ async function serialSigner(path) {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
handleSendPsbtResponse: function (res = '') {
|
handleSendPsbtResponse: function (res = '') {
|
||||||
this.hww.confirm.outputIndex = 0
|
try {
|
||||||
this.hww.showConfirmationDialog = true
|
const psbtOK = res.trim() === '1'
|
||||||
this.hww.confirm = {
|
if (!psbtOK) {
|
||||||
outputIndex: 0,
|
this.$q.notify({
|
||||||
showFee: false
|
type: 'warning',
|
||||||
|
message: 'Failed to send PSBT!',
|
||||||
|
caption: `${res}`,
|
||||||
|
timeout: 10000
|
||||||
|
})
|
||||||
|
return
|
||||||
|
}
|
||||||
|
this.hww.confirm.outputIndex = 0
|
||||||
|
this.hww.showConfirmationDialog = true
|
||||||
|
this.hww.confirm = {
|
||||||
|
outputIndex: 0,
|
||||||
|
showFee: false
|
||||||
|
}
|
||||||
|
this.hww.sendingPsbt = false
|
||||||
|
} catch (error) {
|
||||||
|
this.$q.notify({
|
||||||
|
type: 'warning',
|
||||||
|
message: 'Failed to send PSBT!',
|
||||||
|
caption: `${error}`,
|
||||||
|
timeout: 10000
|
||||||
|
})
|
||||||
|
} finally {
|
||||||
|
this.psbtSentResolve()
|
||||||
}
|
}
|
||||||
this.hww.sendingPsbt = false
|
|
||||||
this.psbtSentResolve()
|
|
||||||
},
|
},
|
||||||
hwwSignPsbt: async function () {
|
hwwSignPsbt: async function () {
|
||||||
try {
|
try {
|
||||||
|
|
|
@ -209,7 +209,7 @@ async function walletList(path) {
|
||||||
wallet.address_no = addressData.addressIndex
|
wallet.address_no = addressData.addressIndex
|
||||||
this.$emit('new-receive-address', addressData)
|
this.$emit('new-receive-address', addressData)
|
||||||
},
|
},
|
||||||
showAddAccountDialog: function() {
|
showAddAccountDialog: function () {
|
||||||
this.formDialog.show = true
|
this.formDialog.show = true
|
||||||
this.formDialog.useSerialPort = false
|
this.formDialog.useSerialPort = false
|
||||||
},
|
},
|
||||||
|
|
Loading…
Reference in New Issue
Block a user