Skip to content

Commit 49c2a32

Browse files
committed
addressing FTB-022 reported issue
1 parent af3014a commit 49c2a32

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

federator/src/lib/TransactionSender.js

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,8 +35,13 @@ module.exports = class TransactionSender {
3535
}
3636

3737
async getGasLimit(rawTx) {
38+
const chainId = await this.getChainId();
3839
let estimatedGas = await this.client.eth.estimateGas({ gasPrice: rawTx.gasPrice, value: rawTx.value, to: rawTx.to, data: rawTx.data, from: rawTx.from});
39-
estimatedGas = (estimatedGas < 300000) ? 300000 : 3500000;
40+
41+
if (chainId >= 30 && chainId <= 33) {
42+
estimatedGas = (estimatedGas < 300000) ? 300000 : 3500000;
43+
}
44+
4045
return estimatedGas;
4146
}
4247

0 commit comments

Comments
 (0)