From aa4bc0fe4d57020a739fdcc4598e9c4a983f90e8 Mon Sep 17 00:00:00 2001 From: emizzle Date: Thu, 11 Oct 2018 16:34:17 +1100 Subject: [PATCH] Fix for logs showing a string as an array Some strings were being logged as ``` [w,r,i,t,i,n,g, ,f,i,l,e, ,,[,2,m,,[,1,m,.,e,m,b,a,r,k,/,s,t,a,t,s,.,r,e,p,o,r,t,,[,2,2,m,,[,2,2,m] ``` The fix was applied to the `normalizeInput` method which simply returns if the input was a `typeof` string. --- lib/utils/utils.js | 1 + 1 file changed, 1 insertion(+) diff --git a/lib/utils/utils.js b/lib/utils/utils.js index 34ffe50ef..fb8875c50 100644 --- a/lib/utils/utils.js +++ b/lib/utils/utils.js @@ -326,6 +326,7 @@ function soliditySha3(arg) { } function normalizeInput(input) { + if(typeof input === 'string') return input; let args = Object.values(input); if (args.length === 0) { return "";