diff --git a/app/components/multisigwallet/confirmation.js b/app/components/multisigwallet/confirmation.js index d6b71c2..ed98cda 100644 --- a/app/components/multisigwallet/confirmation.js +++ b/app/components/multisigwallet/confirmation.js @@ -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 }); diff --git a/app/components/multisigwallet/owner-add.js b/app/components/multisigwallet/owner-add.js index 8dce4d4..0017986 100644 --- a/app/components/multisigwallet/owner-add.js +++ b/app/components/multisigwallet/owner-add.js @@ -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}); diff --git a/app/components/multisigwallet/owner-table.js b/app/components/multisigwallet/owner-table.js index 17e2ebd..ec7bedb 100644 --- a/app/components/multisigwallet/owner-table.js +++ b/app/components/multisigwallet/owner-table.js @@ -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});