@lifi/sdk
Advanced tools
Comparing version 1.0.0 to 1.0.1
@@ -5,2 +5,11 @@ # Changelog | ||
### [1.0.1](https://github.com/lifinance/sdk/compare/v1.0.0...v1.0.1) (2022-07-14) | ||
### Bug Fixes | ||
* adjust approval messages ([f445021](https://github.com/lifinance/sdk/commit/f445021761bda2e4fd1d7eab90f0a04be4827280)) | ||
* handle more multicall failure cases ([#86](https://github.com/lifinance/sdk/issues/86)) ([f7acaca](https://github.com/lifinance/sdk/commit/f7acaca2ab48f58844ec331cb207fa6592488fb1)) | ||
* publishing script ([8c2f12a](https://github.com/lifinance/sdk/commit/8c2f12a7ee091547980f7622ba34fde8d548f606)) | ||
## [1.0.0](https://github.com/lifinance/sdk/compare/v1.0.0-beta.14...v1.0.0) (2022-07-12) | ||
@@ -7,0 +16,0 @@ |
@@ -120,4 +120,4 @@ "use strict"; | ||
STARTED: 'Setting token allowance.', | ||
PENDING: 'Waiting for token allowance approval.', | ||
DONE: 'Token allowance approved.', | ||
PENDING: 'Waiting for token allowance.', | ||
DONE: 'Token allowance set.', | ||
}, | ||
@@ -124,0 +124,0 @@ SWITCH_CHAIN: { |
@@ -82,7 +82,21 @@ "use strict"; | ||
var success = _a.success, returnData = _a.returnData; | ||
if (success) { | ||
if (!success) { | ||
// requested function failed | ||
console.error("Multicall unsuccessful for address \"".concat(chunkedCalls[i].address, "\", ") + | ||
"function \"".concat(chunkedCalls[i].name, "\", chainId \"").concat(chainId, "\"")); | ||
return []; | ||
} | ||
if (returnData.toString() === '0x') { | ||
// requested function does probably not exist | ||
console.error("Multicall no response for address \"".concat(chunkedCalls[i].address, "\", ") + | ||
"function \"".concat(chunkedCalls[i].name, "\", chainId \"").concat(chainId, "\"")); | ||
return []; | ||
} | ||
try { | ||
return abiInterface.decodeFunctionResult(chunkedCalls[i].name, returnData); | ||
} | ||
else { | ||
console.error("Multicall unsuccessful for address \"".concat(chunkedCalls[i].address, "\", function \"").concat(chunkedCalls[i].name, "\", chainId \"").concat(chainId, "\"")); | ||
catch (e) { | ||
// requested function returns other data than expected | ||
console.error("Multicall parsing unsuccessful for address \"".concat(chunkedCalls[i].address, "\", ") + | ||
"function \"".concat(chunkedCalls[i].name, "\", chainId \"").concat(chainId, "\"")); | ||
return []; | ||
@@ -99,2 +113,3 @@ } | ||
e_1 = _b.sent(); | ||
// whole rpc call failed, probably an rpc issue | ||
console.error("Multicall failed on chainId \"".concat(chainId, "\""), chunkedList, e_1); | ||
@@ -101,0 +116,0 @@ return [2 /*return*/, []]; |
{ | ||
"name": "@lifi/sdk", | ||
"version": "1.0.0", | ||
"version": "1.0.1", | ||
"description": "LI.FI Any-to-Any Cross-Chain-Swap SDK", | ||
@@ -43,3 +43,3 @@ "main": "./dist/index.js", | ||
"author": "Max Klenk <max@li.finance>", | ||
"license": "UNLICENSED", | ||
"license": "Apache-2.0", | ||
"homepage": "https://github.com/lifinance/sdk", | ||
@@ -46,0 +46,0 @@ "repository": { |
Misc. License Issues
License(Experimental) A package's licensing information has fine-grained problems.
Found 1 instance in 1 package
Unidentified License
License(Experimental) Something that seems like a license was found, but its contents could not be matched with a known license.
Found 1 instance in 1 package
287311
0
0
100
5032