diff --git a/app/components/candidates/Apply.vue b/app/components/candidates/Apply.vue index 86001bd1..bbdb4d6a 100644 --- a/app/components/candidates/Apply.vue +++ b/app/components/candidates/Apply.vue @@ -136,6 +136,7 @@ import { import coinbaseAddress from '../../../validators/coinbaseAddress.js' // import nodeUrl from '../../../validators/nodeUrl.js' import NumberInput from '../NumberInput.vue' +import BigNumber from 'bignumber.js' import store from 'store' import VueQrcode from '@chenfengyuan/vue-qrcode' import axios from 'axios' @@ -287,9 +288,9 @@ export default { let contract = await self.getTomoValidatorInstance() let txParams = { from : self.account, - value: parseFloat(value) * 10 ** 18, - gasPrice: 2500, - gas: 2000000 + value: self.web3.utils.toHex(new BigNumber(value).multipliedBy(10 ** 18).toString(10)), + gasPrice: self.web3.utils.toHex(2500), + gas: self.web3.utils.toHex(2000000) } let rs if (self.NetworkProvider === 'ledger') { diff --git a/app/components/candidates/Resign.vue b/app/components/candidates/Resign.vue index 7c4d6a26..8145c7c2 100644 --- a/app/components/candidates/Resign.vue +++ b/app/components/candidates/Resign.vue @@ -94,8 +94,8 @@ export default { let coinbase = self.coinbase let txParams = { from: account, - gasPrice: 2500, - gas: 2000000 + gasPrice: self.web3.utils.toHex(2500), + gas: self.web3.utils.toHex(2000000) } let rs if (self.NetworkProvider === 'ledger') { diff --git a/app/components/candidates/Withdraw.vue b/app/components/candidates/Withdraw.vue index abae2cd4..0fe58e84 100644 --- a/app/components/candidates/Withdraw.vue +++ b/app/components/candidates/Withdraw.vue @@ -179,8 +179,8 @@ export default { console.log('==>', blockNumber, index) let txParams = { from: account, - gasPrice: 2500, - gas: 2000000 + gasPrice: self.web3.utils.toHex(2500), + gas: self.web3.utils.toHex(2000000) } let wd if (self.NetworkProvider === 'ledger') { diff --git a/app/components/voters/Unvoting.vue b/app/components/voters/Unvoting.vue index a835f6e7..a53dc1e8 100644 --- a/app/components/voters/Unvoting.vue +++ b/app/components/voters/Unvoting.vue @@ -283,8 +283,8 @@ export default { let contract = await self.getTomoValidatorInstance() let txParams = { from: account, - gasPrice: 2500, - gas: 1000000 + gasPrice: self.web3.utils.toHex(2500), + gas: self.web3.utils.toHex(1000000) } let rs if (self.NetworkProvider === 'ledger') { diff --git a/app/components/voters/Voting.vue b/app/components/voters/Voting.vue index 5109aec7..cd55b586 100644 --- a/app/components/voters/Voting.vue +++ b/app/components/voters/Voting.vue @@ -282,9 +282,9 @@ export default { let contract = await self.getTomoValidatorInstance() let txParams = { from: account, - value: new BigNumber(this.voteValue).multipliedBy(10 ** 18).toNumber(), - gasPrice: 2500, - gas: 1000000 + value: self.web3.utils.toHex(new BigNumber(this.voteValue).multipliedBy(10 ** 18).toString(10)), + gasPrice: self.web3.utils.toHex(2500), + gas: self.web3.utils.toHex(1000000) } let rs if (self.NetworkProvider === 'ledger') {