rename UniversalDAppModel back to UniversalDApp

pull/1/head
Iuri Matias 7 years ago
parent 1f16aee752
commit 82344f222c
  1. 22
      src/universal-dapp.js

@ -16,7 +16,7 @@ var modalCustom = require('./app/ui/modal-dialog-custom')
/*
trigger debugRequested
*/
function UniversalDAppModel (opts = {}) {
function UniversalDApp (opts = {}) {
this.event = new EventManager()
var self = this
@ -29,7 +29,7 @@ function UniversalDAppModel (opts = {}) {
self.txRunner = new TxRunner({}, opts.api)
}
UniversalDAppModel.prototype.reset = function (contracts, transactionContextAPI) {
UniversalDApp.prototype.reset = function (contracts, transactionContextAPI) {
this.contracts = contracts
if (transactionContextAPI) {
this.transactionContextAPI = transactionContextAPI
@ -46,7 +46,7 @@ UniversalDAppModel.prototype.reset = function (contracts, transactionContextAPI)
this.txRunner = new TxRunner(this.accounts, this._api)
}
UniversalDAppModel.prototype.newAccount = function (password, cb) {
UniversalDApp.prototype.newAccount = function (password, cb) {
if (!executionContext.isVM()) {
if (!this._api.personalMode()) {
return cb('Not running in personal mode')
@ -68,7 +68,7 @@ UniversalDAppModel.prototype.newAccount = function (password, cb) {
}
}
UniversalDAppModel.prototype._addAccount = function (privateKey, balance) {
UniversalDApp.prototype._addAccount = function (privateKey, balance) {
var self = this
if (!executionContext.isVM()) {
@ -85,7 +85,7 @@ UniversalDAppModel.prototype._addAccount = function (privateKey, balance) {
}
}
UniversalDAppModel.prototype.getAccounts = function (cb) {
UniversalDApp.prototype.getAccounts = function (cb) {
var self = this
if (!executionContext.isVM()) {
@ -105,7 +105,7 @@ UniversalDAppModel.prototype.getAccounts = function (cb) {
}
}
UniversalDAppModel.prototype.getBalance = function (address, cb) {
UniversalDApp.prototype.getBalance = function (address, cb) {
var self = this
address = ethJSUtil.stripHexPrefix(address)
@ -186,15 +186,15 @@ UniversalDApp.prototype.context = function () {
return (executionContext.isVM() ? 'memory' : 'blockchain')
}
UniversalDAppModel.prototype.getABI = function (contract) {
UniversalDApp.prototype.getABI = function (contract) {
return txHelper.sortAbiFunction(contract.abi)
}
UniversalDAppModel.prototype.getFallbackInterface = function (contractABI) {
UniversalDApp.prototype.getFallbackInterface = function (contractABI) {
return txHelper.getFallbackInterface(contractABI)
}
UniversalDAppModel.prototype.getInputs = function (funABI) {
UniversalDApp.prototype.getInputs = function (funABI) {
if (!funABI.inputs) {
return ''
}
@ -211,7 +211,7 @@ function execute (pipeline, env, callback) {
next(null, env)
}
UniversalDAppModel.prototype.runTx = function (args, cb) {
UniversalDApp.prototype.runTx = function (args, cb) {
var self = this
var tx = { to: args.to, data: args.data.dataHex, useCall: args.useCall, from: args.from, value: args.value }
var payLoad = { funAbi: args.data.funAbi, funArgs: args.data.funArgs, contractBytecode: args.data.contractBytecode, contractName: args.data.contractName } // contains decoded parameters
@ -296,4 +296,4 @@ function runTransaction (env, next) {
})
}
module.exports = UniversalDAppModel
module.exports = UniversalDApp

Loading…
Cancel
Save