From 500c21bd894e5ca1e477642447e0fdd9e86cb2c7 Mon Sep 17 00:00:00 2001 From: devchenyan Date: Sat, 11 Jan 2025 21:17:19 +0800 Subject: [PATCH] fix: comment --- packages/neuron-wallet/src/services/transaction-sender.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/packages/neuron-wallet/src/services/transaction-sender.ts b/packages/neuron-wallet/src/services/transaction-sender.ts index d413f90fd..458b4c3eb 100644 --- a/packages/neuron-wallet/src/services/transaction-sender.ts +++ b/packages/neuron-wallet/src/services/transaction-sender.ts @@ -332,6 +332,8 @@ export default class TransactionSender { for (const lockHash of lockHashes) { const multisigConfig = multisigConfigMap[lockHash] if (!multisigConfig) { + const BLOCK_UNRECOGNIZED = 0 + const IGNORE_UNRECOGNIZED_AND_CONTINUE = 1 const res = await dialog.showMessageBox({ type: 'warning', message: t('messageBox.unrecognized-lock-script.message'), @@ -339,10 +341,10 @@ export default class TransactionSender { t('messageBox.unrecognized-lock-script.buttons.cancel'), t('messageBox.unrecognized-lock-script.buttons.ignore'), ], - defaultId: 0, - cancelId: 1, + defaultId: BLOCK_UNRECOGNIZED, + cancelId: IGNORE_UNRECOGNIZED_AND_CONTINUE, }) - if (res.response === 1) { + if (res.response === IGNORE_UNRECOGNIZED_AND_CONTINUE) { continue } throw new MultisigConfigNeedError()