From 79d210b303f18f513b1eba98cbf23a65f6bfbf1c Mon Sep 17 00:00:00 2001 From: d11e9 Date: Fri, 9 Oct 2015 15:34:43 +0100 Subject: [PATCH] wiring txorigin into select dropdown --- assets/css/browser-solidity.css | 1 - index.html | 37 ++++++++++++++++++--------------- 2 files changed, 20 insertions(+), 18 deletions(-) diff --git a/assets/css/browser-solidity.css b/assets/css/browser-solidity.css index 6362b9556e..5ab7cb2b25 100644 --- a/assets/css/browser-solidity.css +++ b/assets/css/browser-solidity.css @@ -142,7 +142,6 @@ body { padding: 1em; } #header #optionViews > div { - margin-top: 1em; display: none; } #header #optionViews.txView #txView { display: block; } diff --git a/index.html b/index.html index 7e3910ad08..9283dfced4 100644 --- a/index.html +++ b/index.html @@ -74,12 +74,10 @@ THE SOFTWARE.
- tx.origin: - - - + + + +
Solidity version: (loading)
Change to:
@@ -649,17 +647,22 @@ THE SOFTWARE. }}); var $contractOutput = dapp.render(); - if (executionContext === 'vm') - $('#txorigin').text('0x' + dapp.address.toString('hex')); - else - web3.eth.getAccounts(function(err, accounts) { - if (err) - renderError(err.message); - if (accounts && accounts[0]) - $('#txorigin').text(accounts[0]); - else - $('#txorigin').text('unknown'); - }); + + $txOrigin = $('#txorigin'); + if (executionContext === 'vm') { + $txOrigin.empty(); + var addr = '0x' + dapp.address.toString('hex'); + $txOrigin.val(addr); + $txOrigin.append($('