fix linting issues; issue with deploy

pull/1/head
Iuri Matias 5 years ago
parent 8ccc4cddb2
commit c12bf91764
  1. 4
      src/app/tabs/runTab/contractDropdown.js
  2. 11
      src/app/tabs/runTab/model/dropdownlogic.js
  3. 2
      src/app/udapp/run-tab.js

@ -107,7 +107,7 @@ class ContractDropdownUI {
}
const selectedContract = this.getSelectedContract()
const clickCallback = (valArray, inputsValues) => {
const clickCallback = async (valArray, inputsValues) => {
var selectedContract = this.getSelectedContract()
this.createInstance(selectedContract, inputsValues)
}
@ -130,7 +130,7 @@ class ContractDropdownUI {
return this.dropdownLogic.getSelectedContract(contractName, compilerAtributeName)
}
createInstance (selectedContract, args) {
async createInstance (selectedContract, args) {
if (selectedContract.bytecodeObject.length === 0) {
return modalDialogCustom.alert('This contract may be abstract, not implement an abstract parent\'s methods completely or not invoke an inherited contract\'s constructor correctly.')
}

@ -149,7 +149,9 @@ class DropdownLogic {
)
}
determineGasFees(gasPrice, cb) {
// determineGasFees (gasPrice, cb) {
determineGasFees (tx) {
const determineGasFeesCb = (gasPrice, cb) => {
let txFeeText, priceStatus
// TODO: this try catch feels like an anti pattern, can/should be
// removed, but for now keeping the original logic
@ -164,6 +166,9 @@ class DropdownLogic {
cb(txFeeText, priceStatus)
}
return determineGasFeesCb
}
determineGasPrice (cb) {
this.getGasPrice((error, gasPrice) => {
var warnMessage = ' Please fix this issue before sending any transaction. '
@ -185,7 +190,7 @@ class DropdownLogic {
return continueTxExecution(null)
}
const amount = this.fromWei(tx.value, true, 'ether')
const content = confirmDialog(tx, amount, gasEstimation, null, this.determineGasFees, this.determineGasPrice)
const content = confirmDialog(tx, amount, gasEstimation, null, this.determineGasFees(tx), this.determineGasPrice)
modalDialog('Confirm transaction', content,
{ label: 'Confirm',
@ -219,7 +224,7 @@ class DropdownLogic {
return this.compilersArtefacts['__last'].getData().contracts
}
async deploContract (selectedContract, args, contractMetadata, compilerContracts, callbacks, dialogs) {
async deployContract (selectedContract, args, contractMetadata, compilerContracts, callbacks, dialogs) {
const {continueCb, promptCb, statusCb, finalCb} = callbacks
const {modalDialog, confirmDialog} = dialogs

@ -134,7 +134,7 @@ export class RunTab extends LibraryPlugin {
const dropdownLogic = new DropdownLogic(this.executionContext, compilersArtefacts, config, editor, udapp, this)
this.contractDropdownUI = new ContractDropdownUI(dropdownLogic, logCallback, this)
fileManager.events.on('currentFileChanged', contractDropdownUI.changeCurrentFile.bind(contractDropdownUI))
fileManager.events.on('currentFileChanged', this.contractDropdownUI.changeCurrentFile.bind(this.contractDropdownUI))
this.contractDropdownUI.event.register('clearInstance', () => {
const noInstancesText = this.noInstancesText

Loading…
Cancel
Save