|
|
@ -1,7 +1,7 @@ |
|
|
|
var $ = require('jquery') |
|
|
|
var $ = require('jquery') |
|
|
|
var yo = require('yo-yo') |
|
|
|
var yo = require('yo-yo') |
|
|
|
var EventManager = require('../../lib/events') |
|
|
|
var EventManager = require('../../lib/events') |
|
|
|
var globlalRegistry = require('../../global/registry') |
|
|
|
var globalRegistry = require('../../global/registry') |
|
|
|
var executionContext = require('../../execution-context') |
|
|
|
var executionContext = require('../../execution-context') |
|
|
|
var Card = require('../ui/card') |
|
|
|
var Card = require('../ui/card') |
|
|
|
var css = require('./styles/run-tab-styles') |
|
|
|
var css = require('./styles/run-tab-styles') |
|
|
@ -15,7 +15,9 @@ var ContractDropdownUI = require('./runTab/contractDropdown.js') |
|
|
|
var Recorder = require('./runTab/model/recorder.js') |
|
|
|
var Recorder = require('./runTab/model/recorder.js') |
|
|
|
var RecorderUI = require('./runTab/recorder.js') |
|
|
|
var RecorderUI = require('./runTab/recorder.js') |
|
|
|
|
|
|
|
|
|
|
|
function runTab (opts, localRegistry) { |
|
|
|
class RunTab { |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
constructor (opts, localRegistry) { |
|
|
|
var self = this |
|
|
|
var self = this |
|
|
|
self.event = new EventManager() |
|
|
|
self.event = new EventManager() |
|
|
|
self._view = {} |
|
|
|
self._view = {} |
|
|
@ -25,7 +27,7 @@ function runTab (opts, localRegistry) { |
|
|
|
another environment. e.g Transactions created in Javascript VM can be replayed in the Injected Web3.` |
|
|
|
another environment. e.g Transactions created in Javascript VM can be replayed in the Injected Web3.` |
|
|
|
} |
|
|
|
} |
|
|
|
self._components = {} |
|
|
|
self._components = {} |
|
|
|
self._components.registry = localRegistry || globlalRegistry |
|
|
|
self._components.registry = localRegistry || globalRegistry |
|
|
|
self._components.transactionContextAPI = { |
|
|
|
self._components.transactionContextAPI = { |
|
|
|
getAddress: (cb) => { |
|
|
|
getAddress: (cb) => { |
|
|
|
cb(null, $('#txorigin').val()) |
|
|
|
cb(null, $('#txorigin').val()) |
|
|
@ -184,9 +186,13 @@ function runTab (opts, localRegistry) { |
|
|
|
</div> |
|
|
|
</div> |
|
|
|
` |
|
|
|
` |
|
|
|
container.appendChild(el) |
|
|
|
container.appendChild(el) |
|
|
|
|
|
|
|
this.container = container |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
render () { |
|
|
|
|
|
|
|
return this.container |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
return { |
|
|
|
|
|
|
|
render () { return container }, |
|
|
|
|
|
|
|
profile () { |
|
|
|
profile () { |
|
|
|
return { |
|
|
|
return { |
|
|
|
name: 'run transactions', |
|
|
|
name: 'run transactions', |
|
|
@ -196,7 +202,6 @@ function runTab (opts, localRegistry) { |
|
|
|
description: 'execute and save transactions' |
|
|
|
description: 'execute and save transactions' |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
module.exports = runTab |
|
|
|
module.exports = RunTab |
|
|
|