From e269a20c43979a710ec0ea08b961cb64991c7402 Mon Sep 17 00:00:00 2001 From: "Alt.D" Date: Thu, 17 Dec 2020 11:00:45 +0800 Subject: [PATCH] (feat) Set approval gas limit to 50000 --- src/services/eth.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/services/eth.js b/src/services/eth.js index 1c1f286..cb3151a 100644 --- a/src/services/eth.js +++ b/src/services/eth.js @@ -65,7 +65,7 @@ export default class Ethereum { } // approve a spender to transfer tokens from a wallet address - async approveERC20 (wallet, spender, tokenAddress, amount, gasPrice = this.gasPrice, gasLimit = this.approvalGasLimit) { + async approveERC20 (wallet, spender, tokenAddress, amount, gasPrice = this.gasPrice, gasLimit = 50000) { try { // instantiate a contract and pass in wallet, which act on behalf of that signer const contract = new ethers.Contract(tokenAddress, abi.ERC20Abi, wallet)