File tree Expand file tree Collapse file tree 1 file changed +21
-1
lines changed
packages/neuron-wallet/src/services Expand file tree Collapse file tree 1 file changed +21
-1
lines changed Original file line number Diff line number Diff line change @@ -200,7 +200,27 @@ export default class TransactionSender {
200200 // A 65-byte empty signature used as placeholder
201201 witnessesArgs [ 0 ] . witnessArgs . setEmptyLock ( )
202202
203- const privateKey = findPrivateKey ( witnessesArgs [ 0 ] . lockArgs )
203+ let privateKey = ''
204+ try {
205+ privateKey = findPrivateKey ( witnessesArgs [ 0 ] . lockArgs )
206+ } catch ( error ) {
207+ const BLOCK_UNRECOGNIZED = 0
208+ const IGNORE_UNRECOGNIZED_AND_CONTINUE = 1
209+ const res = await dialog . showMessageBox ( {
210+ type : 'warning' ,
211+ message : t ( 'messageBox.unrecognized-lock-script.message' ) ,
212+ buttons : [
213+ t ( 'messageBox.unrecognized-lock-script.buttons.cancel' ) ,
214+ t ( 'messageBox.unrecognized-lock-script.buttons.ignore' ) ,
215+ ] ,
216+ defaultId : BLOCK_UNRECOGNIZED ,
217+ cancelId : IGNORE_UNRECOGNIZED_AND_CONTINUE ,
218+ } )
219+ if ( res . response === IGNORE_UNRECOGNIZED_AND_CONTINUE ) {
220+ continue
221+ }
222+ throw error
223+ }
204224
205225 const serializedWitnesses : ( WitnessArgs | string ) [ ] = witnessesArgs . map ( ( value : SignInfo , index : number ) => {
206226 const args = value . witnessArgs
You can’t perform that action at this time.
0 commit comments