Skip to content

Commit

Permalink
fix: replace with empty string in input group rename witness
Browse files Browse the repository at this point in the history
  • Loading branch information
classicalliu committed Nov 8, 2019
1 parent e1064d4 commit 5d59f3d
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions packages/neuron-wallet/src/services/wallets.ts
Original file line number Diff line number Diff line change
Expand Up @@ -393,15 +393,15 @@ export default class WalletService {
witnessesArgs[0].witnessArgs.lock = '0x' + '0'.repeat(130)

const privateKey = findPrivateKey(witnessesArgs[0].blake160)
const signedWitness = core.signWitnesses(privateKey)({
const signed = core.signWitnesses(privateKey)({
transactionHash: txHash,
witnesses: witnessesArgs.map(w => w.witnessArgs)
})[0] as string
witnesses: [witnessesArgs[0].witnessArgs, ...Array.from({length: witnessesArgs.length - 1}).map(() => '0x')]
})
const signedWitness = signed[0] as string

for (const w of witnessSigningEntries) {
if (w.lockHash === lockHash) {
w.witness = '0x'
}
const entires = witnessSigningEntries.filter(e => e.lockHash === lockHash)
for (let i = 0; i < entires.length; ++i) {
entires[i].witness = signed[i] as string
}
witnessSigningEntries[firstIndex].witness = signedWitness
}
Expand Down

0 comments on commit 5d59f3d

Please sign in to comment.