Comparing version 4.1.5 to 4.1.6
@@ -143,4 +143,4 @@ "use strict"; | ||
`what's needed (${args.depositTokenUser}), approving more`); | ||
const gasLimit = lib_1.toBN(Math.ceil((yield token.estimate.approve(prev.contractAddress, args.depositTokenUser)).toNumber() * 1.5)); | ||
const approveTx = yield token.approve(prev.contractAddress, args.depositTokenUser, { gasLimit, gasPrice }); | ||
const gasLimit = lib_1.toBN(Math.ceil((yield token.estimate.approve(prev.contractAddress, ethers_1.ethers.constants.MaxUint256)).toNumber() * 1.5)); | ||
const approveTx = yield token.approve(prev.contractAddress, ethers_1.ethers.constants.MaxUint256, { gasLimit, gasPrice }); | ||
yield this.connext.wallet.provider.waitForTransaction(approveTx.hash); | ||
@@ -147,0 +147,0 @@ } |
{ | ||
"name": "connext", | ||
"description": "Shared code between wallet and hub", | ||
"version": "4.1.5", | ||
"version": "4.1.6", | ||
"main": "dist/index.js", | ||
@@ -6,0 +6,0 @@ "types": "types/index.d.ts", |
@@ -181,7 +181,7 @@ import { ethers as eth } from 'ethers' | ||
const gasLimit = toBN(Math.ceil(( | ||
await token.estimate.approve(prev.contractAddress, args.depositTokenUser) | ||
await token.estimate.approve(prev.contractAddress, eth.constants.MaxUint256) | ||
).toNumber() * 1.5)) | ||
const approveTx = await token.approve( | ||
prev.contractAddress, args.depositTokenUser, { gasLimit, gasPrice }, | ||
prev.contractAddress, eth.constants.MaxUint256, { gasLimit, gasPrice }, | ||
) | ||
@@ -188,0 +188,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1611124
254