Skip to content

Commit

Permalink
Fix unit test helper method packSignatures
Browse files Browse the repository at this point in the history
  • Loading branch information
patitonar committed Aug 22, 2019
1 parent b6f06e4 commit 6f8221a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions test/helpers/helpers.js
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,8 @@ function signatureToVRSAMB(rawSignature) {
module.exports.signatureToVRSAMB = signatureToVRSAMB

function packSignatures(array) {
const length = web3.utils.toHex(array.length)
const length = strip0x(web3.utils.toHex(array.length))
const msgLength = length.length === 1 ? `0${length}` : length
let v = ''
let r = ''
let s = ''
Expand All @@ -64,8 +65,7 @@ function packSignatures(array) {
r = r.concat(e.r)
s = s.concat(e.s)
})

return `${length}${v}${r}${s}`
return `0x${msgLength}${v}${r}${s}`
}
module.exports.packSignatures = packSignatures

Expand Down

0 comments on commit 6f8221a

Please sign in to comment.