tek-wallet 0.0.826 → 0.0.828
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/FullHeightAndScroll/index.d.ts +4 -0
- package/dist/components/TekWallet/components/layouts/FullHeightAndScroll/index.js +9 -0
- package/dist/components/TekWallet/components/ui/BottomActionLayout/index.js +3 -1
- package/dist/components/TekWallet/components/ui/FiatDeposit/index.js +1 -5
- package/dist/components/TekWallet/components/views/AssetView/index.js +67 -78
- package/dist/components/TekWallet/components/views/ChangePasscodeView/index.d.ts +1 -0
- package/dist/components/TekWallet/components/views/ChangePasscodeView/index.js +23 -12
- package/dist/components/TekWallet/components/views/InitPasscodeView.d.ts +4 -1
- package/dist/components/TekWallet/components/views/InitPasscodeView.js +6 -4
- package/dist/components/TekWallet/components/views/SendExternalView/components/Form.js +2 -2
- package/dist/components/TekWallet/components/views/SendExternalView/index.js +4 -1
- package/dist/components/TekWallet/components/views/SendInternalView/components/Form.js +2 -2
- package/dist/components/TekWallet/components/views/SendInternalView/index.js +3 -2
- package/dist/components/TekWallet/components/views/SendNftView/components/Form.js +18 -20
- package/dist/components/TekWallet/components/views/SwapView/index.js +3 -2
- package/package.json +1 -1
- package/dist/components/TekWallet/components/ui/ModalSelectToken/index.d.ts +0 -9
- package/dist/components/TekWallet/components/ui/ModalSelectToken/index.js +0 -127
- package/dist/components/TekWallet/components/ui/ReceiveHistory/ReceiveCardHistory.d.ts +0 -11
- package/dist/components/TekWallet/components/ui/ReceiveHistory/ReceiveCardHistory.js +0 -77
- package/dist/components/TekWallet/components/ui/ReceiveHistory/ReceiveHistoryDetails.d.ts +0 -8
- package/dist/components/TekWallet/components/ui/ReceiveHistory/ReceiveHistoryDetails.js +0 -115
- package/dist/components/TekWallet/components/ui/ReceiveHistory/index.d.ts +0 -9
- package/dist/components/TekWallet/components/ui/ReceiveHistory/index.js +0 -447
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
|
+
var material_1 = require("@mui/material");
|
|
5
|
+
function FullHeightAndScroll(_a) {
|
|
6
|
+
var children = _a.children;
|
|
7
|
+
return (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { height: "100%", overflow: "auto" }, children: children });
|
|
8
|
+
}
|
|
9
|
+
exports.default = FullHeightAndScroll;
|
|
@@ -25,9 +25,11 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
25
25
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
26
26
|
var material_1 = require("@mui/material");
|
|
27
27
|
var mui_1 = require("../../../theme/mui");
|
|
28
|
+
var providers_1 = require("../../../providers");
|
|
28
29
|
function BottomActionLayout(_a) {
|
|
29
30
|
var children = _a.children, sx = _a.sx, rest = __rest(_a, ["children", "sx"]);
|
|
30
31
|
var theme = (0, mui_1.useTheme)();
|
|
31
|
-
|
|
32
|
+
var offset = (0, providers_1.useWalletSetup)().offset;
|
|
33
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Box, __assign({ sx: __assign({ width: "100%", paddingLeft: theme.styleMixins.pagePadding, paddingRight: theme.styleMixins.pagePadding, paddingBottom: (offset === null || offset === void 0 ? void 0 : offset.bottom) || theme.styleMixins.pagePadding.paddingBottom }, sx) }, rest, { children: children })));
|
|
32
34
|
}
|
|
33
35
|
exports.default = BottomActionLayout;
|
|
@@ -52,8 +52,6 @@ exports.default = FiatDeposit;
|
|
|
52
52
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
53
53
|
var material_1 = require("@mui/material");
|
|
54
54
|
var react_1 = require("react");
|
|
55
|
-
var SvgPath_1 = require("../SvgPath");
|
|
56
|
-
var ReceiveHistory_1 = __importDefault(require("../ReceiveHistory"));
|
|
57
55
|
var xhub_keyboard_1 = require("xhub-keyboard");
|
|
58
56
|
var useUniqueId_1 = require("../../../hooks/useUniqueId");
|
|
59
57
|
var getDepositFiatInfoService_1 = __importDefault(require("../../../services/axios/get-deposit-fiat-info-service/getDepositFiatInfoService"));
|
|
@@ -63,7 +61,6 @@ var TimeText_1 = __importDefault(require("../TimeText"));
|
|
|
63
61
|
var formatter_1 = __importDefault(require("../Formatter/functions/formatter"));
|
|
64
62
|
var shareDrawer_1 = __importDefault(require("./components/shareDrawer"));
|
|
65
63
|
var link_1 = __importDefault(require("next/link"));
|
|
66
|
-
var DrawerComponent_1 = __importStar(require("../DrawerComponent"));
|
|
67
64
|
var Icon_1 = __importDefault(require("../Icon"));
|
|
68
65
|
var Button_1 = __importStar(require("../Button"));
|
|
69
66
|
var Text_1 = __importDefault(require("../Text"));
|
|
@@ -80,12 +77,11 @@ var BackArrow = function (props) {
|
|
|
80
77
|
};
|
|
81
78
|
var Header = function (_a) {
|
|
82
79
|
var handleBack = _a.handleBack;
|
|
83
|
-
var historyRef = (0, react_1.useRef)(null);
|
|
84
80
|
return ((0, jsx_runtime_1.jsxs)(material_1.Grid2, { display: "grid", py: "0.75rem", px: "1rem", container: true, sx: {
|
|
85
81
|
gridTemplateColumns: "1fr 1fr 1fr",
|
|
86
82
|
gridTemplateRows: "1fr",
|
|
87
83
|
alignItems: "center",
|
|
88
|
-
}, children: [(0, jsx_runtime_1.jsx)(material_1.Grid2, { children: (0, jsx_runtime_1.jsx)(BackArrow, { onClick: handleBack }) }), (0, jsx_runtime_1.jsx)(material_1.Grid2, { display: "flex", children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, style_1.title01), { width: "100%", textAlign: "center" }), children: "Top up" }) })
|
|
84
|
+
}, children: [(0, jsx_runtime_1.jsx)(material_1.Grid2, { children: (0, jsx_runtime_1.jsx)(BackArrow, { onClick: handleBack }) }), (0, jsx_runtime_1.jsx)(material_1.Grid2, { display: "flex", children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, style_1.title01), { width: "100%", textAlign: "center" }), children: "Top up" }) })] }));
|
|
89
85
|
};
|
|
90
86
|
var CopyIcon = function () {
|
|
91
87
|
return ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "17", height: "16", viewBox: "0 0 17 16", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M11 11.5V13.75C11 14.164 10.664 14.5 10.25 14.5H3.75C3.55109 14.5 3.36032 14.421 3.21967 14.2803C3.07902 14.1397 3 13.9489 3 13.75V5.25C3 4.836 3.336 4.5 3.75 4.5H5C5.33505 4.49977 5.66954 4.52742 6 4.58267M11 11.5H13.25C13.664 11.5 14 11.164 14 10.75V7.5C14 4.52667 11.838 2.05933 9 1.58267C8.66954 1.52742 8.33505 1.49977 8 1.5H6.75C6.336 1.5 6 1.836 6 2.25V4.58267M11 11.5H6.75C6.55109 11.5 6.36032 11.421 6.21967 11.2803C6.07902 11.1397 6 10.9489 6 10.75V4.58267M14 9V7.75C14 7.15326 13.7629 6.58097 13.341 6.15901C12.919 5.73705 12.3467 5.5 11.75 5.5H10.75C10.5511 5.5 10.3603 5.42098 10.2197 5.28033C10.079 5.13968 10 4.94891 10 4.75V3.75C10 3.45453 9.9418 3.16195 9.82873 2.88896C9.71566 2.61598 9.54992 2.36794 9.34099 2.15901C9.13206 1.95008 8.88402 1.78435 8.61104 1.67127C8.33806 1.5582 8.04547 1.5 7.75 1.5H7", stroke: "#044C2F", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) }));
|
|
@@ -78,102 +78,91 @@ var Menu_1 = __importDefault(require("./Menu"));
|
|
|
78
78
|
var ActivitiesTypeSlice_1 = __importDefault(require("../../ui/ActivitiesTypeSlice"));
|
|
79
79
|
var const_1 = require("../../../providers/ActivitiesProvider/const");
|
|
80
80
|
var Icon_1 = __importDefault(require("../../ui/Icon"));
|
|
81
|
-
var useCustomRouter_1 = __importDefault(require("../../../hooks/useCustomRouter"));
|
|
82
81
|
var BasicAmountGroup_1 = __importDefault(require("../../ui/BasicAmountGroup"));
|
|
83
82
|
var AssetViewHeader_1 = __importDefault(require("../../ui/AssetViewHeader"));
|
|
84
83
|
var ClickEffect_1 = __importDefault(require("../../ui/ClickEffect"));
|
|
85
84
|
var mui_1 = require("../../../theme/mui");
|
|
86
85
|
var AssetsBoard_1 = __importDefault(require("../../ui/AssetsBoard"));
|
|
87
|
-
var
|
|
88
|
-
var TekWalletView_1 = require("../TekWalletView");
|
|
86
|
+
var InitPasscodeView_1 = __importDefault(require("../InitPasscodeView"));
|
|
89
87
|
var AssetView = function (props) {
|
|
90
88
|
var sx = props.sx, rest = __rest(props, ["sx"]);
|
|
91
89
|
var _a = (0, useWalletData_1.default)(), isInitPasscode = _a.isInitPasscode, masterWallet = _a.masterWallet, updateWalletDetail = _a.updateWalletDetail;
|
|
92
90
|
var theme = (0, mui_1.useTheme)();
|
|
93
91
|
var options = (0, TekWalletProvider_1.useWalletSetup)().options;
|
|
94
92
|
var _b = options || {}, hideActivitySectionInAssetView = _b.hideActivitySectionInAssetView, useBasicAmountGroupInAssetView = _b.useBasicAmountGroupInAssetView, basePath = _b.basePath;
|
|
95
|
-
var router = (0, useCustomRouter_1.default)();
|
|
96
93
|
var handleRefresh = function () { return __awaiter(void 0, void 0, void 0, function () {
|
|
97
94
|
return __generator(this, function (_a) {
|
|
98
95
|
return [2 /*return*/, updateWalletDetail()];
|
|
99
96
|
});
|
|
100
97
|
}); };
|
|
101
|
-
(0,
|
|
102
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
98
|
+
return ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [!isInitPasscode && !!masterWallet && (0, jsx_runtime_1.jsx)(InitPasscodeView_1.default, { useAutoBack: false }), !!isInitPasscode && ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: !!isInitPasscode && (0, jsx_runtime_1.jsx)(AssetViewHeader_1.default, {}), pullToRefreshProps: {
|
|
99
|
+
isPullable: !!isInitPasscode,
|
|
100
|
+
onRefresh: handleRefresh,
|
|
101
|
+
}, 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: {
|
|
102
|
+
gridTemplateColumns: "1fr 1px 1fr 1px 1fr",
|
|
103
|
+
}, items: [
|
|
104
|
+
(0, jsx_runtime_1.jsx)(ReceiveFunction_1.default, { children: (0, jsx_runtime_1.jsx)(material_1.ListItem, { component: ClickEffect_1.default, sx: {
|
|
105
|
+
placeContent: "center",
|
|
106
|
+
columnSpan: 1,
|
|
107
|
+
}, children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: "IC_RECEIVE", label: "Receive", sx: {
|
|
108
|
+
width: "100%",
|
|
109
|
+
} }) }) }, "receive"),
|
|
110
|
+
(0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
111
|
+
width: "100%",
|
|
112
|
+
height: "100%",
|
|
113
|
+
backgroundColor: theme.palette.divider,
|
|
114
|
+
} }, "divider-1"),
|
|
115
|
+
(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: {
|
|
116
|
+
placeContent: "center",
|
|
117
|
+
columnSpan: 1,
|
|
118
|
+
}, children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: "IC_WITHDRAW_FC", label: "Withdraw", sx: { width: "100%" } }) }) }, "withdraw"),
|
|
119
|
+
(0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
119
120
|
width: "100%",
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
// <Link href={`${basePath || ""}/tek-wallet/swap`} key="swap">
|
|
140
|
-
// <ListItem
|
|
141
|
-
// component={ClickEffect}
|
|
142
|
-
// sx={{
|
|
143
|
-
// placeContent: "center",
|
|
144
|
-
// columnSpan: 1,
|
|
145
|
-
// }}
|
|
146
|
-
// >
|
|
147
|
-
// <FunctionItem icon={"IC_SWAP_FC"} label="Swap" sx={{ width: "100%" }} />
|
|
148
|
-
// </ListItem>
|
|
149
|
-
// </Link>,
|
|
150
|
-
] }), !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: {
|
|
151
|
-
display: "flex",
|
|
152
|
-
gap: theme.styleMixins.gaps.g20,
|
|
153
|
-
}, 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: {
|
|
154
|
-
marginLeft: "auto",
|
|
121
|
+
height: "100%",
|
|
122
|
+
backgroundColor: theme.palette.divider,
|
|
123
|
+
} }, "divider-2"),
|
|
124
|
+
(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: {
|
|
125
|
+
placeContent: "center",
|
|
126
|
+
columnSpan: 1,
|
|
127
|
+
}, children: (0, jsx_runtime_1.jsx)(FunctionItem_1.default, { icon: "IC_TRANSFER", label: "Transfer", sx: { width: "100%" } }) }) }, "send-internal"),
|
|
128
|
+
// <Link href={`${basePath || ""}/tek-wallet/swap`} key="swap">
|
|
129
|
+
// <ListItem
|
|
130
|
+
// component={ClickEffect}
|
|
131
|
+
// sx={{
|
|
132
|
+
// placeContent: "center",
|
|
133
|
+
// columnSpan: 1,
|
|
134
|
+
// }}
|
|
135
|
+
// >
|
|
136
|
+
// <FunctionItem icon={"IC_SWAP_FC"} label="Swap" sx={{ width: "100%" }} />
|
|
137
|
+
// </ListItem>
|
|
138
|
+
// </Link>,
|
|
139
|
+
] }), !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: {
|
|
155
140
|
display: "flex",
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
}, children:
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
141
|
+
gap: theme.styleMixins.gaps.g20,
|
|
142
|
+
}, 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: {
|
|
143
|
+
marginLeft: "auto",
|
|
144
|
+
display: "flex",
|
|
145
|
+
alignItems: "center",
|
|
146
|
+
color: theme.palette.text.primary,
|
|
147
|
+
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
148
|
+
fontSize: theme.typography.fontSize13,
|
|
149
|
+
fontWeight: theme.typography.fontWeight400,
|
|
150
|
+
cursor: "pointer",
|
|
151
|
+
}, 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: {
|
|
152
|
+
position: "relative",
|
|
153
|
+
left: "-".concat(theme.styleMixins.customPadding.p16),
|
|
154
|
+
width: "calc(100% + ".concat(theme.styleMixins.customPadding.p16, " * 2)"),
|
|
155
|
+
}, children: (0, jsx_runtime_1.jsx)(ActivitiesTypeSlice_1.default, { type: const_1.ACTIVITIES_TYPE_ALL, limitItems: 4, isActive: true, sx: {
|
|
156
|
+
paddingBottom: 0,
|
|
157
|
+
paddingTop: 0,
|
|
158
|
+
paddingLeft: 0,
|
|
159
|
+
paddingRight: 0,
|
|
160
|
+
}, smartListProps: {
|
|
161
|
+
bodySx: {
|
|
162
|
+
pt: 0,
|
|
163
|
+
pb: 0,
|
|
164
|
+
},
|
|
165
|
+
} }) })] })), (0, jsx_runtime_1.jsx)(AssetsBoard_1.default, {})] })) }))] }));
|
|
177
166
|
};
|
|
178
167
|
exports.AssetView = AssetView;
|
|
179
168
|
exports.default = exports.AssetView;
|
|
@@ -4,6 +4,7 @@ interface ChangePasscodeViewProps extends GeneralProps {
|
|
|
4
4
|
isInitPasscode?: boolean;
|
|
5
5
|
idPrefix?: string;
|
|
6
6
|
hideBackInFirstStep?: boolean;
|
|
7
|
+
useAutoBack?: boolean;
|
|
7
8
|
}
|
|
8
9
|
export declare const ChangePasscodeView: (props: ChangePasscodeViewProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
10
|
export default ChangePasscodeView;
|
|
@@ -106,7 +106,7 @@ var useWarningWrongPasscode_1 = require("../../../hooks/useWarningWrongPasscode"
|
|
|
106
106
|
var providers_1 = require("../../../providers");
|
|
107
107
|
var passcodeLength = 6;
|
|
108
108
|
var ChangePasscodeView = function (props) {
|
|
109
|
-
var _a = props.isInitPasscode, isInitPasscode = _a === void 0 ? false : _a, _b = props.idPrefix, idPrefix = _b === void 0 ? "" : _b, _c = props.hideBackInFirstStep, hideBackInFirstStep = _c === void 0 ? false : _c;
|
|
109
|
+
var _a = props.isInitPasscode, isInitPasscode = _a === void 0 ? false : _a, _b = props.idPrefix, idPrefix = _b === void 0 ? "" : _b, _c = props.hideBackInFirstStep, hideBackInFirstStep = _c === void 0 ? false : _c, _d = props.useAutoBack, useAutoBack = _d === void 0 ? true : _d;
|
|
110
110
|
var initStep = (0, react_2.useRef)(isInitPasscode
|
|
111
111
|
? type_1.ChangePasscodeViewStep.ENTER_NEW_PASSCODE
|
|
112
112
|
: type_1.ChangePasscodeViewStep.ENTER_OLD_PASSCODE);
|
|
@@ -115,15 +115,15 @@ var ChangePasscodeView = function (props) {
|
|
|
115
115
|
? const_2.STEPS_CONTENT_FOR_INIT_PASSCODE
|
|
116
116
|
: const_1.STEPS_CONTENT_FOR_CHANGE_PASSCODE;
|
|
117
117
|
var theme = (0, mui_1.useTheme)();
|
|
118
|
-
var
|
|
119
|
-
var
|
|
120
|
-
var
|
|
118
|
+
var _e = (0, react_2.useState)(""), oldPasscode = _e[0], setOldPasscode = _e[1];
|
|
119
|
+
var _f = (0, react_2.useState)(""), newPasscode = _f[0], setNewPasscode = _f[1];
|
|
120
|
+
var _g = (0, react_2.useState)(""), confirmPasscode = _g[0], setConfirmPasscode = _g[1];
|
|
121
121
|
var swiperControlledRef = (0, react_2.useRef)(null);
|
|
122
122
|
var childPageLayoutRef = (0, react_2.useRef)(null);
|
|
123
|
-
var
|
|
124
|
-
var
|
|
123
|
+
var _h = (0, react_2.useState)(initStep.current), currentStep = _h[0], setCurrentStep = _h[1];
|
|
124
|
+
var _j = (0, react_2.useState)(null), error = _j[0], setError = _j[1];
|
|
125
125
|
var hideBack = currentStep === initStep.current && hideBackInFirstStep;
|
|
126
|
-
var
|
|
126
|
+
var _k = (0, useWarningWrongPasscode_1.useValidatePasscode)(), handleVerifyPasscode = _k.handleVerifyPasscode, warningContent = _k.warningContent, isLocked = _k.isLocked, handleClearUnknownError = _k.handleClearUnknownError, unknownError = _k.unknownError;
|
|
127
127
|
var resetValue = function () {
|
|
128
128
|
var _a;
|
|
129
129
|
handleClearUnknownError();
|
|
@@ -240,7 +240,7 @@ var ChangePasscodeView = function (props) {
|
|
|
240
240
|
if (res.success) {
|
|
241
241
|
(_d = childPageLayoutRef.current) === null || _d === void 0 ? void 0 : _d.showSuccess();
|
|
242
242
|
setTimeout(function () {
|
|
243
|
-
handleDone();
|
|
243
|
+
useAutoBack && handleDone();
|
|
244
244
|
}, 1000);
|
|
245
245
|
}
|
|
246
246
|
else {
|
|
@@ -272,7 +272,7 @@ var ChangePasscodeView = function (props) {
|
|
|
272
272
|
if (res.success) {
|
|
273
273
|
(_d = childPageLayoutRef.current) === null || _d === void 0 ? void 0 : _d.showSuccess();
|
|
274
274
|
setTimeout(function () {
|
|
275
|
-
handleDone();
|
|
275
|
+
useAutoBack && handleDone();
|
|
276
276
|
}, 1000);
|
|
277
277
|
}
|
|
278
278
|
else {
|
|
@@ -319,9 +319,17 @@ var ChangePasscodeView = function (props) {
|
|
|
319
319
|
return { value: confirmPasscode, onChange: handleConfirmPasscodeChange };
|
|
320
320
|
}
|
|
321
321
|
};
|
|
322
|
-
var
|
|
322
|
+
var _l = getValueAndHandlerByStep(currentStep), value = _l.value, onChange = _l.onChange;
|
|
323
323
|
var keyboardId = (0, react_2.useMemo)(function () { return "".concat(idPrefix, "-").concat(isInitPasscode ? "init" : "change", "-passcode-keyboard"); }, [isInitPasscode, idPrefix]);
|
|
324
324
|
var keyboardThemeMode = (0, providers_1.useKeyboardThemeMode)();
|
|
325
|
+
var offset = (0, providers_1.useWalletSetup)().offset;
|
|
326
|
+
var labelRef = (0, react_2.useRef)(null);
|
|
327
|
+
(0, react_2.useEffect)(function () {
|
|
328
|
+
setTimeout(function () {
|
|
329
|
+
var _a;
|
|
330
|
+
(_a = labelRef.current) === null || _a === void 0 ? void 0 : _a.click();
|
|
331
|
+
}, 100);
|
|
332
|
+
}, []);
|
|
325
333
|
return ((0, jsx_runtime_1.jsx)(xhub_keyboard_1.Keyboard, { theme: keyboardThemeMode, id: keyboardId, keyboardType: xhub_keyboard_1.KeyboardType.Text, layoutType: xhub_keyboard_1.LayoutType.Integer, value: value, onChange: onChange, viewFullHeight: true, styles: {
|
|
326
334
|
container: {
|
|
327
335
|
height: "100%",
|
|
@@ -329,7 +337,10 @@ var ChangePasscodeView = function (props) {
|
|
|
329
337
|
keyboardContainer: {
|
|
330
338
|
display: isLocked ? "none" : "block",
|
|
331
339
|
},
|
|
332
|
-
|
|
340
|
+
keyboards: {
|
|
341
|
+
paddingBottom: (offset === null || offset === void 0 ? void 0 : offset.bottom) || theme.styleMixins.pagePadding.paddingBottom,
|
|
342
|
+
},
|
|
343
|
+
}, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { ref: childPageLayoutRef, header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { hideBack: hideBack, overrideBack: handleBack, title: pageTitle, renderBack: function (Back) { return ((0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { useBrowserInput: false, htmlFor: keyboardId, children: Back })); } }), children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { sx: __assign({ display: "flex", flexDirection: "column", gap: "1rem", height: "100%", pb: 4 }, props.sx), children: (0, jsx_runtime_1.jsxs)(SwiperControlled_1.default, { ref: swiperControlledRef, disableSwipe: true, initialActiveTab: currentStep, sx: { height: "100%" }, swiperStyle: {
|
|
333
344
|
flex: 1,
|
|
334
345
|
}, children: [(0, jsx_runtime_1.jsx)(react_1.SwiperSlide, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
335
346
|
display: "flex",
|
|
@@ -338,7 +349,7 @@ var ChangePasscodeView = function (props) {
|
|
|
338
349
|
alignItems: "center",
|
|
339
350
|
gap: "1rem",
|
|
340
351
|
height: "100%",
|
|
341
|
-
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.sessionTitle), children: stepsContent[type_1.ChangePasscodeViewStep.ENTER_OLD_PASSCODE].title }), (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { useBrowserInput: false, htmlFor: keyboardId, children: (0, jsx_runtime_1.jsx)(OTP_1.default, { value: oldPasscode, numInputs: passcodeLength, otpInputType: OTP_1.OtpInputType.PASSWORD, readOnly: true }) }), unknownError, warningContent, !!error && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.validationError), { alignSelf: "left" }), children: error })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.sessionDescription), children: stepsContent[type_1.ChangePasscodeViewStep.ENTER_OLD_PASSCODE].description })] }) }), (0, jsx_runtime_1.jsx)(react_1.SwiperSlide, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
352
|
+
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.sessionTitle), children: stepsContent[type_1.ChangePasscodeViewStep.ENTER_OLD_PASSCODE].title }), (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { ref: labelRef, useBrowserInput: false, htmlFor: keyboardId, children: (0, jsx_runtime_1.jsx)(OTP_1.default, { value: oldPasscode, numInputs: passcodeLength, otpInputType: OTP_1.OtpInputType.PASSWORD, readOnly: true }) }), unknownError, warningContent, !!error && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.validationError), { alignSelf: "left" }), children: error })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.sessionDescription), children: stepsContent[type_1.ChangePasscodeViewStep.ENTER_OLD_PASSCODE].description })] }) }), (0, jsx_runtime_1.jsx)(react_1.SwiperSlide, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
342
353
|
display: "flex",
|
|
343
354
|
flexDirection: "column",
|
|
344
355
|
justifyContent: "center",
|
|
@@ -1,2 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
export interface InitPasscodeViewProps {
|
|
2
|
+
useAutoBack?: boolean;
|
|
3
|
+
}
|
|
4
|
+
declare function InitPasscodeView(props: InitPasscodeViewProps): import("react/jsx-runtime").JSX.Element;
|
|
2
5
|
export default InitPasscodeView;
|
|
@@ -7,12 +7,14 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
7
7
|
var useCustomRouter_1 = __importDefault(require("../../hooks/useCustomRouter"));
|
|
8
8
|
var ChangePasscodeView_1 = __importDefault(require("./ChangePasscodeView"));
|
|
9
9
|
var xhub_keyboard_1 = require("xhub-keyboard");
|
|
10
|
-
|
|
10
|
+
var react_1 = require("react");
|
|
11
|
+
function InitPasscodeView(props) {
|
|
12
|
+
var _a = props.useAutoBack, useAutoBack = _a === void 0 ? true : _a;
|
|
11
13
|
var idPrefix = (0, xhub_keyboard_1.useUniqueId)();
|
|
12
14
|
var router = (0, useCustomRouter_1.default)();
|
|
13
|
-
var handleBackInitPasscodeView = function () {
|
|
15
|
+
var handleBackInitPasscodeView = (0, react_1.useCallback)(function () {
|
|
14
16
|
router.back();
|
|
15
|
-
};
|
|
16
|
-
return ((0, jsx_runtime_1.jsx)(ChangePasscodeView_1.default, { hideBackInFirstStep: true, isInitPasscode: true, onBack: handleBackInitPasscodeView, idPrefix: idPrefix }));
|
|
17
|
+
}, [router]);
|
|
18
|
+
return ((0, jsx_runtime_1.jsx)(ChangePasscodeView_1.default, { hideBackInFirstStep: true, isInitPasscode: true, onBack: handleBackInitPasscodeView, idPrefix: idPrefix, useAutoBack: useAutoBack }));
|
|
17
19
|
}
|
|
18
20
|
exports.default = InitPasscodeView;
|
|
@@ -107,9 +107,9 @@ var useUniqueId_1 = require("../../../../hooks/useUniqueId");
|
|
|
107
107
|
var DrawerComponent_1 = __importDefault(require("../../../ui/DrawerComponent"));
|
|
108
108
|
var ModalLayout_1 = __importDefault(require("../../../ui/ModalLayout"));
|
|
109
109
|
var SelectNetwork_1 = __importDefault(require("./SelectNetwork"));
|
|
110
|
-
var ChildPageLayout_1 = __importDefault(require("../../../layouts/ChildPageLayout"));
|
|
111
110
|
var navigation_1 = require("next/navigation");
|
|
112
111
|
var react_2 = require("motion/react");
|
|
112
|
+
var FullHeightAndScroll_1 = __importDefault(require("../../../layouts/FullHeightAndScroll"));
|
|
113
113
|
var validateAddressDebounce = (0, lodash_1.debounce)(function (callback) {
|
|
114
114
|
callback();
|
|
115
115
|
}, 500, { leading: true, trailing: true });
|
|
@@ -383,7 +383,7 @@ function Form(props) {
|
|
|
383
383
|
container: {
|
|
384
384
|
height: "100%",
|
|
385
385
|
},
|
|
386
|
-
}, id: keyboardId, onChange: handleKeyboardChangeAmount, keyboardType: xhub_keyboard_1.KeyboardType.Double, value: amount === null || amount === void 0 ? void 0 : amount.toString(), keyboardId: "form-amount-keyboard-id", onOpen: handleKeyboardOpen, onClose: handleKeyboardClose, theme: keyboardThemeMode, children: (0, jsx_runtime_1.jsx)(
|
|
386
|
+
}, id: keyboardId, onChange: handleKeyboardChangeAmount, keyboardType: xhub_keyboard_1.KeyboardType.Double, value: amount === null || amount === void 0 ? void 0 : amount.toString(), keyboardId: "form-amount-keyboard-id", onOpen: handleKeyboardOpen, onClose: handleKeyboardClose, theme: keyboardThemeMode, children: (0, jsx_runtime_1.jsx)(FullHeightAndScroll_1.default, { children: (0, jsx_runtime_1.jsx)(react_2.AnimatePresence, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g16, minHeight: "100%", transition: "padding-bottom 0.3s ease-in-out" }), sx), (isKeyboardOpen
|
|
387
387
|
? {
|
|
388
388
|
paddingBottom: theme.styleMixins.customPadding.p8,
|
|
389
389
|
}
|
|
@@ -32,6 +32,8 @@ var DefaultPageLayout_1 = __importDefault(require("../../layouts/DefaultPageLayo
|
|
|
32
32
|
var Summary_1 = __importDefault(require("./components/Summary"));
|
|
33
33
|
var useCustomRouter_1 = __importDefault(require("../../../hooks/useCustomRouter"));
|
|
34
34
|
var mui_1 = require("../../../theme/mui");
|
|
35
|
+
var FullHeightAndScroll_1 = __importDefault(require("../../layouts/FullHeightAndScroll"));
|
|
36
|
+
var providers_1 = require("../../../providers");
|
|
35
37
|
var SendExternalStep;
|
|
36
38
|
(function (SendExternalStep) {
|
|
37
39
|
SendExternalStep[SendExternalStep["SELECT_TOKEN"] = 0] = "SELECT_TOKEN";
|
|
@@ -120,6 +122,7 @@ exports.SendExternalView = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
120
122
|
updateWithdrawToken();
|
|
121
123
|
}
|
|
122
124
|
}, [isInitPasscode, withdrawTokens]);
|
|
125
|
+
var offset = (0, providers_1.useWalletSetup)().offset;
|
|
123
126
|
return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: WITHDRAW_STEP_NAME[currentStep], overrideBack: handleBack }), children: (0, jsx_runtime_1.jsxs)(SwiperControlled_1.default, { disableSwipe: true, ref: swiperRef, swiperProps: {
|
|
124
127
|
spaceBetween: 32,
|
|
125
128
|
speed: isChangeSlidePromptly ? 0 : 500,
|
|
@@ -127,7 +130,7 @@ exports.SendExternalView = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
127
130
|
height: "100%",
|
|
128
131
|
}, swiperStyle: {
|
|
129
132
|
height: "100%",
|
|
130
|
-
}, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: { height: "100%", overflow: "hidden" }, children: (0, jsx_runtime_1.jsx)(
|
|
133
|
+
}, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: { height: "100%", overflow: "hidden" }, children: (0, jsx_runtime_1.jsx)(FullHeightAndScroll_1.default, { children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { children: (0, jsx_runtime_1.jsx)(SelectToken_1.default, { tokens: withdrawTokens, selectedToken: selectedToken, onChangeToken: handleSelectToken }) }) }) }, SendExternalStep.SELECT_TOKEN), (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: { minHeight: "100%" }, children: (0, jsx_runtime_1.jsx)(react_1.Suspense, { children: !!selectedToken && ((0, jsx_runtime_1.jsx)(Form_1.default, { sx: __assign(__assign({}, theme.styleMixins.pagePadding), { paddingBottom: (offset === null || offset === void 0 ? void 0 : offset.bottom) || theme.styleMixins.pagePadding.paddingBottom }), selectedToken: selectedToken, onContinue: gotoConfirmStep }, clearFormKey)) }) }, SendExternalStep.ADDRESS_FORM), (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: { minHeight: "100%" }, children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { sx: {
|
|
131
134
|
height: "100%",
|
|
132
135
|
}, children: payload && ((0, jsx_runtime_1.jsx)(Summary_1.default, { estimateFee: estimateFee, payload: __assign(__assign({}, payload), { await_completion: true }), selectedToken: selectedToken, confirmProps: {
|
|
133
136
|
onSuccess: handleSendSuccess,
|
|
@@ -101,9 +101,9 @@ var type_1 = require("../../../../services/axios/get-activities-service/type");
|
|
|
101
101
|
var Fees_1 = __importStar(require("../../../ui/Fees"));
|
|
102
102
|
var xhub_keyboard_1 = require("xhub-keyboard");
|
|
103
103
|
var useUniqueId_1 = require("../../../../hooks/useUniqueId");
|
|
104
|
-
var ChildPageLayout_1 = __importDefault(require("../../../layouts/ChildPageLayout"));
|
|
105
104
|
var Formatter_1 = __importDefault(require("../../../ui/Formatter"));
|
|
106
105
|
var navigation_1 = require("next/navigation");
|
|
106
|
+
var FullHeightAndScroll_1 = __importDefault(require("../../../layouts/FullHeightAndScroll"));
|
|
107
107
|
var validateAddressDebounce = (0, lodash_1.debounce)(function (callback) {
|
|
108
108
|
callback();
|
|
109
109
|
}, 500, { leading: true, trailing: true });
|
|
@@ -284,7 +284,7 @@ function Form(props) {
|
|
|
284
284
|
container: {
|
|
285
285
|
height: "100%",
|
|
286
286
|
},
|
|
287
|
-
}, id: keyboardId, onChange: handleKeyboardChangeAmount, keyboardType: xhub_keyboard_1.KeyboardType.Double, value: amount === null || amount === void 0 ? void 0 : amount.toString(), keyboardId: "form-amount-keyboard-id", onOpen: handleKeyboardOpen, onClose: handleKeyboardClose, theme: keyboardThemeMode, children: (0, jsx_runtime_1.jsx)(
|
|
287
|
+
}, id: keyboardId, onChange: handleKeyboardChangeAmount, keyboardType: xhub_keyboard_1.KeyboardType.Double, value: amount === null || amount === void 0 ? void 0 : amount.toString(), keyboardId: "form-amount-keyboard-id", onOpen: handleKeyboardOpen, onClose: handleKeyboardClose, theme: keyboardThemeMode, children: (0, jsx_runtime_1.jsx)(FullHeightAndScroll_1.default, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g16, minHeight: "100%", transition: "padding-bottom 0.3s ease-in-out" }), sx), (isKeyboardOpen
|
|
288
288
|
? {
|
|
289
289
|
paddingBottom: theme.styleMixins.customPadding.p8,
|
|
290
290
|
}
|
|
@@ -33,6 +33,7 @@ var Summary_1 = __importDefault(require("./components/Summary"));
|
|
|
33
33
|
var Result_1 = __importDefault(require("./components/Result"));
|
|
34
34
|
var useCustomRouter_1 = __importDefault(require("../../../hooks/useCustomRouter"));
|
|
35
35
|
var mui_1 = require("../../../theme/mui");
|
|
36
|
+
var FullHeightAndScroll_1 = __importDefault(require("../../layouts/FullHeightAndScroll"));
|
|
36
37
|
var TransferStep;
|
|
37
38
|
(function (TransferStep) {
|
|
38
39
|
TransferStep[TransferStep["SELECT_TOKEN"] = 0] = "SELECT_TOKEN";
|
|
@@ -136,13 +137,13 @@ exports.SendInternalView = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
136
137
|
height: "100%",
|
|
137
138
|
}, swiperStyle: {
|
|
138
139
|
height: "100%",
|
|
139
|
-
}, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: { height: "100%", overflow: "hidden" }, children: (0, jsx_runtime_1.jsx)(
|
|
140
|
+
}, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: { height: "100%", overflow: "hidden" }, children: (0, jsx_runtime_1.jsx)(FullHeightAndScroll_1.default, { children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { children: (0, jsx_runtime_1.jsx)(SelectToken_1.default, { tokens: withdrawTokens, selectedToken: selectedToken, onChangeToken: handleSelectToken }) }) }) }, TransferStep.SELECT_TOKEN), (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: { minHeight: "100%" }, children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { sx: {
|
|
140
141
|
height: "100%",
|
|
141
142
|
paddingLeft: "0px",
|
|
142
143
|
paddingRight: "0px",
|
|
143
144
|
paddingTop: "0px",
|
|
144
145
|
paddingBottom: "0px",
|
|
145
|
-
}, children: selectedToken && ((0, jsx_runtime_1.jsx)(react_1.Suspense, { children: (0, jsx_runtime_1.jsx)(Form_1.default, { sx: __assign({}, theme.styleMixins.pagePadding), selectedToken: selectedToken, onContinue: gotoConfirmStep }, clearFormKey) })) }) }, TransferStep.FORM), (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: { minHeight: "100%" }, children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { sx: {
|
|
146
|
+
}, children: selectedToken && ((0, jsx_runtime_1.jsx)(react_1.Suspense, { children: (0, jsx_runtime_1.jsx)(Form_1.default, { sx: __assign(__assign({}, theme.styleMixins.pagePadding), { paddingBottom: "0px" }), selectedToken: selectedToken, onContinue: gotoConfirmStep }, clearFormKey) })) }) }, TransferStep.FORM), (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: { minHeight: "100%" }, children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { sx: {
|
|
146
147
|
height: "100%",
|
|
147
148
|
}, children: payload && ((0, jsx_runtime_1.jsx)(Summary_1.default, { estimateFee: estimateFee, payload: __assign(__assign({}, payload), { await_completion: true }), selectedToken: selectedToken, confirmProps: {
|
|
148
149
|
onSuccess: handleSendSuccess,
|
|
@@ -94,9 +94,7 @@ var validate_wallet_address_service_1 = __importDefault(require("../../../../ser
|
|
|
94
94
|
var lodash_1 = require("lodash");
|
|
95
95
|
var Button_1 = __importStar(require("../../../ui/Button"));
|
|
96
96
|
var expose_1 = require("../../../../services/axios/expose");
|
|
97
|
-
var ChildPageLayout_1 = __importDefault(require("../../../layouts/ChildPageLayout"));
|
|
98
97
|
var navigation_1 = require("next/navigation");
|
|
99
|
-
var react_2 = require("motion/react");
|
|
100
98
|
var useNft_1 = __importDefault(require("../../../../hooks/data/useNfts/useNft"));
|
|
101
99
|
var NftItem_1 = __importDefault(require("../../../ui/NftItem"));
|
|
102
100
|
var ConfirmSendNft_1 = __importDefault(require("../../../ui/ConfirmSendNft"));
|
|
@@ -201,22 +199,22 @@ function Form(props) {
|
|
|
201
199
|
passcode: "", // passcode will be filled in the confirm component
|
|
202
200
|
};
|
|
203
201
|
}, [nftId, recipientAddress]);
|
|
204
|
-
return ((0, jsx_runtime_1.
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
202
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g16, minHeight: "100%", transition: "padding-bottom 0.3s ease-in-out" }), sx), children: [(0, jsx_runtime_1.jsx)(NftItem_1.default, { id: nftId, noAction: true, useSnapshot: true }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
203
|
+
fontSize: theme.typography.fontSize14,
|
|
204
|
+
color: theme.palette.text.primary,
|
|
205
|
+
fontWeight: theme.typography.fontWeight700,
|
|
206
|
+
}, children: "Wallet address" }), (0, jsx_runtime_1.jsx)(Input_1.default, { slotProps: {
|
|
207
|
+
input: {
|
|
208
|
+
placeholder: "Enter recipient address",
|
|
209
|
+
value: recipientAddress,
|
|
210
|
+
onChange: handleChangeRecipientAddress,
|
|
211
|
+
id: "recipient-address-input-id",
|
|
212
|
+
},
|
|
213
|
+
}, canClear: true, canPaste: true, canScan: true, sanitizeScanText: sanitizeScanText }), !!recipientAddressError && !isValidatingAddress && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.validationError), children: recipientAddressError }))] }), (0, jsx_runtime_1.jsx)(ConfirmSendNft_1.default, { payload: payload, sx: { width: "100%", marginTop: "auto" }, childrenRender: function (isSendingNft) { return ((0, jsx_runtime_1.jsx)(Button_1.default.Primary, { fullWidth: true, loading: isValidatingAddress || isSendingNft, onClick: handleContinue, status: !recipientAddress ||
|
|
214
|
+
!selectedNetwork ||
|
|
215
|
+
!!recipientAddressError ||
|
|
216
|
+
!nftId ||
|
|
217
|
+
isSendingNft
|
|
218
|
+
? Button_1.BUTTON_STATUS.DISABLED
|
|
219
|
+
: Button_1.BUTTON_STATUS.ENABLED, children: "Confirm" })); } })] }));
|
|
222
220
|
}
|
|
@@ -160,6 +160,7 @@ var SwapView = function () {
|
|
|
160
160
|
setIsChangeSlidePromptly(true);
|
|
161
161
|
}, []);
|
|
162
162
|
var keyboardThemeMode = (0, providers_1.useKeyboardThemeMode)();
|
|
163
|
+
var offset = (0, providers_1.useWalletSetup)().offset;
|
|
163
164
|
return ((0, jsx_runtime_1.jsx)(xhub_keyboard_1.Keyboard, { styles: {
|
|
164
165
|
container: {
|
|
165
166
|
height: "100%",
|
|
@@ -174,7 +175,7 @@ var SwapView = function () {
|
|
|
174
175
|
height: "100%",
|
|
175
176
|
}, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: __assign(__assign({ height: "100%", minHeight: "100%" }, theme.styleMixins.pagePadding), { paddingBottom: isKeyboardOpen
|
|
176
177
|
? theme.styleMixins.customPadding.p8
|
|
177
|
-
: theme.styleMixins.
|
|
178
|
+
: theme.styleMixins.pagePadding.paddingBottom }), children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
178
179
|
display: "flex",
|
|
179
180
|
flexDirection: "column",
|
|
180
181
|
gap: theme.styleMixins.gaps.g12,
|
|
@@ -191,7 +192,7 @@ var SwapView = function () {
|
|
|
191
192
|
alignSelf: "center",
|
|
192
193
|
}, children: ["1 ", fromTokenSelected === null || fromTokenSelected === void 0 ? void 0 : fromTokenSelected.name, " ~", " ", (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: toTokenRate, unit: toTokenSelected === null || toTokenSelected === void 0 ? void 0 : toTokenSelected.name })] })), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { sx: {
|
|
193
194
|
marginTop: "auto",
|
|
194
|
-
}, status: !fromInfoIsReady ? Button_1.BUTTON_STATUS.DISABLED : Button_1.BUTTON_STATUS.ENABLED, fullWidth: true, onClick: handlePreviewSwap, children: "Preview swap" })] }) }, SwapStep.FORM), (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: __assign({ height: "100%", minHeight: "100%" }, theme.styleMixins.pagePadding), children: (0, jsx_runtime_1.jsx)(Summary_1.default, { isActiveStep: currentStep === SwapStep.CONFIRM, fromToken: fromTokenSelected !== null && fromTokenSelected !== void 0 ? fromTokenSelected : undefined, toToken: toTokenSelected !== null && toTokenSelected !== void 0 ? toTokenSelected : undefined, fromAmount: +(fromAmount !== null && fromAmount !== void 0 ? fromAmount : 0), receiveAmountEstimate: fromAmount ? +(fromAmount !== null && fromAmount !== void 0 ? fromAmount : 0) * toTokenRate : 0, confirmProps: {
|
|
195
|
+
}, status: !fromInfoIsReady ? Button_1.BUTTON_STATUS.DISABLED : Button_1.BUTTON_STATUS.ENABLED, fullWidth: true, onClick: handlePreviewSwap, children: "Preview swap" })] }) }, SwapStep.FORM), (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: __assign(__assign({ height: "100%", minHeight: "100%" }, theme.styleMixins.pagePadding), { paddingBottom: (offset === null || offset === void 0 ? void 0 : offset.bottom) || theme.styleMixins.pagePadding.paddingBottom }), children: (0, jsx_runtime_1.jsx)(Summary_1.default, { isActiveStep: currentStep === SwapStep.CONFIRM, fromToken: fromTokenSelected !== null && fromTokenSelected !== void 0 ? fromTokenSelected : undefined, toToken: toTokenSelected !== null && toTokenSelected !== void 0 ? toTokenSelected : undefined, fromAmount: +(fromAmount !== null && fromAmount !== void 0 ? fromAmount : 0), receiveAmountEstimate: fromAmount ? +(fromAmount !== null && fromAmount !== void 0 ? fromAmount : 0) * toTokenRate : 0, confirmProps: {
|
|
195
196
|
onClose: handleNewTransaction,
|
|
196
197
|
onSuccess: handleOnSuccessSwap,
|
|
197
198
|
} }) }, SwapStep.CONFIRM)] }) }) }));
|
package/package.json
CHANGED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
import { Output, SupportedToken } from "../../../services/axios/get-swap-tokens-list-service/type";
|
|
2
|
-
interface ModalSelectTokenProps {
|
|
3
|
-
setSwapToken?: (token: SupportedToken) => void;
|
|
4
|
-
token?: SupportedToken;
|
|
5
|
-
outputToken?: Output;
|
|
6
|
-
setOutputToken?: (output: Output) => void;
|
|
7
|
-
}
|
|
8
|
-
declare const ModalSelectToken: (props: ModalSelectTokenProps) => import("react/jsx-runtime").JSX.Element;
|
|
9
|
-
export default ModalSelectToken;
|