|
|
|
@ -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) { |
|
|
|
|