add hexToDecimal conversion

This commit is contained in:
Barry Gitarts 2019-01-11 10:45:19 -05:00
parent 81ca3ffa31
commit 67084487f0
1 changed files with 2 additions and 1 deletions

View File

@ -22,11 +22,12 @@ const lookups = {
}
}
const hexToDecimal = hex => Number(parseInt(hex, 16))
const formatVaultEvent = async event => {
const { returnValues } = event
return {
...returnValues,
ref: Number(returnValues.ref.slice(2))
ref: hexToDecimal(returnValues.ref)
}
}