diff --git a/CHANGELOG.md b/CHANGELOG.md index aa52183..90485d2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -66,3 +66,7 @@ ### 1.1.3 (2022-12-14) - Removed the async declaration in the function `getBaseURL()` and `getRPCURL()`. + +### 1.1.4 (2022-12-14) + +- Output of the `approvalRawTransaction()` will be returned directly without the response object. diff --git a/package.json b/package.json index e0cfb2d..9aaec59 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@getsafle/1inch-controller", - "version": "1.1.3", + "version": "1.1.4", "description": "1inch controller for safle token swaps", "main": "src/index.js", "scripts": { diff --git a/src/index.js b/src/index.js index e6d0c5b..296531a 100644 --- a/src/index.js +++ b/src/index.js @@ -81,7 +81,7 @@ class OneInch { async approvalRawTransaction({ fromContractAddress, walletAddress, fromQuantity }) { { if (fromContractAddress.toLowerCase() === config.ETHEREUM_ADDRESS.toLowerCase()) { - return { response: true } + return true } const web3Provider = new ethers.providers.JsonRpcProvider(this.rpcUrl); const contract = new Contract(fromContractAddress, TOKEN_CONTRACT_ABI, web3Provider); @@ -101,10 +101,10 @@ class OneInch { response.from = walletAddress; response.gas = web3Utils.hexToNumber((await contract.estimateGas.approve(config.SWAP_ROUTER_ADDRESS, fromQuantity, { from: walletAddress }))._hex); - return { response }; + return response; } else - return { response: true } + return true } } }