diff --git a/src/app.js b/src/app.js index a3132352d2..017e1d3b05 100644 --- a/src/app.js +++ b/src/app.js @@ -241,9 +241,9 @@ var run = function() { return $('
  • '+name+'
  • '); } - $filesWrapper = $('.files-wrapper'); - $scrollerRight = $('.scroller-right'); - $scrollerLeft = $('.scroller-left'); + var $filesWrapper = $('.files-wrapper'); + var $scrollerRight = $('.scroller-right'); + var $scrollerLeft = $('.scroller-left'); function widthOfList (){ var itemsWidth = 0; diff --git a/src/app/compiler.js b/src/app/compiler.js index 11d35dbafd..2f0e800019 100644 --- a/src/app/compiler.js +++ b/src/app/compiler.js @@ -161,6 +161,7 @@ function Compiler(web3, editor, handleGithubCall, outputField, hidingRHP, update } var importRegex = /^\s*import\s*[\'\"]([^\'\"]+)[\'\"];/g; var reloop = false; + var githubMatch; do { reloop = false; for (var fileName in files) { diff --git a/src/app/renderer.js b/src/app/renderer.js index 90640a9286..b3a8700b5b 100644 --- a/src/app/renderer.js +++ b/src/app/renderer.js @@ -121,7 +121,7 @@ function Renderer(web3, editor, compiler, updateFiles) { var $contractOutput = dapp.render(); - $txOrigin = $('#txorigin'); + var $txOrigin = $('#txorigin'); function renderAccounts(err, accounts) { if (err) @@ -188,13 +188,14 @@ function Renderer(web3, editor, compiler, updateFiles) { var formatGasEstimates = function(data) { var gasToText = function(g) { return g === null ? 'unknown' : g; } var text = ''; + var fun; if ('creation' in data) text += 'Creation: ' + gasToText(data.creation[0]) + ' + ' + gasToText(data.creation[1]) + '\n'; text += 'External:\n'; - for (var fun in data.external) + for (fun in data.external) text += ' ' + fun + ': ' + gasToText(data.external[fun]) + '\n'; text += 'Internal:\n'; - for (var fun in data.internal) + for (fun in data.internal) text += ' ' + fun + ': ' + gasToText(data.internal[fun]) + '\n'; return text; }; diff --git a/src/universal-dapp.js b/src/universal-dapp.js index f44695b801..0122aab6fb 100644 --- a/src/universal-dapp.js +++ b/src/universal-dapp.js @@ -97,7 +97,7 @@ UniversalDApp.prototype.render = function () { this.$el.append(this.renderOutputModifier(this.contracts[c].name, $contractEl)); } } - $legend = $('
    ') + var $legend = $('
    ') .append( $('
    ').text('Attach') ) .append( $('
    ').text('Transact') ) .append( $('
    ').text('Call') ); @@ -183,13 +183,14 @@ UniversalDApp.prototype.getInstanceInterface = function (contract, address, $tar $instance.toggleClass('hide'); }); - $events = $('
    '); + var $events = $('
    '); var parseLogs = function(err,response) { if (err) return; - $event = $('
    '); + var $event = $('
    '); + var $close = $('
    '); $close.click( function(){ $event.remove(); } ); @@ -562,8 +563,9 @@ UniversalDApp.prototype.runTx = function( data, args, cb) { } } + var tx; if (!this.vm) { - var tx = { + tx = { from: self.options.getAddress ? self.options.getAddress() : web3.eth.accounts[0], to: to, data: data, @@ -583,7 +585,7 @@ UniversalDApp.prototype.runTx = function( data, args, cb) { try { var address = this.options.getAddress ? this.options.getAddress() : this.getAccounts()[0]; var account = this.accounts[address]; - var tx = new EthJSTX({ + tx = new EthJSTX({ nonce: new Buffer([account.nonce++]), //@todo count beyond 255 gasPrice: 1, gasLimit: 3000000000, //plenty