File tree Expand file tree Collapse file tree
packages/neuron-wallet/src/services Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -393,15 +393,15 @@ export default class WalletService {
393393 witnessesArgs [ 0 ] . witnessArgs . lock = '0x' + '0' . repeat ( 130 )
394394
395395 const privateKey = findPrivateKey ( witnessesArgs [ 0 ] . blake160 )
396- const signedWitness = core . signWitnesses ( privateKey ) ( {
396+ const signed = core . signWitnesses ( privateKey ) ( {
397397 transactionHash : txHash ,
398- witnesses : witnessesArgs . map ( w => w . witnessArgs )
399- } ) [ 0 ] as string
398+ witnesses : [ witnessesArgs [ 0 ] . witnessArgs , ...Array . from ( { length : witnessesArgs . length - 1 } ) . map ( ( ) => '0x' ) ]
399+ } )
400+ const signedWitness = signed [ 0 ] as string
400401
401- for ( const w of witnessSigningEntries ) {
402- if ( w . lockHash === lockHash ) {
403- w . witness = '0x'
404- }
402+ const entires = witnessSigningEntries . filter ( e => e . lockHash === lockHash )
403+ for ( let i = 0 ; i < entires . length ; ++ i ) {
404+ entires [ i ] . witness = signed [ i ] as string
405405 }
406406 witnessSigningEntries [ firstIndex ] . witness = signedWitness
407407 }
You can’t perform that action at this time.
0 commit comments