From 67084487f0a11735741bbff0d2256766ae9a0eda Mon Sep 17 00:00:00 2001 From: Barry Gitarts Date: Fri, 11 Jan 2019 10:45:19 -0500 Subject: [PATCH] add hexToDecimal conversion --- app/utils/events.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/utils/events.js b/app/utils/events.js index 3d19a39..9bd71b6 100644 --- a/app/utils/events.js +++ b/app/utils/events.js @@ -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) } }