set gaslimit in sendTransaction

pull/5370/head
yann300 8 months ago
parent 4a0ac52c82
commit c8d31e37ab
  1. 8
      apps/remix-ide/src/blockchain/blockchain.tsx

@ -39,7 +39,7 @@ export type Transaction = {
to: string
value: string
data: string
gasLimit: number
gasLimit: string
useCall: boolean
timestamp?: number
}
@ -779,6 +779,11 @@ export class Blockchain extends Plugin {
*/
sendTransaction(tx: Transaction) {
return new Promise((resolve, reject) => {
return this.transactionContextAPI.getGasLimit((err, value) => {
if (err) console.log('error resolving gas limit', err);
else {
tx.gasLimit = value;
}
this.executionContext.detectNetwork((error, network) => {
if (error) return reject(error)
if (network.name === 'Main' && network.id === '1') {
@ -814,6 +819,7 @@ export class Blockchain extends Plugin {
)
})
})
})
}
async runTx(args, confirmationCb, continueCb, promptCb, cb) {

Loading…
Cancel
Save