From 5a31c5cd158bce697e1176d8e547236cae97de5a Mon Sep 17 00:00:00 2001 From: ninabreznik Date: Tue, 29 Aug 2017 18:16:36 +0100 Subject: [PATCH] Display strings --- src/app/tabs/compile-tab.js | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/src/app/tabs/compile-tab.js b/src/app/tabs/compile-tab.js index 6da4e91508..cd6fdc7228 100644 --- a/src/app/tabs/compile-tab.js +++ b/src/app/tabs/compile-tab.js @@ -339,7 +339,7 @@ function compileTab (container, appAPI, appEvents, opts) { log.appendChild(yo`
${x} ${copyDetails}
-
${JSON.stringify(details[x], null, 4)}
+ ${insertValue(details, x)}
`) }) @@ -347,6 +347,19 @@ function compileTab (container, appAPI, appEvents, opts) { } } + function insertValue(details, x) { + var value = yo`
`
+      console.log(x)
+      if (x ==='bytecode'||x ==='metadataHash'||x ==='swarmLocation'||x==='Runtime Bytecode'||x==='Opcodes') {
+        var node = yo`
${JSON.stringify((details[x].slice(1, 40)+'...'), null, 4)}
` + value.appendChild(node) + } else { + var node = yo`
${JSON.stringify(details[x], null, 4)}
` + value.appendChild(node) + } + return value + } + function publish (appAPI) { var selectContractNames = document.querySelector(`.${css.contractNames.classNames[0]}`) if (selectContractNames.children.length > 0 && selectContractNames.selectedIndex >= 0) {