New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

@lifi/sdk

Package Overview
Dependencies
Maintainers
1
Versions
174
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@lifi/sdk - npm Package Compare versions

Comparing version 1.0.0 to 1.0.1

LICENSE.md

9

CHANGELOG.md

@@ -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 @@

4

dist/execution/utils.js

@@ -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": {

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc