tek-wallet 0.0.823 → 0.0.825
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/TekWallet/components/layouts/ChildPageLayout/index.js +3 -1
- package/dist/components/TekWallet/components/layouts/DefaultPageLayout/index.js +3 -1
- package/dist/components/TekWallet/components/ui/AssetViewHeader/index.js +2 -0
- package/dist/components/TekWallet/components/ui/QrCodeReader/index.js +2 -2
- package/dist/components/TekWallet/components/views/AssetView/index.js +68 -68
- package/dist/components/TekWallet/components/views/SettingView/index.js +2 -2
- package/dist/components/TekWallet/providers/TekWalletProvider/index.d.ts +9 -3
- package/dist/components/TekWallet/providers/TekWalletProvider/index.js +2 -2
- package/package.json +1 -1
|
@@ -70,10 +70,12 @@ var mui_1 = require("../../../theme/mui");
|
|
|
70
70
|
var AppBackDrop_1 = __importDefault(require("../../ui/AppBackDrop"));
|
|
71
71
|
var react_simple_pull_to_refresh_1 = __importDefault(require("react-simple-pull-to-refresh"));
|
|
72
72
|
var Refresh_1 = __importDefault(require("../../ui/Atoms/Refresh"));
|
|
73
|
+
var providers_1 = require("../../../providers");
|
|
73
74
|
var ChildPageLayout = (0, react_1.forwardRef)(function (props, ref) {
|
|
74
75
|
var header = props.header, footer = props.footer, children = props.children, sx = props.sx, className = props.className, classNames = props.classNames, statusMessage = props.statusMessage, sxs = props.sxs, pullToRefreshProps = props.pullToRefreshProps, rest = __rest(props, ["header", "footer", "children", "sx", "className", "classNames", "statusMessage", "sxs", "pullToRefreshProps"]);
|
|
75
76
|
var _a = (0, react_1.useState)(StatusDisplay_1.StatusDisplayType.Normal), status = _a[0], setStatus = _a[1];
|
|
76
77
|
var theme = (0, mui_1.useTheme)();
|
|
78
|
+
var offset = (0, providers_1.useWalletSetup)().offset;
|
|
77
79
|
var _b = pullToRefreshProps || {}, onRefresh = _b.onRefresh, isPullable = _b.isPullable, restPullToRefreshProps = __rest(_b, ["onRefresh", "isPullable"]);
|
|
78
80
|
(0, react_1.useImperativeHandle)(ref, function () {
|
|
79
81
|
return {
|
|
@@ -96,7 +98,7 @@ var ChildPageLayout = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
96
98
|
return [2 /*return*/, Promise.all([new Promise(function (resolve) { return setTimeout(resolve, 1000); }), onRefresh === null || onRefresh === void 0 ? void 0 : onRefresh()])]; // for user feel data is loading
|
|
97
99
|
});
|
|
98
100
|
}); };
|
|
99
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, __assign({ ref: ref, sx: __assign({ height: "100%", width: "100%", display: "grid", gridTemplateRows: "auto 1fr auto", position: "relative", overflow: "hidden", backgroundColor: theme.palette.background.default }, sx), className: className }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ width: "100%" }, sxs === null || sxs === void 0 ? void 0 : sxs.header), className: classNames === null || classNames === void 0 ? void 0 : classNames.header, children: header }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ height: "100%", width: "100%", overflowX: "hidden", overflowY: "auto" }, sxs === null || sxs === void 0 ? void 0 : sxs.body), className: classNames === null || classNames === void 0 ? void 0 : classNames.body, children: [!!isPullable && ((0, jsx_runtime_1.jsx)(react_simple_pull_to_refresh_1.default, __assign({ pullingContent: null, refreshingContent: ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { display: "flex", alignItems: "center", justifyContent: "center", pt: 3 }, children: (0, jsx_runtime_1.jsx)(Refresh_1.default, {}) })) }, restPullToRefreshProps, { onRefresh: handleRefresh, children: children }))), !isPullable && (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ width: "100%" }, sxs === null || sxs === void 0 ? void 0 : sxs.footer), className: classNames === null || classNames === void 0 ? void 0 : classNames.footer, children: footer }), status !== StatusDisplay_1.StatusDisplayType.Normal && ((0, jsx_runtime_1.jsx)(AppBackDrop_1.default, { open: true, hideProgress: true, message: (0, jsx_runtime_1.jsx)(StatusDisplay_2.default, { status: status, statusMessage: statusMessage === null || statusMessage === void 0 ? void 0 : statusMessage[status] }) }))] })));
|
|
101
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, __assign({ ref: ref, sx: __assign({ height: "100%", width: "100%", display: "grid", gridTemplateRows: "auto 1fr auto", position: "relative", overflow: "hidden", backgroundColor: theme.palette.background.default, pt: offset === null || offset === void 0 ? void 0 : offset.top }, sx), className: className }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ width: "100%" }, sxs === null || sxs === void 0 ? void 0 : sxs.header), className: classNames === null || classNames === void 0 ? void 0 : classNames.header, children: header }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ height: "100%", width: "100%", overflowX: "hidden", overflowY: "auto" }, sxs === null || sxs === void 0 ? void 0 : sxs.body), className: classNames === null || classNames === void 0 ? void 0 : classNames.body, children: [!!isPullable && ((0, jsx_runtime_1.jsx)(react_simple_pull_to_refresh_1.default, __assign({ pullingContent: null, refreshingContent: ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { display: "flex", alignItems: "center", justifyContent: "center", pt: 3 }, children: (0, jsx_runtime_1.jsx)(Refresh_1.default, {}) })) }, restPullToRefreshProps, { onRefresh: handleRefresh, children: children }))), !isPullable && (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ width: "100%" }, sxs === null || sxs === void 0 ? void 0 : sxs.footer), className: classNames === null || classNames === void 0 ? void 0 : classNames.footer, children: footer }), status !== StatusDisplay_1.StatusDisplayType.Normal && ((0, jsx_runtime_1.jsx)(AppBackDrop_1.default, { open: true, hideProgress: true, message: (0, jsx_runtime_1.jsx)(StatusDisplay_2.default, { status: status, statusMessage: statusMessage === null || statusMessage === void 0 ? void 0 : statusMessage[status] }) }))] })));
|
|
100
102
|
});
|
|
101
103
|
ChildPageLayout.displayName = "ChildPageLayout";
|
|
102
104
|
exports.default = ChildPageLayout;
|
|
@@ -15,8 +15,10 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
15
15
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
16
16
|
var material_1 = require("@mui/material");
|
|
17
17
|
var mui_1 = require("../../../theme/mui");
|
|
18
|
+
var providers_1 = require("../../../providers");
|
|
18
19
|
var DefaultPageLayout = function (props) {
|
|
19
20
|
var theme = (0, mui_1.useTheme)();
|
|
20
|
-
|
|
21
|
+
var offset = (0, providers_1.useWalletSetup)().offset;
|
|
22
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.styleMixins.pagePadding), { pb: (offset === null || offset === void 0 ? void 0 : offset.bottom) || theme.styleMixins.pagePadding.paddingBottom, minHeight: "100%", width: "100%" }), props.sx), children: props.children }));
|
|
21
23
|
};
|
|
22
24
|
exports.default = DefaultPageLayout;
|
|
@@ -67,11 +67,13 @@ var AssetViewHeader = function () {
|
|
|
67
67
|
var options = (0, TekWalletProvider_1.useWalletSetup)().options;
|
|
68
68
|
var theme = (0, mui_1.useTheme)();
|
|
69
69
|
var modalRef = (0, react_1.useRef)(null);
|
|
70
|
+
var offset = (0, TekWalletProvider_1.useWalletSetup)().offset;
|
|
70
71
|
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { justifyContent: "start", position: "relative", boxShadow: "0 0 1px 2px rgba(0, 0, 0, 0.03)", px: theme.styleMixins.customPadding.p16 }), children: [(0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: modalRef, trigger: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.styleMixins.row), { alignItems: "center", justifyContent: "start", textAlign: "center", gap: theme.styleMixins.gaps.g4, py: theme.styleMixins.customPadding.p8 }), theme.styleMixins.value), children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "1.25rem", height: "1.25rem" }, children: SvgPath_1.WALLET }), (0, compactWalletAddress_1.default)(masterWallet), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "0.625rem", height: "0.625rem" }, children: SvgPath_1.ARROW_DROP_DOWN })] }), direction: DrawerComponent_1.DRAWER_DIRECTION.TOP, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
71
72
|
width: "100%",
|
|
72
73
|
height: "fit-content",
|
|
73
74
|
backgroundColor: "background.default",
|
|
74
75
|
padding: theme.styleMixins.customPadding.p16,
|
|
76
|
+
pt: (offset === null || offset === void 0 ? void 0 : offset.top) || theme.styleMixins.customPadding.p16,
|
|
75
77
|
}, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { justifyContent: "space-between" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { component: "div", sx: __assign(__assign({}, theme.styleMixins.headerTitle), { py: theme.styleMixins.customPadding.p8, textAlign: "left" }), children: "Wallet address" }), (0, jsx_runtime_1.jsx)(CloseModal_1.default, { onClick: function () { var _a; return (_a = modalRef.current) === null || _a === void 0 ? void 0 : _a.close(); } })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.styleMixins.column), children: [!!masterWallet && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: masterWallet !== null && masterWallet !== void 0 ? masterWallet : "", messageSuccess: "Copied Internal address", children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({ py: theme.styleMixins.customPadding.p8 }, theme.styleMixins.row), { justifyContent: "space-between", alignItems: "center", gap: theme.styleMixins.gaps.g8, color: "text.primary" }), children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "1.75rem", height: "1.75rem", opacity: 0.7 }, children: SvgPath_1.WALLET }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.styleMixins.column), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.listTitle), { color: "inherit" }), children: "Internal wallet" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.styleMixins.listDescription), children: (0, compactWalletAddress_1.default)(masterWallet) })] }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "1rem", height: "1rem" }, children: SvgPath_1.IC_COPY })] }) }), (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
|
|
76
78
|
my: theme.styleMixins.customPadding.p8,
|
|
77
79
|
} })] })), blockchainWallets === null || blockchainWallets === void 0 ? void 0 : blockchainWallets.map(function (wallet, index) { return ((0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: wallet.blockchainAddress, messageSuccess: "Copied ".concat(wallet.networkName, " address"), children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({ py: theme.styleMixins.customPadding.p8 }, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8, justifyContent: "space-between", alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: wallet.networkIcon, width: 28, sx: { borderRadius: theme.styleMixins.customRadius.full } }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.styleMixins.column), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.styleMixins.listTitle), children: wallet.networkName }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.styleMixins.listDescription), children: (0, compactWalletAddress_1.default)(wallet.blockchainAddress) })] }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "1rem", height: "1rem" }, children: SvgPath_1.IC_COPY })] }) }, wallet.blockchainAddress + index)); })] })] }) }), (0, jsx_runtime_1.jsx)(link_1.default, { href: "".concat((options === null || options === void 0 ? void 0 : options.basePath) || "", "/tek-wallet/").concat(TekWalletView_1.TekWalletViewRoutes.SETTING), children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: {
|
|
@@ -131,7 +131,7 @@ var QrCodeReader = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
131
131
|
onScan === null || onScan === void 0 ? void 0 : onScan(text);
|
|
132
132
|
close();
|
|
133
133
|
}, [onResult, onScan]);
|
|
134
|
-
var _d = (0, providers_1.useWalletSetup)(),
|
|
134
|
+
var _d = (0, providers_1.useWalletSetup)(), offset = _d.offset, overrideQRScanMethod = _d.overrideQRScanMethod;
|
|
135
135
|
if (!!overrideQRScanMethod) {
|
|
136
136
|
var handleOverrideQRScanMethod = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
137
137
|
var result, fakeIDetectedBarcode, error_1;
|
|
@@ -172,7 +172,7 @@ var QrCodeReader = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
172
172
|
backgroundColor: "transparent !important",
|
|
173
173
|
}, header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { hideBack: true, title: "Scan QR code", sx: {
|
|
174
174
|
position: "absolute",
|
|
175
|
-
top:
|
|
175
|
+
top: (offset === null || offset === void 0 ? void 0 : offset.top) || 0,
|
|
176
176
|
left: 0,
|
|
177
177
|
right: 0,
|
|
178
178
|
zIndex: 1001,
|
|
@@ -102,74 +102,74 @@ var AssetView = function (props) {
|
|
|
102
102
|
return [2 /*return*/, updateWalletDetail()];
|
|
103
103
|
});
|
|
104
104
|
}); };
|
|
105
|
-
return ((0, jsx_runtime_1.jsxs)(ChildPageLayout_1.default, { header: !!isInitPasscode && (0, jsx_runtime_1.jsx)(AssetViewHeader_1.default, {}), pullToRefreshProps: {
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
105
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [!isInitPasscode && !!masterWallet && ((0, jsx_runtime_1.jsx)(ChangePasscodeView_1.default, { isInitPasscode: true, onBack: handleBackInitPasscodeView, idPrefix: idPrefix })), !!isInitPasscode && ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: !!isInitPasscode && (0, jsx_runtime_1.jsx)(AssetViewHeader_1.default, {}), pullToRefreshProps: {
|
|
106
|
+
isPullable: !!isInitPasscode,
|
|
107
|
+
onRefresh: handleRefresh,
|
|
108
|
+
}, children: (0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, __assign({}, rest, { sx: __assign({ display: "flex", flexDirection: "column", gap: theme.styleMixins.gaps.g16 }, sx), children: [useBasicAmountGroupInAssetView ? (0, jsx_runtime_1.jsx)(BasicAmountGroup_1.default, {}) : (0, jsx_runtime_1.jsx)(AmountGroupAndChart_1.default, {}), (0, jsx_runtime_1.jsx)(Menu_1.default, { sx: {
|
|
109
|
+
gridTemplateColumns: "1fr 1px 1fr 1px 1fr",
|
|
110
|
+
}, items: [
|
|
111
|
+
(0, jsx_runtime_1.jsx)(ReceiveFunction_1.default, { children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { component: ClickEffect_1.default, sx: {
|
|
112
|
+
placeContent: "center",
|
|
113
|
+
columnSpan: 1,
|
|
114
|
+
}, children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: "IC_RECEIVE", label: "Receive", sx: {
|
|
115
|
+
width: "100%",
|
|
116
|
+
} }) }) }, "receive"),
|
|
117
|
+
(0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
118
|
+
width: "100%",
|
|
119
|
+
height: "100%",
|
|
120
|
+
backgroundColor: theme.palette.divider,
|
|
121
|
+
} }, "divider-1"),
|
|
122
|
+
(0, jsx_runtime_1.jsx)(link_1.default, { href: "".concat(basePath || "", "/tek-wallet/send/external"), children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { component: ClickEffect_1.default, sx: {
|
|
123
|
+
placeContent: "center",
|
|
124
|
+
columnSpan: 1,
|
|
125
|
+
}, children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: "IC_WITHDRAW_FC", label: "Withdraw", sx: { width: "100%" } }) }) }, "withdraw"),
|
|
126
|
+
(0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
127
|
+
width: "100%",
|
|
128
|
+
height: "100%",
|
|
129
|
+
backgroundColor: theme.palette.divider,
|
|
130
|
+
} }, "divider-2"),
|
|
131
|
+
(0, jsx_runtime_1.jsx)(link_1.default, { href: "".concat(basePath || "", "/tek-wallet/send/internal"), children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { component: ClickEffect_1.default, sx: {
|
|
132
|
+
placeContent: "center",
|
|
133
|
+
columnSpan: 1,
|
|
134
|
+
}, children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: "IC_TRANSFER", label: "Transfer", sx: { width: "100%" } }) }) }, "send-internal"),
|
|
135
|
+
// <Link href={`${basePath || ""}/tek-wallet/swap`} key="swap">
|
|
136
|
+
// <ListItem
|
|
137
|
+
// component={ClickEffect}
|
|
138
|
+
// sx={{
|
|
139
|
+
// placeContent: "center",
|
|
140
|
+
// columnSpan: 1,
|
|
141
|
+
// }}
|
|
142
|
+
// >
|
|
143
|
+
// <FunctionItem icon={"IC_SWAP_FC"} label="Swap" sx={{ width: "100%" }} />
|
|
144
|
+
// </ListItem>
|
|
145
|
+
// </Link>,
|
|
146
|
+
] }), !hideActivitySectionInAssetView && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
147
|
+
display: "flex",
|
|
148
|
+
gap: theme.styleMixins.gaps.g20,
|
|
149
|
+
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.sessionTitle), children: "Activity" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { component: link_1.default, href: "".concat(basePath || "", "/tek-wallet/activity"), sx: {
|
|
150
|
+
marginLeft: "auto",
|
|
151
|
+
display: "flex",
|
|
152
|
+
alignItems: "center",
|
|
153
|
+
color: theme.palette.text.primary,
|
|
154
|
+
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
155
|
+
fontSize: theme.typography.fontSize13,
|
|
156
|
+
fontWeight: theme.typography.fontWeight400,
|
|
157
|
+
cursor: "pointer",
|
|
158
|
+
}, children: "View all" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { iconKey: "IC_ARROW_RIGHT", width: 16, height: 18 })] })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
159
|
+
position: "relative",
|
|
160
|
+
left: "-".concat(theme.styleMixins.customPadding.p16),
|
|
161
|
+
width: "calc(100% + ".concat(theme.styleMixins.customPadding.p16, " * 2)"),
|
|
162
|
+
}, children: (0, jsx_runtime_1.jsx)(ActivitiesTypeSlice_1.default, { type: const_1.ACTIVITIES_TYPE_ALL, limitItems: 4, isActive: true, sx: {
|
|
163
|
+
paddingBottom: 0,
|
|
164
|
+
paddingTop: 0,
|
|
165
|
+
paddingLeft: 0,
|
|
166
|
+
paddingRight: 0,
|
|
167
|
+
}, smartListProps: {
|
|
168
|
+
bodySx: {
|
|
169
|
+
pt: 0,
|
|
170
|
+
pb: 0,
|
|
171
|
+
},
|
|
172
|
+
} }) })] })), (0, jsx_runtime_1.jsx)(AssetsBoard_1.default, {})] })) }))] }));
|
|
173
173
|
};
|
|
174
174
|
exports.AssetView = AssetView;
|
|
175
175
|
exports.default = exports.AssetView;
|
|
@@ -72,9 +72,9 @@ var SettingView = function (props) {
|
|
|
72
72
|
onLogout === null || onLogout === void 0 ? void 0 : onLogout();
|
|
73
73
|
setButtonStatus(Button_1.BUTTON_STATUS.LOADING);
|
|
74
74
|
};
|
|
75
|
-
return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "Setting" }), children: (0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g16 }), children: [(0, jsx_runtime_1.jsx)(ChangePasscode_1.default, { children: (0, jsx_runtime_1.jsx)(ListItemCustom_1.default, { hideTag: true, title: "Change Passcode", description: "Change your passcode", icon: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "2rem", height: "2rem", color: "text.secondary" }, children: SvgPath_1.IC_CHANGE_PASSCODE }) }) }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { sx: {
|
|
75
|
+
return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "Setting" }), children: (0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g16 }), children: [(0, jsx_runtime_1.jsx)(ChangePasscode_1.default, { children: (0, jsx_runtime_1.jsx)(ListItemCustom_1.default, { hideTag: true, title: "Change Passcode", description: "Change your passcode", icon: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "2rem", height: "2rem", color: "text.secondary" }, children: SvgPath_1.IC_CHANGE_PASSCODE }) }) }), !!onLogout && ((0, jsx_runtime_1.jsx)(Button_1.default.Primary, { sx: {
|
|
76
76
|
marginTop: "auto",
|
|
77
|
-
}, color: "error", onClick: handleLogout, status: buttonStatus, children: "Logout" })] }) }));
|
|
77
|
+
}, color: "error", onClick: handleLogout, status: buttonStatus, children: "Logout" }))] }) }));
|
|
78
78
|
};
|
|
79
79
|
exports.SettingView = SettingView;
|
|
80
80
|
exports.default = exports.SettingView;
|
|
@@ -16,13 +16,19 @@ export interface Options {
|
|
|
16
16
|
hideBackButtons: Partial<Record<Views, boolean>>;
|
|
17
17
|
disableRefetchOnFocus?: boolean;
|
|
18
18
|
}
|
|
19
|
+
export interface OffsetOptions {
|
|
20
|
+
top?: number;
|
|
21
|
+
bottom?: number;
|
|
22
|
+
left?: number;
|
|
23
|
+
right?: number;
|
|
24
|
+
}
|
|
19
25
|
export interface TekWalletProviderProps {
|
|
20
26
|
children: ReactNode;
|
|
21
27
|
isSSO?: boolean;
|
|
22
28
|
accessToken?: string;
|
|
23
29
|
options?: Options;
|
|
24
30
|
onLogout?: () => void;
|
|
25
|
-
|
|
31
|
+
offset?: OffsetOptions;
|
|
26
32
|
NotFoundPage?: ReactNode;
|
|
27
33
|
overrideQRScanMethod?: () => Promise<string>;
|
|
28
34
|
theme?: Theme;
|
|
@@ -32,7 +38,7 @@ export interface TekWalletContextType {
|
|
|
32
38
|
isSSO: boolean | undefined;
|
|
33
39
|
options?: Options;
|
|
34
40
|
onLogout?: () => void;
|
|
35
|
-
|
|
41
|
+
offset?: OffsetOptions;
|
|
36
42
|
theme?: Theme;
|
|
37
43
|
themeMode?: ThemeModes;
|
|
38
44
|
overrideQRScanMethod?: () => Promise<string>;
|
|
@@ -40,7 +46,7 @@ export interface TekWalletContextType {
|
|
|
40
46
|
accessToken?: string;
|
|
41
47
|
}
|
|
42
48
|
export declare const TekWalletContext: import("react").Context<TekWalletContextType>;
|
|
43
|
-
export declare function TekWalletProvider({ children, isSSO, accessToken, options,
|
|
49
|
+
export declare function TekWalletProvider({ children, isSSO, accessToken, options, offset: offset, onLogout, overrideQRScanMethod, theme, themeMode, NotFoundPage, }: TekWalletProviderProps): import("react/jsx-runtime").JSX.Element;
|
|
44
50
|
export default TekWalletProvider;
|
|
45
51
|
export declare const useWalletSetup: () => TekWalletContextType;
|
|
46
52
|
export declare const useKeyboardThemeMode: () => THEME;
|
|
@@ -33,7 +33,7 @@ var initialTekWalletContext = {
|
|
|
33
33
|
};
|
|
34
34
|
exports.TekWalletContext = (0, react_1.createContext)(initialTekWalletContext);
|
|
35
35
|
function TekWalletProvider(_a) {
|
|
36
|
-
var children = _a.children, isSSO = _a.isSSO, accessToken = _a.accessToken, options = _a.options,
|
|
36
|
+
var children = _a.children, isSSO = _a.isSSO, accessToken = _a.accessToken, options = _a.options, offset = _a.offset, onLogout = _a.onLogout, overrideQRScanMethod = _a.overrideQRScanMethod, theme = _a.theme, themeMode = _a.themeMode, NotFoundPage = _a.NotFoundPage;
|
|
37
37
|
var WalletProvider = isSSO ? WalletDataProviderNoImport_1.default : WalletDataProvider_1.default;
|
|
38
38
|
var _b = (0, react_1.useState)("1"), resetTrigger = _b[0], setResetTrigger = _b[1];
|
|
39
39
|
var onDisconnect = function () {
|
|
@@ -43,7 +43,7 @@ function TekWalletProvider(_a) {
|
|
|
43
43
|
isSSO: isSSO,
|
|
44
44
|
options: options,
|
|
45
45
|
onLogout: onLogout,
|
|
46
|
-
|
|
46
|
+
offset: offset,
|
|
47
47
|
overrideQRScanMethod: overrideQRScanMethod,
|
|
48
48
|
theme: theme,
|
|
49
49
|
themeMode: themeMode,
|