tek-wallet 0.0.197 → 0.0.199
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/components/ui/CopyTextComponent/index.js +3 -4
- package/dist/components/ui/DepositFunction/index.js +1 -1
- package/dist/components/ui/LockToken/index.js +1 -1
- package/dist/components/ui/RequireConnect/index.d.ts +1 -1
- package/dist/components/ui/RequireConnect/index.js +7 -24
- package/package.json +1 -1
|
@@ -86,14 +86,13 @@ var CopyTextComponent = function (_a) {
|
|
|
86
86
|
display: "flex",
|
|
87
87
|
alignItems: "center",
|
|
88
88
|
justifyContent: "center",
|
|
89
|
-
gap: theme.
|
|
89
|
+
gap: theme.mixins.gaps.g4,
|
|
90
90
|
opacity: showSuccess ? 1 : 0,
|
|
91
91
|
position: "absolute",
|
|
92
|
-
inset: 0,
|
|
93
|
-
backgroundColor:
|
|
92
|
+
inset: "-0.125rem",
|
|
93
|
+
backgroundColor: theme.palette.background.black64,
|
|
94
94
|
backdropFilter: "blur(12px)",
|
|
95
95
|
borderRadius: theme.mixins.theBorderRadius.r12,
|
|
96
|
-
WebkitBackdropFilter: "blur(12px)",
|
|
97
96
|
transition: "opacity 0.3s ease-in-out",
|
|
98
97
|
}, children: [iconSuccess || ((0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("copied_check"), sx: {
|
|
99
98
|
width: "1rem",
|
|
@@ -149,7 +149,7 @@ var DepositFunction = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
149
149
|
alignSelf: "center",
|
|
150
150
|
borderRadius: theme.mixins.theBorderRadius.r12,
|
|
151
151
|
overflow: "hidden",
|
|
152
|
-
backgroundColor: theme.palette.background.
|
|
152
|
+
backgroundColor: theme.palette.background.white,
|
|
153
153
|
backdropFilter: "blur(10px)",
|
|
154
154
|
}, children: (0, jsx_runtime_1.jsx)(QRCode_1.default, { value: qrCodeValue, title: "Deposit ".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name), logo: (0, getIcon_1.default)("ton"), bgColor: "transparent" }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4, color: "text.white" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "Network" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { component: "button", sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g2, cursor: "pointer", transition: "transform 0.3s ease-in-out", "&:active": {
|
|
155
155
|
transform: "translateX(0.5rem)",
|
|
@@ -77,8 +77,8 @@ var LockToken = function (props) {
|
|
|
77
77
|
var _e = (0, react_1.useState)(undefined), errorAmount = _e[0], setErrorAmount = _e[1];
|
|
78
78
|
var _f = (0, react_1.useState)(Button_1.BUTTON_STATUS.ENABLED), buttonStatus = _f[0], setButtonStatus = _f[1];
|
|
79
79
|
var validateAmount = (0, react_1.useCallback)(function (lockData) {
|
|
80
|
-
console.warn("🚀 ~ validateAmount ~ lockData:", lockData, lockTokens);
|
|
81
80
|
var token = lockTokens === null || lockTokens === void 0 ? void 0 : lockTokens.find(function (token) { return token.slug === lockData.tokenSlug; });
|
|
81
|
+
console.warn("🚀 ~ validateAmount ~ lockData:", lockData, lockTokens, token);
|
|
82
82
|
setToken(token);
|
|
83
83
|
if (!token) {
|
|
84
84
|
setError(LockTokenError.TOKEN_NOT_FOUND);
|
|
@@ -2,5 +2,5 @@ import { GeneralProps } from "../../../types/ui";
|
|
|
2
2
|
export interface RequireConnectProps extends GeneralProps {
|
|
3
3
|
children: React.ReactNode;
|
|
4
4
|
}
|
|
5
|
-
declare function RequireConnect({ children
|
|
5
|
+
declare function RequireConnect({ children }: RequireConnectProps): import("react/jsx-runtime").JSX.Element;
|
|
6
6
|
export default RequireConnect;
|
|
@@ -1,16 +1,5 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
"use client";
|
|
3
|
-
var __assign = (this && this.__assign) || function () {
|
|
4
|
-
__assign = Object.assign || function(t) {
|
|
5
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
6
|
-
s = arguments[i];
|
|
7
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
8
|
-
t[p] = s[p];
|
|
9
|
-
}
|
|
10
|
-
return t;
|
|
11
|
-
};
|
|
12
|
-
return __assign.apply(this, arguments);
|
|
13
|
-
};
|
|
14
3
|
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) {
|
|
15
4
|
if (k2 === undefined) k2 = k;
|
|
16
5
|
var desc = Object.getOwnPropertyDescriptor(m, k);
|
|
@@ -44,17 +33,6 @@ var __importStar = (this && this.__importStar) || (function () {
|
|
|
44
33
|
return result;
|
|
45
34
|
};
|
|
46
35
|
})();
|
|
47
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
48
|
-
var t = {};
|
|
49
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
50
|
-
t[p] = s[p];
|
|
51
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
52
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
53
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
54
|
-
t[p[i]] = s[p[i]];
|
|
55
|
-
}
|
|
56
|
-
return t;
|
|
57
|
-
};
|
|
58
36
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
59
37
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
60
38
|
};
|
|
@@ -66,15 +44,20 @@ var useWalletData_1 = __importDefault(require("../../../hooks/useWalletData"));
|
|
|
66
44
|
var react_1 = require("react");
|
|
67
45
|
var material_1 = require("@mui/material");
|
|
68
46
|
function RequireConnect(_a) {
|
|
69
|
-
var children = _a.children
|
|
47
|
+
var children = _a.children;
|
|
70
48
|
var authViewRef = (0, react_1.useRef)(null);
|
|
71
49
|
var isAuthenticated = (0, useWalletData_1.default)().isAuthenticated;
|
|
72
50
|
var backAuthView = function () {
|
|
73
51
|
var _a;
|
|
74
52
|
(_a = authViewRef.current) === null || _a === void 0 ? void 0 : _a.close();
|
|
75
53
|
};
|
|
54
|
+
var handleOpenAuthView = function (e) {
|
|
55
|
+
var _a;
|
|
56
|
+
e.stopPropagation();
|
|
57
|
+
(_a = authViewRef.current) === null || _a === void 0 ? void 0 : _a.open();
|
|
58
|
+
};
|
|
76
59
|
if (!isAuthenticated) {
|
|
77
|
-
return ((0, jsx_runtime_1.
|
|
60
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: { position: "relative" }, children: [children, (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { position: "absolute", inset: 0, zIndex: 10 }, onClick: handleOpenAuthView })] }), (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: authViewRef, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, children: (0, jsx_runtime_1.jsx)(AuthView_1.default, { onBack: backAuthView }) })] }));
|
|
78
61
|
}
|
|
79
62
|
return (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children });
|
|
80
63
|
}
|