|
|
@ -16,7 +16,6 @@ export class TxRunnerWeb3 { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
_executeTx (tx, network, txFee, api, promptCb, callback) { |
|
|
|
_executeTx (tx, network, txFee, api, promptCb, callback) { |
|
|
|
console.log('tx: ', tx) |
|
|
|
|
|
|
|
if (network && network.lastBlock && network.lastBlock.baseFeePerGas) { |
|
|
|
if (network && network.lastBlock && network.lastBlock.baseFeePerGas) { |
|
|
|
// the sending stack (web3.js / metamask need to have the type defined)
|
|
|
|
// the sending stack (web3.js / metamask need to have the type defined)
|
|
|
|
// this is to avoid the following issue: https://github.com/MetaMask/metamask-extension/issues/11824
|
|
|
|
// this is to avoid the following issue: https://github.com/MetaMask/metamask-extension/issues/11824
|
|
|
@ -58,7 +57,6 @@ export class TxRunnerWeb3 { |
|
|
|
return new Promise(async (resolve, reject) => { |
|
|
|
return new Promise(async (resolve, reject) => { |
|
|
|
const receipt = await tryTillReceiptAvailable(resp, this.getWeb3()) |
|
|
|
const receipt = await tryTillReceiptAvailable(resp, this.getWeb3()) |
|
|
|
tx = await tryTillTxAvailable(resp, this.getWeb3()) |
|
|
|
tx = await tryTillTxAvailable(resp, this.getWeb3()) |
|
|
|
console.log(receipt, tx, receipt['transactionHash']) |
|
|
|
|
|
|
|
resolve({ |
|
|
|
resolve({ |
|
|
|
receipt, |
|
|
|
receipt, |
|
|
|
tx, |
|
|
|
tx, |
|
|
@ -82,9 +80,6 @@ export class TxRunnerWeb3 { |
|
|
|
data = '0x' + data |
|
|
|
data = '0x' + data |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
console.log('data: ', data) |
|
|
|
|
|
|
|
console.log('args: ', args) |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return this.runInNode(args.from, args.to, data, args.value, args.gasLimit, args.useCall, args.timestamp, confirmationCb, gasEstimationForceSend, promptCb, callback) |
|
|
|
return this.runInNode(args.from, args.to, data, args.value, args.gasLimit, args.useCall, args.timestamp, confirmationCb, gasEstimationForceSend, promptCb, callback) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -117,17 +112,10 @@ export class TxRunnerWeb3 { |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
if (this._api.config.getUnpersistedProperty('doNotShowTransactionConfirmationAgain')) { |
|
|
|
if (this._api.config.getUnpersistedProperty('doNotShowTransactionConfirmationAgain')) { |
|
|
|
console.log('tx: ', tx) |
|
|
|
|
|
|
|
console.log('network: ', network) |
|
|
|
|
|
|
|
console.log('this._api: ', this._api) |
|
|
|
|
|
|
|
return this._executeTx(tx, network, null, this._api, promptCb, callback) |
|
|
|
return this._executeTx(tx, network, null, this._api, promptCb, callback) |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
confirmCb(network, tx, tx['gas'], (txFee) => { |
|
|
|
confirmCb(network, tx, tx['gas'], (txFee) => { |
|
|
|
console.log('tx: ', tx) |
|
|
|
|
|
|
|
console.log('network: ', network) |
|
|
|
|
|
|
|
console.log('txFee: ', txFee) |
|
|
|
|
|
|
|
console.log('this._api: ', this._api) |
|
|
|
|
|
|
|
return this._executeTx(tx, network, txFee, this._api, promptCb, callback) |
|
|
|
return this._executeTx(tx, network, txFee, this._api, promptCb, callback) |
|
|
|
}, (error) => { |
|
|
|
}, (error) => { |
|
|
|
callback(error) |
|
|
|
callback(error) |
|
|
|