From 103f14455914e0d883212a3ec19f105d718be464 Mon Sep 17 00:00:00 2001 From: Rob Stupay Date: Fri, 25 May 2018 15:20:06 +0200 Subject: [PATCH] adding copy to clipboard without much instructions --- src/multiParamManager.js | 8 ++++++++ src/universal-dapp-styles.js | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/src/multiParamManager.js b/src/multiParamManager.js index 75ffc1f9fa..fe91f5d978 100644 --- a/src/multiParamManager.js +++ b/src/multiParamManager.js @@ -2,6 +2,9 @@ var yo = require('yo-yo') var css = require('./universal-dapp-styles') +var copyToClipboard = require('./app/ui/copy-to-clipboard') +var remixLib = require('remix-lib') +var txFormat = remixLib.execution.txFormat class MultiParamManager { @@ -147,6 +150,11 @@ class MultiParamManager { ${this.multiFields}
${button} + ${copyToClipboard(() => { + var multiString = this.getMultiValsString() + var multiJSON = JSON.parse('[' + multiString + ']') + return txFormat.encodeData(this.funABI, multiJSON) + })}
` diff --git a/src/universal-dapp-styles.js b/src/universal-dapp-styles.js index 924f579d1c..3ccca94d34 100644 --- a/src/universal-dapp-styles.js +++ b/src/universal-dapp-styles.js @@ -237,6 +237,11 @@ var css = csjs` border-bottom-right-radius: 0; border-right: 0; } + .contractActionsContainerMultiInner .multiArg i { + padding-right: 26px; + padding-top: 5px; + float: right; + } ` module.exports = css