fix dapp.address bug on context toggle

pull/1/head
d11e9 9 years ago
parent d885fba8ad
commit 8a91fe7447
  1. 2
      index.html
  2. 2
      libs/universal-dapp.js

@ -517,7 +517,7 @@ THE SOFTWARE.
.append(textRow('uDApp', combined(contractName,contract['interface'],contract.bytecode), 'deploy'))
.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) {
$('#txorigin').text(accounts[0]);
});

@ -3,7 +3,7 @@ function UniversalDApp (contracts, options) {
this.$el = $('<div class="udapp" />');
this.contracts = contracts;
if (web3.currentProvider) {
if (!options.vm && web3.currentProvider) {
} else if (options.vm) {
this.stateTrie = new EthVm.Trie();

Loading…
Cancel
Save