Fix amb packSignatures method in Oracle

This commit is contained in:
Gerardo Nardelli 2019-08-22 16:16:54 -03:00
parent 3ff096ef55
commit 411c35d873
2 changed files with 4 additions and 4 deletions

@ -98,7 +98,7 @@ function processCollectedSignaturesBuilder(config) {
throw e
}
}
const data = await foreignBridge.methods.executeSignatures(message, v, r, s).encodeABI()
const data = await foreignBridge.methods.executeSignatures(message, signatures).encodeABI()
const gasPriceOptions = generateGasPriceOptions({ dataType, gasPrice, gasPriceSpeed })
txToSend.push({
data,

@ -68,7 +68,8 @@ function signatureToVRSAMB(rawSignature) {
}
function packSignatures(array) {
const length = Web3Utils.toHex(array.length)
const length = strip0x(Web3Utils.toHex(array.length))
const msgLength = length.length === 1 ? `0${length}` : length
let v = ''
let r = ''
let s = ''
@ -77,8 +78,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 = {