small fixes

This commit is contained in:
Ricardo Guilherme Schmidt 2019-03-29 07:16:42 -03:00
parent e4e3cc36c5
commit da41cb4091
No known key found for this signature in database
GPG Key ID: BFB3F5C8ED618A94
3 changed files with 7 additions and 7 deletions

View File

@ -42,10 +42,10 @@ class MSWConfirmation extends React.Component {
try {
const toSend = accountConfirmed ? mswInstance.methods.revokeConfirmation(transactionId) : mswInstance.methods.confirmTransaction(transactionId);
const estimatedGas = await toSend.estimateGas({from: web3.eth.defaultAccount});
const toSend = accountConfirmed ? this.state.mswInstance.methods.revokeConfirmation(transactionId) : this.state.mswInstance.methods.confirmTransaction(transactionId);
const estimatedGas = await toSend.estimateGas({from: this.state.account});
const receipt = await toSend.send({
from: web3.eth.defaultAccount,
from: this.state.account,
gasLimit: estimatedGas
});

View File

@ -45,8 +45,8 @@ class MSWAddOwner extends React.Component {
const toSend = this.state.mswInstance.methods.addOwner(input.owner);
const MsSend = this.state.mswInstance.submitTransaction(
this.state.mswInstance._address, 0, toSend.encodeABI
const MsSend = this.state.mswInstance.methods.submitTransaction(
this.state.mswInstance._address, 0, toSend.encodeABI()
)
const estimatedGas = await MsSend.estimateGas({from: this.state.account});

View File

@ -30,8 +30,8 @@ class MSWOwnerTable extends React.Component {
try {
const toSend = this.state.mswInstance.methods.removeOwner(account);
const MsSend = this.state.mswInstance.submitTransaction(
this.state.mswInstance._address, 0, toSend.encodeABI
const MsSend = this.state.mswInstance.methods.submitTransaction(
this.state.mswInstance._address, 0, toSend.encodeABI()
)
const estimatedGas = await MsSend.estimateGas({from: this.state.account});