From be876cc23812f5d110a6d7b45c8063eb085bc421 Mon Sep 17 00:00:00 2001 From: yann300 Date: Thu, 8 Jun 2017 14:18:20 +0200 Subject: [PATCH] copy address --- src/app/contract-tab.js | 20 ++++++++++++++++++-- 1 file changed, 18 insertions(+), 2 deletions(-) diff --git a/src/app/contract-tab.js b/src/app/contract-tab.js index 86835fbf38..ccd0eaa048 100644 --- a/src/app/contract-tab.js +++ b/src/app/contract-tab.js @@ -1,4 +1,5 @@ var yo = require('yo-yo') +const copy = require('clipboard-copy') // -------------- styling ---------------------- var csjs = require('csjs-inject') @@ -38,12 +39,26 @@ var css = csjs` display: block; margin: 4em 0 2em 0; } + .copyaddress { + color: #C6CFF7; + margin-right: 0.2em; + margin-top: 0.3em; + cursor: pointer; + } + .selectAddress extends ${styles.dropdown} { + width: 73.5%; + float: left; + text-align: center; + } ` module.exports = contractTab function contractTab () { - return yo` + function copyAddress () { + copy(document.querySelector('#envView #txorigin').value) + } + var el = yo`
@@ -73,7 +88,7 @@ function contractTab () {
Transaction origin
- +
Transaction gas limit
@@ -90,4 +105,5 @@ function contractTab () {
` + return el }