tek-wallet 0.0.763 → 0.0.765

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.
Files changed (53) hide show
  1. package/dist/components/TekWallet/components/index.d.ts +2 -0
  2. package/dist/components/TekWallet/components/index.js +2 -0
  3. package/dist/components/TekWallet/components/layouts/ChildPageLayout/index.d.ts +6 -0
  4. package/dist/components/TekWallet/components/layouts/ChildPageLayout/index.js +2 -2
  5. package/dist/components/TekWallet/components/layouts/ChildPageLayout/style.d.ts +2 -0
  6. package/dist/components/TekWallet/components/layouts/ChildPageLayout/style.js +9 -0
  7. package/dist/components/TekWallet/components/ui/ActivitiesTypeSlice/index.d.ts +2 -0
  8. package/dist/components/TekWallet/components/ui/ActivitiesTypeSlice/index.js +6 -6
  9. package/dist/components/TekWallet/components/ui/ActivityDetail/index.js +5 -4
  10. package/dist/components/TekWallet/components/ui/ActivityItem/index.js +2 -2
  11. package/dist/components/TekWallet/components/ui/AnalyticGroupCenter/index.js +1 -1
  12. package/dist/components/TekWallet/components/ui/Button/index.js +2 -2
  13. package/dist/components/TekWallet/components/ui/ConfirmByPasscode/index.js +6 -7
  14. package/dist/components/TekWallet/components/ui/ConfirmSwapToken/Result.js +7 -4
  15. package/dist/components/TekWallet/components/ui/DelayMounted/index.js +1 -1
  16. package/dist/components/TekWallet/components/ui/DetailSwapResult/index.js +6 -6
  17. package/dist/components/TekWallet/components/ui/ListItemCustom/index.js +1 -1
  18. package/dist/components/TekWallet/components/ui/NetworkSelection/index.js +3 -1
  19. package/dist/components/TekWallet/components/ui/ReceiveFunction/index.js +126 -107
  20. package/dist/components/TekWallet/components/ui/ScanQRToSend/index.js +7 -2
  21. package/dist/components/TekWallet/components/ui/SmartList/index.d.ts +2 -1
  22. package/dist/components/TekWallet/components/ui/SmartList/index.js +2 -2
  23. package/dist/components/TekWallet/components/ui/SwapFunction/index.js +37 -38
  24. package/dist/components/TekWallet/components/ui/TokenSelection/index.js +1 -1
  25. package/dist/components/TekWallet/components/ui/WaitingData/index.js +7 -6
  26. package/dist/components/TekWallet/components/views/ActivityView/index.js +5 -2
  27. package/dist/components/TekWallet/components/views/AssetView/index.js +16 -6
  28. package/dist/components/TekWallet/components/views/NotFoundView/index.js +31 -1
  29. package/dist/components/TekWallet/components/views/SendExternalView/components/Form.js +102 -77
  30. package/dist/components/TekWallet/components/views/SendExternalView/index.js +1 -7
  31. package/dist/components/TekWallet/components/views/SendInternalView/components/Form.js +60 -59
  32. package/dist/components/TekWallet/components/views/SendInternalView/index.js +2 -2
  33. package/dist/components/TekWallet/components/views/SettingView/index.js +44 -2
  34. package/dist/components/TekWallet/components/views/SwapView/components/FromCard/FromCardSkeleton.d.ts +2 -0
  35. package/dist/components/TekWallet/components/views/SwapView/components/FromCard/FromCardSkeleton.js +27 -0
  36. package/dist/components/TekWallet/components/views/SwapView/components/FromCard/index.d.ts +3 -2
  37. package/dist/components/TekWallet/components/views/SwapView/components/FromCard/index.js +22 -24
  38. package/dist/components/TekWallet/components/views/SwapView/components/{CardTo → ToCard}/index.d.ts +2 -2
  39. package/dist/components/TekWallet/components/views/SwapView/components/{CardTo → ToCard}/index.js +2 -2
  40. package/dist/components/TekWallet/components/views/SwapView/index.d.ts +1 -10
  41. package/dist/components/TekWallet/components/views/SwapView/index.js +41 -59
  42. package/dist/components/TekWallet/components/views/TekWalletView/index.js +2 -2
  43. package/dist/components/TekWallet/hooks/useEventHandler.js +2 -2
  44. package/dist/components/TekWallet/providers/ActivitiesProvider/const.d.ts +1 -1
  45. package/dist/components/TekWallet/providers/ActivitiesProvider/const.js +1 -1
  46. package/dist/components/TekWallet/providers/EventHandlerProvider/index.js +3 -3
  47. package/dist/components/TekWallet/providers/RealtimeProvider/index.js +5 -1
  48. package/dist/components/TekWallet/providers/TekWalletProvider/index.d.ts +6 -0
  49. package/dist/components/TekWallet/providers/TekWalletProvider/index.js +7 -1
  50. package/dist/components/TekWallet/services/axios/get-swap-tokens-list-service/type.d.ts +1 -0
  51. package/dist/components/TekWallet/services/axios/type.d.ts +1 -0
  52. package/dist/components/TekWallet/theme/mui/theme.js +2 -2
  53. package/package.json +1 -1
@@ -15,16 +15,19 @@ var material_1 = require("@mui/material");
15
15
  var ThemeProvider_1 = require("../../../providers/ThemeProvider");
16
16
  var react_2 = require("swiper/react");
17
17
  var ActivitiesTypeSlice_1 = __importDefault(require("../../ui/ActivitiesTypeSlice"));
18
+ var TekWalletProvider_1 = require("../../../providers/TekWalletProvider");
18
19
  var ActivityView = function (props) {
19
20
  var sx = props.sx;
20
21
  var theme = (0, ThemeProvider_1.useTheme)();
22
+ var options = (0, TekWalletProvider_1.useWalletConfig)().options;
23
+ var hideBackButtons = (options || {}).hideBackButtons;
21
24
  var swiperRef = (0, react_1.useRef)(null);
22
25
  var activityTypes = (0, useActivities_1.default)().activityTypes;
23
26
  var _a = (0, react_1.useState)(0), activeTab = _a[0], setActiveTab = _a[1];
24
27
  var handleSlideChange = function (index) {
25
28
  setActiveTab(index);
26
29
  };
27
- return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "Activities" }), sx: sx, children: (0, jsx_runtime_1.jsx)(SwiperControlled_1.default, { ref: swiperRef,
30
+ return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "Activities", hideBack: !!(hideBackButtons === null || hideBackButtons === void 0 ? void 0 : hideBackButtons.activity) }), sx: sx, children: (0, jsx_runtime_1.jsx)(SwiperControlled_1.default, { ref: swiperRef,
28
31
  // tabParamName="activity-tab"
29
32
  swiperProps: {
30
33
  slidesPerView: 1,
@@ -56,7 +59,7 @@ var ActivityView = function (props) {
56
59
  }, children: activityTypes === null || activityTypes === void 0 ? void 0 : activityTypes.map(function (type, index) {
57
60
  return ((0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: {
58
61
  position: "relative",
59
- }, children: (0, jsx_runtime_1.jsx)(ActivitiesTypeSlice_1.default, { type: type, isActive: activeTab === index }) }, index));
62
+ }, children: (index === activeTab || index === activeTab - 1 || index === activeTab + 1) && ((0, jsx_runtime_1.jsx)(ActivitiesTypeSlice_1.default, { type: type, isActive: activeTab === index })) }, index));
60
63
  }) }) }));
61
64
  };
62
65
  exports.ActivityView = ActivityView;
@@ -82,6 +82,7 @@ var xhub_keyboard_1 = require("xhub-keyboard");
82
82
  var useCustomRouter_1 = __importDefault(require("../../../hooks/useCustomRouter"));
83
83
  var BasicAmountGroup_1 = __importDefault(require("../../ui/BasicAmountGroup"));
84
84
  var AssetViewHeader_1 = __importDefault(require("../../ui/AssetViewHeader"));
85
+ var ScanQRToSend_1 = __importDefault(require("../../ui/ScanQRToSend"));
85
86
  var AssetView = function (props) {
86
87
  var sx = props.sx, rest = __rest(props, ["sx"]);
87
88
  var _a = (0, useWalletData_1.default)(), isInitPasscode = _a.isInitPasscode, masterWallet = _a.masterWallet;
@@ -127,12 +128,21 @@ var AssetView = function (props) {
127
128
  fontWeight: theme.typography.fontWeight400,
128
129
  color: theme.palette.text.black,
129
130
  cursor: "pointer",
130
- }, children: "View all" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { iconKey: "IC_ARROW_RIGHT", width: 18, height: 18 })] })] }), (0, jsx_runtime_1.jsx)(ActivitiesTypeSlice_1.default, { type: const_1.ACTIVITIES_TYPE_ALL, limitItems: 4, isActive: true, sx: {
131
- paddingBottom: 0,
132
- paddingTop: 0,
133
- paddingLeft: 0,
134
- paddingRight: 0,
135
- } })] })), (0, jsx_runtime_1.jsx)(TokensBoard_1.default, {})] })))] }));
131
+ }, children: "View all" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { iconKey: "IC_ARROW_RIGHT", width: 18, height: 18 })] })] }), (0, jsx_runtime_1.jsx)(ScanQRToSend_1.default, { children: "Scan QR Code" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
132
+ position: "relative",
133
+ left: "-".concat(theme.mixins.customPadding.p16),
134
+ width: "calc(100% + ".concat(theme.mixins.customPadding.p16, " * 2)"),
135
+ }, children: (0, jsx_runtime_1.jsx)(ActivitiesTypeSlice_1.default, { type: const_1.ACTIVITIES_TYPE_ALL, limitItems: 4, isActive: true, sx: {
136
+ paddingBottom: 0,
137
+ paddingTop: 0,
138
+ paddingLeft: 0,
139
+ paddingRight: 0,
140
+ }, smartListProps: {
141
+ bodySx: {
142
+ pt: 0,
143
+ pb: 0,
144
+ },
145
+ } }) })] })), (0, jsx_runtime_1.jsx)(TokensBoard_1.default, {})] })))] }));
136
146
  };
137
147
  exports.AssetView = AssetView;
138
148
  exports.default = exports.AssetView;
@@ -1,7 +1,37 @@
1
1
  "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
2
5
  Object.defineProperty(exports, "__esModule", { value: true });
3
6
  var jsx_runtime_1 = require("react/jsx-runtime");
7
+ var material_1 = require("@mui/material");
8
+ var Button_1 = __importDefault(require("../../ui/Button"));
4
9
  function NotFoundView() {
5
- return (0, jsx_runtime_1.jsx)("div", { className: "text-red-500", children: "Not Found" });
10
+ var handleGoBack = function () {
11
+ window.history.back();
12
+ };
13
+ return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
14
+ minHeight: "100dvh",
15
+ display: "flex",
16
+ alignItems: "center",
17
+ justifyContent: "center",
18
+ backgroundColor: "grey.50",
19
+ p: 3,
20
+ }, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
21
+ textAlign: "center",
22
+ maxWidth: 400,
23
+ }, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h1", sx: {
24
+ fontSize: "6rem",
25
+ fontWeight: "bold",
26
+ color: "grey.400",
27
+ mb: 2,
28
+ }, children: "404" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "h4", sx: {
29
+ fontWeight: "semibold",
30
+ color: "grey.700",
31
+ mb: 1,
32
+ }, children: "Page Not Found" }), (0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body1", sx: {
33
+ color: "grey.600",
34
+ mb: 3,
35
+ }, children: "Sorry, the page you are looking for does not exist." }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { fullWidth: true, onClick: handleGoBack, children: "Go Back" })] }) }));
6
36
  }
7
37
  exports.default = NotFoundView;
@@ -107,6 +107,8 @@ 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
+ var navigation_1 = require("next/navigation");
110
112
  var validateAddressDebounce = (0, lodash_1.debounce)(function (callback) {
111
113
  callback();
112
114
  }, 500, { leading: true, trailing: true });
@@ -116,6 +118,8 @@ var getEstimateFeeDebounce = (0, lodash_1.debounce)(function (callback) {
116
118
  function Form(props) {
117
119
  var _this = this;
118
120
  var theme = (0, providers_1.useTheme)();
121
+ var searchParams = (0, navigation_1.useSearchParams)();
122
+ var address = searchParams.get("address") || "";
119
123
  var selectedToken = props.selectedToken, onContinue = props.onContinue, sx = props.sx;
120
124
  var _a = (0, react_1.useState)(""), recipientAddress = _a[0], setRecipientAddress = _a[1];
121
125
  var _b = (0, react_1.useState)(), recipientAddressError = _b[0], setRecipientAddressError = _b[1];
@@ -123,14 +127,15 @@ function Form(props) {
123
127
  var _d = (0, react_1.useState)(), amountErrorMessage = _d[0], setAmountErrorMessage = _d[1];
124
128
  var _e = (0, react_1.useState)(), amountError = _e[0], setAmountError = _e[1];
125
129
  var _f = (0, react_1.useState)(undefined), comment = _f[0], setComment = _f[1];
126
- var _g = (0, react_1.useState)(false), isValidatingAddress = _g[0], setIsValidatingAddress = _g[1];
130
+ var _g = (0, react_1.useState)(), memoError = _g[0], setMemoError = _g[1];
131
+ var _h = (0, react_1.useState)(false), isValidatingAddress = _h[0], setIsValidatingAddress = _h[1];
127
132
  var scannerAddressQrCodeRef = (0, react_1.useRef)(null);
128
- var _h = (0, react_1.useState)(false), isEstimatingFee = _h[0], setIsLoadingEstimateFee = _h[1];
129
- var _j = (0, react_1.useState)(), estimateFee = _j[0], setEstimateFee = _j[1];
130
- var _k = (0, react_1.useState)(false), isEnoughBalanceToPayFee = _k[0], setIsEnoughBalanceToPayFee = _k[1];
131
- var _l = (0, react_1.useState)(false), isKeyboardOpen = _l[0], setIsKeyboardOpen = _l[1];
132
- var _m = (0, react_1.useState)(), selectedNetwork = _m[0], setSelectedNetwork = _m[1];
133
- var _o = (0, react_1.useState)([]), networks = _o[0], setNetworks = _o[1];
133
+ var _j = (0, react_1.useState)(false), isEstimatingFee = _j[0], setIsLoadingEstimateFee = _j[1];
134
+ var _k = (0, react_1.useState)(), estimateFee = _k[0], setEstimateFee = _k[1];
135
+ var _l = (0, react_1.useState)(false), isEnoughBalanceToPayFee = _l[0], setIsEnoughBalanceToPayFee = _l[1];
136
+ var _m = (0, react_1.useState)(false), isKeyboardOpen = _m[0], setIsKeyboardOpen = _m[1];
137
+ var _o = (0, react_1.useState)(), selectedNetwork = _o[0], setSelectedNetwork = _o[1];
138
+ var _p = (0, react_1.useState)([]), networks = _p[0], setNetworks = _p[1];
134
139
  var selectNetworkDrawerRef = (0, react_1.useRef)(null);
135
140
  var minValue = (0, react_1.useMemo)(function () { return +((selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.min_value) || 0); }, [selectedNetwork]);
136
141
  var maxValue = (0, react_1.useMemo)(function () { return +((selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.max_value) || Infinity); }, [selectedNetwork]);
@@ -329,9 +334,21 @@ function Form(props) {
329
334
  target: { value: amount || "" },
330
335
  });
331
336
  };
332
- var handleChangeComment = function (e) {
337
+ var handleChangeComment = (0, react_1.useCallback)(function (e) {
333
338
  setComment(e.target.value);
334
- };
339
+ var networkPattern = selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.memo_regex;
340
+ if (!networkPattern) {
341
+ setMemoError(undefined);
342
+ return;
343
+ }
344
+ var pattern = new RegExp(networkPattern);
345
+ if (!pattern.test(e.target.value)) {
346
+ setMemoError("Invalid memo");
347
+ }
348
+ else {
349
+ setMemoError(undefined);
350
+ }
351
+ }, [selectedNetwork]);
335
352
  var handleContinue = function () {
336
353
  var _a;
337
354
  if (!selectedNetwork)
@@ -368,6 +385,13 @@ function Form(props) {
368
385
  setSelectedNetwork(network);
369
386
  closeSelectNetwork();
370
387
  };
388
+ (0, react_1.useEffect)(function () {
389
+ if (address) {
390
+ handleChangeRecipientAddress({
391
+ target: { value: address },
392
+ });
393
+ }
394
+ }, [address]);
371
395
  (0, react_1.useEffect)(function () {
372
396
  validateAmount((amount === null || amount === void 0 ? void 0 : amount.toString()) || "");
373
397
  }, [amount, validateAmount]);
@@ -375,76 +399,77 @@ function Form(props) {
375
399
  container: {
376
400
  height: "100%",
377
401
  },
378
- }, 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, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16, minHeight: "100%", transition: "padding-bottom 0.3s ease-in-out" }), sx), (isKeyboardOpen
379
- ? {
380
- paddingBottom: theme.mixins.customPadding.p8,
381
- }
382
- : {})), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
383
- fontSize: theme.typography.fontSize14,
384
- color: theme.palette.text.black,
385
- fontWeight: theme.typography.fontWeight700,
386
- }, children: "Wallet address" }), (0, jsx_runtime_1.jsx)(Input_1.default, { sx: {
387
- paddingX: theme.mixins.customPadding.p16,
388
- }, inputRest: {
389
- placeholder: "Enter recipient address",
390
- value: recipientAddress,
391
- onChange: handleChangeRecipientAddress,
392
- id: "recipient-address-input-id",
393
- }, rightPart: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: !!recipientAddress ? ((0, jsx_runtime_1.jsx)("label", { htmlFor: "recipient-address-input-id", children: (0, jsx_runtime_1.jsx)(material_1.Box, { onClick: handleClearRecipientAddress, sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8, cursor: "pointer" }), children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 12, height: 12 }, children: SvgPath_1.IC_CLOSE }) }) })) : ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { onClick: openScannerAddressQrCode, children: (0, jsx_runtime_1.jsx)(Icon_1.default, { iconKey: "IC_SCAN", sx: { width: 18, height: 18 } }) }), (0, jsx_runtime_1.jsx)(material_1.Divider, { orientation: "vertical", variant: "fullWidth", flexItem: true }), (0, jsx_runtime_1.jsx)(material_1.Box, { onClick: handlePaste, children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 18, height: 18 }, children: SvgPath_1.IC_DOCUMENTS }) })] })) }) }), !!recipientAddressError && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: recipientAddressError }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8, opacity: allowSelectNetwork ? 1 : 0.5, pointerEvents: allowSelectNetwork ? "auto" : "none" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
394
- fontSize: theme.typography.fontSize14,
395
- color: theme.palette.text.black,
396
- fontWeight: theme.typography.fontWeight700,
397
- }, children: "Network" }), (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: selectNetworkDrawerRef, trigger: (0, jsx_runtime_1.jsx)(Input_1.default, { sx: {
398
- paddingLeft: theme.mixins.customPadding.p12,
399
- paddingRight: theme.mixins.customPadding.p16,
402
+ }, 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, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16, minHeight: "100%", transition: "padding-bottom 0.3s ease-in-out" }), sx), (isKeyboardOpen
403
+ ? {
404
+ paddingBottom: theme.mixins.customPadding.p8,
405
+ }
406
+ : {})), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
407
+ fontSize: theme.typography.fontSize14,
408
+ color: theme.palette.text.black,
409
+ fontWeight: theme.typography.fontWeight700,
410
+ }, children: "Wallet address" }), (0, jsx_runtime_1.jsx)(Input_1.default, { sx: {
411
+ paddingX: theme.mixins.customPadding.p16,
400
412
  }, inputRest: {
401
- placeholder: "Select a network",
402
- value: (selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.name) || "",
413
+ placeholder: "Enter recipient address",
414
+ value: recipientAddress,
403
415
  onChange: handleChangeRecipientAddress,
404
- inputProps: {
405
- readOnly: true,
406
- },
407
- }, leftPart: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: (0, jsx_runtime_1.jsx)(Icon_1.default, { iconKey: "IC_NETWORK", src: (selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.link) || undefined, sx: { width: 24, height: 24 } }) }), rightPart: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { display: "block" }, children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 10, height: 18, display: "block" }, children: SvgPath_1.ARROW_DOWN }) }) }), children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { title: "Select network", onClose: closeSelectNetwork, children: (0, jsx_runtime_1.jsx)(SelectNetwork_1.default, { networks: networks, selectedNetwork: selectedNetwork, selectedToken: selectedToken, onChangeNetwork: handleChangeNetwork }) }) })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8, alignItems: "center", justifyContent: "space-between" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
408
- fontSize: theme.typography.fontSize14,
409
- color: theme.palette.text.black,
410
- fontWeight: theme.typography.fontWeight700,
411
- }, children: "Withdrawal amount" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8, alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontSize: theme.typography.fontSize11, color: theme.palette.text.accent }), children: "Your balance " }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontSize: theme.typography.fontSize12, color: theme.palette.text.black, fontWeight: theme.typography.fontWeight700 }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: balance, unit: " ".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name) }) })] })] }), (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { htmlFor: keyboardId, children: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Input, { elementsAcceptIds: ["form-amount-keyboard-id"], value: amount === null || amount === void 0 ? void 0 : amount.toString(), displayType: xhub_keyboard_1.DisplayType.Double, placeholder: ((0, jsx_runtime_1.jsx)(material_1.Box, { component: "span", sx: { pointerEvents: "none" }, children: placeholder })), styles: {
412
- container: {
413
- paddingRight: theme.mixins.customPadding.p4,
414
- paddingLeft: theme.mixins.customPadding.p16,
415
- paddingTop: theme.mixins.customPadding.p4,
416
- paddingBottom: theme.mixins.customPadding.p4,
417
- border: "1px ".concat(theme.palette.border.primary, " solid"),
418
- borderRadius: theme.mixins.customRadius.r8,
419
- },
420
- }, rightElement: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: (0, jsx_runtime_1.jsx)(material_1.Box, { onClick: handleClickMaxAmount, sx: {
421
- background: theme.palette.background.tertiary,
416
+ id: "recipient-address-input-id",
417
+ }, rightPart: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: !!recipientAddress ? ((0, jsx_runtime_1.jsx)("label", { htmlFor: "recipient-address-input-id", children: (0, jsx_runtime_1.jsx)(material_1.Box, { onClick: handleClearRecipientAddress, sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8, cursor: "pointer" }), children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 12, height: 12 }, children: SvgPath_1.IC_CLOSE }) }) })) : ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { onClick: openScannerAddressQrCode, children: (0, jsx_runtime_1.jsx)(Icon_1.default, { iconKey: "IC_SCAN", sx: { width: 18, height: 18 } }) }), (0, jsx_runtime_1.jsx)(material_1.Divider, { orientation: "vertical", variant: "fullWidth", flexItem: true }), (0, jsx_runtime_1.jsx)(material_1.Box, { onClick: handlePaste, children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 18, height: 18 }, children: SvgPath_1.IC_DOCUMENTS }) })] })) }) }), !!recipientAddressError && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: recipientAddressError }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8, opacity: allowSelectNetwork ? 1 : 0.5, pointerEvents: allowSelectNetwork ? "auto" : "none" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
418
+ fontSize: theme.typography.fontSize14,
419
+ color: theme.palette.text.black,
420
+ fontWeight: theme.typography.fontWeight700,
421
+ }, children: "Network" }), (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: selectNetworkDrawerRef, trigger: (0, jsx_runtime_1.jsx)(Input_1.default, { sx: {
422
+ paddingLeft: theme.mixins.customPadding.p12,
423
+ paddingRight: theme.mixins.customPadding.p16,
424
+ }, inputRest: {
425
+ placeholder: "Select a network",
426
+ value: (selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.name) || "",
427
+ onChange: handleChangeRecipientAddress,
428
+ inputProps: {
429
+ readOnly: true,
430
+ },
431
+ }, leftPart: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: (0, jsx_runtime_1.jsx)(Icon_1.default, { iconKey: "IC_NETWORK", src: (selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.link) || undefined, sx: { width: 24, height: 24 } }) }), rightPart: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { display: "block" }, children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 10, height: 18, display: "block" }, children: SvgPath_1.ARROW_DOWN }) }) }), children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { title: "Select network", onClose: closeSelectNetwork, children: (0, jsx_runtime_1.jsx)(SelectNetwork_1.default, { networks: networks, selectedNetwork: selectedNetwork, selectedToken: selectedToken, onChangeNetwork: handleChangeNetwork }) }) })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8, alignItems: "center", justifyContent: "space-between" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
432
+ fontSize: theme.typography.fontSize14,
422
433
  color: theme.palette.text.black,
423
- fontSize: theme.typography.fontSize11,
424
434
  fontWeight: theme.typography.fontWeight700,
425
- borderRadius: theme.mixins.customRadius.r4,
426
- paddingX: theme.mixins.customPadding.p16,
427
- paddingY: theme.mixins.customPadding.p8,
428
- border: "0px solid",
429
- cursor: "pointer",
430
- }, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
431
- fontSize: theme.typography.fontSize12,
432
- color: theme.palette.text.primary,
433
- fontWeight: theme.typography.fontWeight500,
434
- }, children: "Max" }) }) }) }) }), !!amountErrorMessage && ((0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: [amountErrorMessage, " ", !!amountError && (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: amountError, unit: " ".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name) })] }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
435
- fontSize: theme.typography.fontSize14,
436
- color: theme.palette.text.black,
437
- fontWeight: theme.typography.fontWeight700,
438
- }, children: "Comment" }), (0, jsx_runtime_1.jsx)(Input_1.default, { inputRest: {
439
- placeholder: "Enter comment if needed",
440
- value: comment,
441
- onChange: handleChangeComment,
442
- } }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.validationDescription), children: "Enter comment if your receiving platform requires one to avoid losing your funds." })] }), (0, jsx_runtime_1.jsx)(Fees_1.default, { isFeePaidByAmount: true, feesData: estimateFee, amount: +amount, tokenSlug: (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.slug) || "", feesStyle: Fees_1.FeesStyle.WITH_BACKGROUND, setIsEnoughBalanceToPayFee: setIsEnoughBalanceToPayFee }), (0, jsx_runtime_1.jsx)(QrCodeReader_1.default, { ref: scannerAddressQrCodeRef, onResult: handleScanAddressQrCode }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { loading: isValidatingAddress || isEstimatingFee, onClick: handleContinue, status: !recipientAddress ||
443
- !selectedNetwork ||
444
- !amount ||
445
- !!recipientAddressError ||
446
- !!amountError ||
447
- !isEnoughBalanceToPayFee
448
- ? Button_1.BUTTON_STATUS.DISABLED
449
- : Button_1.BUTTON_STATUS.ENABLED, sx: { width: "100%", marginTop: "auto" }, children: "Continue" })] }) }));
435
+ }, children: "Withdrawal amount" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8, alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontSize: theme.typography.fontSize11, color: theme.palette.text.accent }), children: "Your balance " }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontSize: theme.typography.fontSize12, color: theme.palette.text.black, fontWeight: theme.typography.fontWeight700 }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: balance, unit: " ".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name) }) })] })] }), (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { htmlFor: keyboardId, children: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Input, { elementsAcceptIds: ["form-amount-keyboard-id"], value: amount === null || amount === void 0 ? void 0 : amount.toString(), displayType: xhub_keyboard_1.DisplayType.Double, placeholder: ((0, jsx_runtime_1.jsx)(material_1.Box, { component: "span", sx: { pointerEvents: "none" }, children: placeholder })), styles: {
436
+ container: {
437
+ paddingRight: theme.mixins.customPadding.p4,
438
+ paddingLeft: theme.mixins.customPadding.p16,
439
+ paddingTop: theme.mixins.customPadding.p4,
440
+ paddingBottom: theme.mixins.customPadding.p4,
441
+ border: "1px ".concat(theme.palette.border.primary, " solid"),
442
+ borderRadius: theme.mixins.customRadius.r8,
443
+ },
444
+ }, rightElement: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: (0, jsx_runtime_1.jsx)(material_1.Box, { onClick: handleClickMaxAmount, sx: {
445
+ background: theme.palette.background.tertiary,
446
+ color: theme.palette.text.black,
447
+ fontSize: theme.typography.fontSize11,
448
+ fontWeight: theme.typography.fontWeight700,
449
+ borderRadius: theme.mixins.customRadius.r4,
450
+ paddingX: theme.mixins.customPadding.p16,
451
+ paddingY: theme.mixins.customPadding.p8,
452
+ border: "0px solid",
453
+ cursor: "pointer",
454
+ }, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
455
+ fontSize: theme.typography.fontSize12,
456
+ color: theme.palette.text.primary,
457
+ fontWeight: theme.typography.fontWeight500,
458
+ }, children: "Max" }) }) }) }) }), !!amountErrorMessage && ((0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: [amountErrorMessage, " ", !!amountError && ((0, jsx_runtime_1.jsx)(Formatter_1.default, { value: amountError, unit: " ".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name) }))] }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
459
+ fontSize: theme.typography.fontSize14,
460
+ color: theme.palette.text.black,
461
+ fontWeight: theme.typography.fontWeight700,
462
+ }, children: "Memo" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Input_1.default, { inputRest: {
463
+ placeholder: "Enter memo if needed",
464
+ value: comment,
465
+ onChange: handleChangeComment,
466
+ } }), !!memoError && (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: memoError })] }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.validationDescription), children: "Enter memo if your receiving platform requires one to avoid losing your funds." })] }), (0, jsx_runtime_1.jsx)(Fees_1.default, { isFeePaidByAmount: true, feesData: estimateFee, amount: +amount, tokenSlug: (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.slug) || "", feesStyle: Fees_1.FeesStyle.WITH_BACKGROUND, setIsEnoughBalanceToPayFee: setIsEnoughBalanceToPayFee }), (0, jsx_runtime_1.jsx)(QrCodeReader_1.default, { ref: scannerAddressQrCodeRef, onResult: handleScanAddressQrCode }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { loading: isValidatingAddress || isEstimatingFee, onClick: handleContinue, status: !recipientAddress ||
467
+ !selectedNetwork ||
468
+ !amount ||
469
+ !!recipientAddressError ||
470
+ !!amountError ||
471
+ !!memoError ||
472
+ !isEnoughBalanceToPayFee
473
+ ? Button_1.BUTTON_STATUS.DISABLED
474
+ : Button_1.BUTTON_STATUS.ENABLED, sx: { width: "100%", marginTop: "auto" }, children: "Continue" })] }) }) }));
450
475
  }
@@ -126,13 +126,7 @@ var SendExternalView = (0, react_1.forwardRef)(function (props, ref) {
126
126
  height: "100%",
127
127
  }, swiperStyle: {
128
128
  height: "100%",
129
- }, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: { minHeight: "100%" }, 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)(DefaultPageLayout_1.default, { sx: {
130
- height: "100%",
131
- paddingLeft: "0px",
132
- paddingRight: "0px",
133
- paddingTop: "0px",
134
- paddingBottom: "0px",
135
- }, children: (0, jsx_runtime_1.jsx)(Form_1.default, { sx: __assign({}, theme.mixins.pagePadding), 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: {
129
+ }, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: { height: "100%", overflow: "hidden" }, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_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), "price", (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({}, theme.mixins.pagePadding), 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: {
136
130
  height: "100%",
137
131
  }, children: payload && ((0, jsx_runtime_1.jsx)(Summary_1.default, { estimateFee: estimateFee, payload: __assign(__assign({}, payload), { await_completion: true }), selectedToken: selectedToken, confirmProps: {
138
132
  onSuccess: handleSendSuccess,
@@ -104,6 +104,7 @@ var type_1 = require("../../../../services/axios/get-activities-service/type");
104
104
  var Fees_1 = __importStar(require("../../../ui/Fees"));
105
105
  var xhub_keyboard_1 = require("xhub-keyboard");
106
106
  var useUniqueId_1 = require("../../../../hooks/useUniqueId");
107
+ var ChildPageLayout_1 = __importDefault(require("../../../layouts/ChildPageLayout"));
107
108
  var validateAddressDebounce = (0, lodash_1.debounce)(function (callback) {
108
109
  callback();
109
110
  }, 500, { leading: true, trailing: true });
@@ -317,65 +318,65 @@ function Form(props) {
317
318
  container: {
318
319
  height: "100%",
319
320
  },
320
- }, 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, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16, minHeight: "100%", transition: "padding-bottom 0.3s ease-in-out" }), sx), (isKeyboardOpen
321
- ? {
322
- paddingBottom: theme.mixins.customPadding.p8,
323
- }
324
- : {})), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
325
- fontSize: theme.typography.fontSize14,
326
- color: theme.palette.text.black,
327
- fontWeight: theme.typography.fontWeight700,
328
- }, children: "Wallet address" }), (0, jsx_runtime_1.jsx)(Input_1.default, { sx: {
329
- paddingX: theme.mixins.customPadding.p16,
330
- }, inputRest: {
331
- placeholder: "Enter recipient address",
332
- value: recipientAddress,
333
- onChange: handleChangeRecipientAddress,
334
- }, rightPart: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: !!recipientAddress ? ((0, jsx_runtime_1.jsx)(material_1.Box, { onClick: handleClearRecipientAddress, sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8, cursor: "pointer" }), children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 12, height: 12 }, children: SvgPath_1.IC_CLOSE }) })) : ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { onClick: openScannerAddressQrCode, children: (0, jsx_runtime_1.jsx)(Icon_1.default, { iconKey: "IC_SCAN", sx: { width: 18, height: 18 } }) }), (0, jsx_runtime_1.jsx)(material_1.Divider, { orientation: "vertical", variant: "fullWidth", flexItem: true }), (0, jsx_runtime_1.jsx)(material_1.Box, { onClick: handlePaste, children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 18, height: 18 }, children: SvgPath_1.IC_DOCUMENTS }) })] })) }) }), !!recipientAddressError && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: recipientAddressError }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8, alignItems: "center", justifyContent: "space-between" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
335
- fontSize: theme.typography.fontSize14,
336
- color: theme.palette.text.black,
337
- fontWeight: theme.typography.fontWeight700,
338
- }, children: "Withdrawal amount" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8, alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontSize: theme.typography.fontSize11, color: theme.palette.text.accent }), children: "Your balance " }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontSize: theme.typography.fontSize12, color: theme.palette.text.black, fontWeight: theme.typography.fontWeight700 }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.balance, unit: " ".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name) }) })] })] }), (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { htmlFor: keyboardId, children: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Input, { elementsAcceptIds: ["form-amount-keyboard-id"], value: amount === null || amount === void 0 ? void 0 : amount.toString(), displayType: xhub_keyboard_1.DisplayType.Double, placeholder: ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
339
- display: "inline-flex",
340
- alignItems: "center",
341
- gap: theme.mixins.gaps.g4,
342
- pointerEvents: "none",
343
- }, children: [(0, jsx_runtime_1.jsx)(Formatter_1.default, { value: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.min_value }), " -", " ", (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.max_value, unit: " ".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name) })] })), styles: {
344
- container: {
345
- paddingRight: theme.mixins.customPadding.p4,
346
- paddingLeft: theme.mixins.customPadding.p16,
347
- paddingTop: theme.mixins.customPadding.p4,
348
- paddingBottom: theme.mixins.customPadding.p4,
349
- border: "1px ".concat(theme.palette.border.primary, " solid"),
350
- borderRadius: theme.mixins.customRadius.r8,
351
- },
352
- }, rightElement: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: (0, jsx_runtime_1.jsx)(material_1.Box, { onClick: handleClickMaxAmount, sx: {
353
- background: theme.palette.background.tertiary,
321
+ }, 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, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16, minHeight: "100%", transition: "padding-bottom 0.3s ease-in-out" }), sx), (isKeyboardOpen
322
+ ? {
323
+ paddingBottom: theme.mixins.customPadding.p8,
324
+ }
325
+ : {})), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
326
+ fontSize: theme.typography.fontSize14,
327
+ color: theme.palette.text.black,
328
+ fontWeight: theme.typography.fontWeight700,
329
+ }, children: "Wallet address" }), (0, jsx_runtime_1.jsx)(Input_1.default, { sx: {
330
+ paddingX: theme.mixins.customPadding.p16,
331
+ }, inputRest: {
332
+ placeholder: "Enter recipient address",
333
+ value: recipientAddress,
334
+ onChange: handleChangeRecipientAddress,
335
+ }, rightPart: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: !!recipientAddress ? ((0, jsx_runtime_1.jsx)(material_1.Box, { onClick: handleClearRecipientAddress, sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8, cursor: "pointer" }), children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 12, height: 12 }, children: SvgPath_1.IC_CLOSE }) })) : ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { onClick: openScannerAddressQrCode, children: (0, jsx_runtime_1.jsx)(Icon_1.default, { iconKey: "IC_SCAN", sx: { width: 18, height: 18 } }) }), (0, jsx_runtime_1.jsx)(material_1.Divider, { orientation: "vertical", variant: "fullWidth", flexItem: true }), (0, jsx_runtime_1.jsx)(material_1.Box, { onClick: handlePaste, children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 18, height: 18 }, children: SvgPath_1.IC_DOCUMENTS }) })] })) }) }), !!recipientAddressError && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: recipientAddressError }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8, alignItems: "center", justifyContent: "space-between" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
336
+ fontSize: theme.typography.fontSize14,
354
337
  color: theme.palette.text.black,
355
- fontSize: theme.typography.fontSize11,
356
338
  fontWeight: theme.typography.fontWeight700,
357
- borderRadius: theme.mixins.customRadius.r4,
358
- paddingX: theme.mixins.customPadding.p16,
359
- paddingY: theme.mixins.customPadding.p8,
360
- border: "0px solid",
361
- cursor: "pointer",
362
- }, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
363
- fontSize: theme.typography.fontSize12,
364
- color: theme.palette.text.primary,
365
- fontWeight: theme.typography.fontWeight500,
366
- }, children: "Max" }) }) }) }) }), !!amountErrorMessage && ((0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: [amountErrorMessage, " ", !!amountError && (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: amountError, unit: " ".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name) })] }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
367
- fontSize: theme.typography.fontSize14,
368
- color: theme.palette.text.black,
369
- fontWeight: theme.typography.fontWeight700,
370
- }, children: "Message" }), (0, jsx_runtime_1.jsx)(Input_1.default, { inputRest: {
371
- placeholder: "Enter comment if needed",
372
- value: comment,
373
- onChange: handleChangeComment,
374
- } })] }), (0, jsx_runtime_1.jsx)(Fees_1.default, { isFeePaidByAmount: true, feesData: estimateFee, amount: +amount, tokenSlug: (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.slug) || "", feesStyle: Fees_1.FeesStyle.WITH_BACKGROUND, setIsEnoughBalanceToPayFee: setIsEnoughBalanceToPayFee }), (0, jsx_runtime_1.jsx)(QrCodeReader_1.default, { ref: scannerAddressQrCodeRef, onResult: handleScanAddressQrCode }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { loading: isValidatingAddress || isEstimatingFee, onClick: handleContinue, status: !recipientAddress ||
375
- !amount ||
376
- !!recipientAddressError ||
377
- !!amountError ||
378
- !isEnoughBalanceToPayFee
379
- ? Button_1.BUTTON_STATUS.DISABLED
380
- : Button_1.BUTTON_STATUS.ENABLED, sx: { width: "100%", marginTop: "auto" }, children: "Continue" })] }) }));
339
+ }, children: "Withdrawal amount" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8, alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontSize: theme.typography.fontSize11, color: theme.palette.text.accent }), children: "Your balance " }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontSize: theme.typography.fontSize12, color: theme.palette.text.black, fontWeight: theme.typography.fontWeight700 }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.balance, unit: " ".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name) }) })] })] }), (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { htmlFor: keyboardId, children: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Input, { elementsAcceptIds: ["form-amount-keyboard-id"], value: amount === null || amount === void 0 ? void 0 : amount.toString(), displayType: xhub_keyboard_1.DisplayType.Double, placeholder: ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
340
+ display: "inline-flex",
341
+ alignItems: "center",
342
+ gap: theme.mixins.gaps.g4,
343
+ pointerEvents: "none",
344
+ }, children: [(0, jsx_runtime_1.jsx)(Formatter_1.default, { value: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.min_value }), " -", " ", (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.max_value, unit: " ".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name) })] })), styles: {
345
+ container: {
346
+ paddingRight: theme.mixins.customPadding.p4,
347
+ paddingLeft: theme.mixins.customPadding.p16,
348
+ paddingTop: theme.mixins.customPadding.p4,
349
+ paddingBottom: theme.mixins.customPadding.p4,
350
+ border: "1px ".concat(theme.palette.border.primary, " solid"),
351
+ borderRadius: theme.mixins.customRadius.r8,
352
+ },
353
+ }, rightElement: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8 }), children: (0, jsx_runtime_1.jsx)(material_1.Box, { onClick: handleClickMaxAmount, sx: {
354
+ background: theme.palette.background.tertiary,
355
+ color: theme.palette.text.black,
356
+ fontSize: theme.typography.fontSize11,
357
+ fontWeight: theme.typography.fontWeight700,
358
+ borderRadius: theme.mixins.customRadius.r4,
359
+ paddingX: theme.mixins.customPadding.p16,
360
+ paddingY: theme.mixins.customPadding.p8,
361
+ border: "0px solid",
362
+ cursor: "pointer",
363
+ }, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
364
+ fontSize: theme.typography.fontSize12,
365
+ color: theme.palette.text.primary,
366
+ fontWeight: theme.typography.fontWeight500,
367
+ }, children: "Max" }) }) }) }) }), !!amountErrorMessage && ((0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: [amountErrorMessage, " ", !!amountError && ((0, jsx_runtime_1.jsx)(Formatter_1.default, { value: amountError, unit: " ".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name) }))] }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
368
+ fontSize: theme.typography.fontSize14,
369
+ color: theme.palette.text.black,
370
+ fontWeight: theme.typography.fontWeight700,
371
+ }, children: "Message" }), (0, jsx_runtime_1.jsx)(Input_1.default, { inputRest: {
372
+ placeholder: "Enter comment if needed",
373
+ value: comment,
374
+ onChange: handleChangeComment,
375
+ } })] }), (0, jsx_runtime_1.jsx)(Fees_1.default, { isFeePaidByAmount: true, feesData: estimateFee, amount: +amount, tokenSlug: (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.slug) || "", feesStyle: Fees_1.FeesStyle.WITH_BACKGROUND, setIsEnoughBalanceToPayFee: setIsEnoughBalanceToPayFee }), (0, jsx_runtime_1.jsx)(QrCodeReader_1.default, { ref: scannerAddressQrCodeRef, onResult: handleScanAddressQrCode }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { loading: isValidatingAddress || isEstimatingFee, onClick: handleContinue, status: !recipientAddress ||
376
+ !amount ||
377
+ !!recipientAddressError ||
378
+ !!amountError ||
379
+ !isEnoughBalanceToPayFee
380
+ ? Button_1.BUTTON_STATUS.DISABLED
381
+ : Button_1.BUTTON_STATUS.ENABLED, sx: { width: "100%", marginTop: "auto" }, children: "Continue" })] }) }) }));
381
382
  }
@@ -137,13 +137,13 @@ exports.SendInternalView = (0, react_1.forwardRef)(function (props, ref) {
137
137
  height: "100%",
138
138
  }, swiperStyle: {
139
139
  height: "100%",
140
- }, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: { minHeight: "100%" }, 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
+ }, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: { height: "100%", overflow: "hidden" }, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_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: {
141
141
  height: "100%",
142
142
  paddingLeft: "0px",
143
143
  paddingRight: "0px",
144
144
  paddingTop: "0px",
145
145
  paddingBottom: "0px",
146
- }, children: (0, jsx_runtime_1.jsx)(Form_1.default, { sx: __assign({}, theme.mixins.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)(Form_1.default, { sx: __assign({}, theme.mixins.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: {
147
147
  height: "100%",
148
148
  }, children: payload && ((0, jsx_runtime_1.jsx)(Summary_1.default, { estimateFee: estimateFee, payload: __assign(__assign({}, payload), { await_completion: true }), selectedToken: selectedToken, confirmProps: {
149
149
  onSuccess: handleSendSuccess,