Socket
Socket
Sign inDemoInstall

@levellink/core

Package Overview
Dependencies
Maintainers
0
Versions
97
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@levellink/core - npm Package Compare versions

Comparing version 2.0.20 to 2.0.21

6

CHANGELOG.md
# @levellink/core
## 2.0.21
### Patch Changes
- match request
## 2.0.20

@@ -4,0 +10,0 @@

31

dist/esm/provider/llwallet/provider/AccountContext.js

@@ -93,13 +93,14 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }

isXallerWallet = Cookies.get('MAGAPE_TYPE') === '3' && Cookies.get('MAGAPE_TOKEN') && Cookies.get('MAGAPE_AUTHORIZATION');
console.log('isXallerWallet', isXallerWallet);
if (!isXallerWallet) {
_context2.next = 8;
_context2.next = 9;
break;
}
beforeLogin === null || beforeLogin === void 0 || beforeLogin();
_context2.next = 6;
_context2.next = 7;
return updateWalletInfo();
case 6:
case 7:
afterLogin === null || afterLogin === void 0 || afterLogin();
return _context2.abrupt("return");
case 8:
case 9:
urlParams = new URLSearchParams(window.location.search);

@@ -111,12 +112,12 @@ token = urlParams.get(TOKEN_NAME) && decodeURIComponent(urlParams.get(TOKEN_NAME));

if (!(token && nodeId)) {
_context2.next = 34;
_context2.next = 35;
break;
}
_context2.next = 16;
_context2.next = 17;
return deCrypto(token, DECRYPTOKEY);
case 16:
case 17:
decodedToken = _context2.sent;
_context2.next = 19;
_context2.next = 20;
return deCrypto(nodeId, DECRYPTOKEY);
case 19:
case 20:
decodedNodeId = _context2.sent;

@@ -141,3 +142,3 @@ localStorage.setItem(TOKEN_NAME, decodedToken);

window.history.replaceState({}, document.title, cleanURL);
case 34:
case 35:
tokenInStorage = localStorage.getItem(TOKEN_NAME);

@@ -149,14 +150,14 @@ if (localStorage.getItem(TOKEN_NAME) && (tokenInStorage === null || tokenInStorage === void 0 ? void 0 : tokenInStorage.split('.')[0]) !== 'free') {

}
_context2.next = 41;
_context2.next = 42;
break;
case 38:
_context2.prev = 38;
case 39:
_context2.prev = 39;
_context2.t0 = _context2["catch"](0);
console.error('Error during initialization:', _context2.t0);
// 处理错误
case 41:
case 42:
case "end":
return _context2.stop();
}
}, _callee2, null, [[0, 38]]);
}, _callee2, null, [[0, 39]]);
}));

@@ -163,0 +164,0 @@ return function initialize() {

@@ -123,13 +123,9 @@ function _typeof(o) { "@babel/helpers - typeof"; return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (o) { return typeof o; } : function (o) { return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o; }, _typeof(o); }

}
console.log(_objectSpread(_objectSpread({}, options), {}, {
type: type,
cookieType: Cookies.get("MAGAPE_TYPE")
}));
_context.prev = 28;
_context.next = 31;
_context.prev = 27;
_context.next = 30;
return axios(options);
case 31:
case 30:
response = _context.sent;
if (!(response.data.code !== STATUS_CODE.OK)) {
_context.next = 35;
_context.next = 34;
break;

@@ -145,7 +141,7 @@ }

throw new Error(response.data.message);
case 35:
return _context.abrupt("return", response.data);
case 38:
_context.prev = 38;
_context.t1 = _context["catch"](28);
case 34:
return _context.abrupt("return", response === null || response === void 0 ? void 0 : response.data);
case 37:
_context.prev = 37;
_context.t1 = _context["catch"](27);
status = _context.t1 === null || _context.t1 === void 0 || (_response = _context.t1.response) === null || _response === void 0 ? void 0 : _response.status;

@@ -156,10 +152,2 @@ if (status === STATUS_CODE.AUTH_FAILED) {

message = (_context.t1 === null || _context.t1 === void 0 || (_response2 = _context.t1.response) === null || _response2 === void 0 || (_response2 = _response2.data) === null || _response2 === void 0 ? void 0 : _response2.message) || '未知错误';
console.log({
completeUrl: completeUrl,
method: method,
data: data,
headers: headers,
message: message,
status: status
});
if (status !== 409) {

@@ -171,7 +159,7 @@ toast === null || toast === void 0 || toast("\u9519\u8BEF ".concat(status, ": ").concat(message), 'error');

throw _context.t1;
case 44:
case 43:
case "end":
return _context.stop();
}
}, _callee, null, [[28, 38]]);
}, _callee, null, [[27, 37]]);
}));

@@ -178,0 +166,0 @@ return function (_x) {

@@ -62,2 +62,3 @@ "use strict";

const isXallerWallet = _jsCookie.default.get('MAGAPE_TYPE') === '3' && _jsCookie.default.get('MAGAPE_TOKEN') && _jsCookie.default.get('MAGAPE_AUTHORIZATION');
console.log('isXallerWallet', isXallerWallet);
if (isXallerWallet) {

@@ -64,0 +65,0 @@ beforeLogin?.();

@@ -84,7 +84,2 @@ "use strict";

}
console.log({
...options,
type: type,
cookieType: _jsCookie.default.get("MAGAPE_TYPE")
});
try {

@@ -102,3 +97,3 @@ const response = await (0, _axios.default)(options);

}
return response.data;
return response?.data;
} catch (error) {

@@ -110,10 +105,2 @@ const status = error?.response?.status;

const message = error?.response?.data?.message || '未知错误';
console.log({
completeUrl,
method,
data,
headers,
message,
status
});
if (status !== 409) {

@@ -120,0 +107,0 @@ toast?.(`错误 ${status}: ${message}`, 'error');

{
"name": "@levellink/core",
"description": "the ui for levellink apps",
"version": "2.0.20",
"version": "2.0.21",
"main": "dist/lib/index.js",

@@ -6,0 +6,0 @@ "module": "dist/esm/index.js",

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