Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
devchenyan committed Jan 23, 2025
1 parent 56854e1 commit a89b064
Showing 1 changed file with 21 additions and 1 deletion.
22 changes: 21 additions & 1 deletion packages/neuron-wallet/src/services/transaction-sender.ts
Original file line number Diff line number Diff line change
Expand Up @@ -200,7 +200,27 @@ export default class TransactionSender {
// A 65-byte empty signature used as placeholder
witnessesArgs[0].witnessArgs.setEmptyLock()

const privateKey = findPrivateKey(witnessesArgs[0].lockArgs)
let privateKey = ''
try {
privateKey = findPrivateKey(witnessesArgs[0].lockArgs)
} catch (error) {
const BLOCK_UNRECOGNIZED = 0
const IGNORE_UNRECOGNIZED_AND_CONTINUE = 1
const res = await dialog.showMessageBox({
type: 'warning',
message: t('messageBox.unrecognized-lock-script.message'),
buttons: [
t('messageBox.unrecognized-lock-script.buttons.cancel'),
t('messageBox.unrecognized-lock-script.buttons.ignore'),
],
defaultId: BLOCK_UNRECOGNIZED,
cancelId: IGNORE_UNRECOGNIZED_AND_CONTINUE,
})
if (res.response === IGNORE_UNRECOGNIZED_AND_CONTINUE) {
continue
}
throw error
}

const serializedWitnesses: (WitnessArgs | string)[] = witnessesArgs.map((value: SignInfo, index: number) => {
const args = value.witnessArgs
Expand Down

1 comment on commit a89b064

@github-actions
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Packaging for test is done in 12923359048

Please sign in to comment.