Commit 8a91fe74 authored by d11e9's avatar d11e9

fix dapp.address bug on context toggle

parent d885fba8
...@@ -517,7 +517,7 @@ THE SOFTWARE. ...@@ -517,7 +517,7 @@ THE SOFTWARE.
.append(textRow('uDApp', combined(contractName,contract['interface'],contract.bytecode), 'deploy')) .append(textRow('uDApp', combined(contractName,contract['interface'],contract.bytecode), 'deploy'))
.append(getDetails(contract, source, contractName)); .append(getDetails(contract, source, contractName));
if (executionContext == 'vm') $('#txorigin').text('0x' + dapp.address.toString('hex')); if (executionContext === 'vm') $('#txorigin').text('0x' + dapp.address.toString('hex'));
else web3.eth.getAccounts( function(err,accounts) { else web3.eth.getAccounts( function(err,accounts) {
$('#txorigin').text(accounts[0]); $('#txorigin').text(accounts[0]);
}); });
......
...@@ -3,7 +3,7 @@ function UniversalDApp (contracts, options) { ...@@ -3,7 +3,7 @@ function UniversalDApp (contracts, options) {
this.$el = $('<div class="udapp" />'); this.$el = $('<div class="udapp" />');
this.contracts = contracts; this.contracts = contracts;
if (web3.currentProvider) { if (!options.vm && web3.currentProvider) {
} else if (options.vm) { } else if (options.vm) {
this.stateTrie = new EthVm.Trie(); this.stateTrie = new EthVm.Trie();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment