@super-protocol/sdk-js 0.11.9-beta.0 → 0.11.9-beta.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -129,7 +129,19 @@ var TxManager = /** @class */ (function () {
129
129
  estimatedGas = constants_1.defaultGasLimit;
130
130
  return [3 /*break*/, 5];
131
131
  case 5:
132
- txData.gas = Math.ceil(estimatedGas * store_1.default.gasLimitMultiplier);
132
+ txData.gas = estimatedGas;
133
+ txData.gas = Math.ceil(txData.gas * store_1.default.gasLimitMultiplier);
134
+ // defaultGasLimit is max gas limit
135
+ txData.gas = txData.gas < constants_1.defaultGasLimit ? txData.gas : constants_1.defaultGasLimit;
136
+ if (options.gas) {
137
+ if (options.gas < estimatedGas) {
138
+ TxManager.logger.warn({
139
+ estimated: estimatedGas,
140
+ specified: options.gas,
141
+ }, "Fail to calculate estimated gas");
142
+ }
143
+ txData.gas = options.gas;
144
+ }
133
145
  _a.label = 6;
134
146
  case 6:
135
147
  if (!(!(0, utils_1.checkForUsingExternalTxManager)(transactionOptions) && this.nonceTrackers[options.from])) return [3 /*break*/, 8];
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@super-protocol/sdk-js",
3
- "version": "0.11.9-beta.0",
3
+ "version": "0.11.9-beta.1",
4
4
  "main": "build/index.js",
5
5
  "license": "MIT",
6
6
  "files": [