tek-wallet 0.0.805 → 0.0.807
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/index.d.ts +2 -1
- package/dist/components/TekWallet/components/index.js +2 -1
- package/dist/components/TekWallet/components/layouts/ChildPageLayout/index.js +3 -3
- package/dist/components/TekWallet/components/layouts/DefaultPageLayout/index.js +3 -3
- package/dist/components/TekWallet/components/ui/ActivitiesTypeSlice/index.js +12 -8
- package/dist/components/TekWallet/components/ui/ActivityDetail/index.js +17 -19
- package/dist/components/TekWallet/components/ui/ActivityItem/index.js +13 -13
- package/dist/components/TekWallet/components/ui/AmountGroupAndChart/index.js +3 -3
- package/dist/components/TekWallet/components/ui/AnalyticGroup/index.js +20 -20
- package/dist/components/TekWallet/components/ui/AnalyticGroupCenter/index.js +9 -8
- package/dist/components/TekWallet/components/ui/AppBackDrop/index.js +3 -3
- package/dist/components/TekWallet/components/ui/AppDialog/index.js +3 -3
- package/dist/components/TekWallet/components/ui/AssetViewHeader/index.js +9 -8
- package/dist/components/TekWallet/components/ui/BackHeader/index.js +6 -6
- package/dist/components/TekWallet/components/ui/BottomActionLayout/index.js +3 -3
- package/dist/components/TekWallet/components/ui/Button/index.js +4 -4
- package/dist/components/TekWallet/components/ui/CardToken/index.js +8 -8
- package/dist/components/TekWallet/components/ui/Column/index.js +3 -3
- package/dist/components/TekWallet/components/ui/ConfirmByPasscode/index.js +6 -4
- package/dist/components/TekWallet/components/ui/ConfirmLayout/index.js +3 -3
- package/dist/components/TekWallet/components/ui/ConfirmSwapToken/Result.js +17 -17
- package/dist/components/TekWallet/components/ui/ConfirmTransfer/index.js +3 -3
- package/dist/components/TekWallet/components/ui/CopyTextComponent/index.js +6 -6
- package/dist/components/TekWallet/components/ui/CustomTooltip/index.js +4 -2
- package/dist/components/TekWallet/components/ui/DetailSwap/index.js +9 -9
- package/dist/components/TekWallet/components/ui/DialogContentLayout/index.js +6 -6
- package/dist/components/TekWallet/components/ui/DrawerDrag/index.js +3 -3
- package/dist/components/TekWallet/components/ui/EmptyData/index.js +3 -3
- package/dist/components/TekWallet/components/ui/Fees/index.js +25 -25
- package/dist/components/TekWallet/components/ui/FeesAutoDebounce/index.js +24 -25
- package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareAction.js +4 -6
- package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareDrawer.js +2 -5
- package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareImage.js +1 -2
- package/dist/components/TekWallet/components/ui/FiatDeposit/index.js +28 -26
- package/dist/components/TekWallet/components/ui/Formatter/index.js +3 -0
- package/dist/components/TekWallet/components/ui/FunctionItem/index.js +4 -5
- package/dist/components/TekWallet/components/ui/Icon/index.js +1 -1
- package/dist/components/TekWallet/components/ui/IconText/index.js +3 -3
- package/dist/components/TekWallet/components/ui/IncomeWallet/components/AnalyticGroup.js +19 -20
- package/dist/components/TekWallet/components/ui/IncomeWallet/components/BalanceChart.js +5 -5
- package/dist/components/TekWallet/components/ui/IncomeWallet/components/FunctionItem.js +3 -3
- package/dist/components/TekWallet/components/ui/IncomeWallet/components/HistoryItem.js +3 -3
- package/dist/components/TekWallet/components/ui/IncomeWallet/components/WealthDeposit.js +3 -1
- package/dist/components/TekWallet/components/ui/IncomeWallet/components/WealthWithdraw.js +3 -1
- package/dist/components/TekWallet/components/ui/IncomeWallet/components/history/index.js +3 -3
- package/dist/components/TekWallet/components/ui/IncomeWallet/index.js +10 -10
- package/dist/components/TekWallet/components/ui/InlineTitleValue/index.js +3 -3
- package/dist/components/TekWallet/components/ui/Input/index.js +5 -5
- package/dist/components/TekWallet/components/ui/LineValue/index.js +3 -3
- package/dist/components/TekWallet/components/ui/ListItemCustom/index.js +8 -6
- package/dist/components/TekWallet/components/ui/LoadingLayout/index.js +3 -3
- package/dist/components/TekWallet/components/ui/LockToken/index.js +4 -4
- package/dist/components/TekWallet/components/ui/ModalCheckboxToken/index.js +22 -22
- package/dist/components/TekWallet/components/ui/ModalDateFilter/index.js +11 -11
- package/dist/components/TekWallet/components/ui/ModalLayout/index.js +3 -3
- package/dist/components/TekWallet/components/ui/ModalSelectToken/index.js +12 -12
- package/dist/components/TekWallet/components/ui/ModalStatusFilter/index.js +16 -16
- package/dist/components/TekWallet/components/ui/ModalTitle/index.js +3 -3
- package/dist/components/TekWallet/components/ui/NeonLineChart/index.js +4 -4
- package/dist/components/TekWallet/components/ui/NetworkSelection/index.js +5 -5
- package/dist/components/TekWallet/components/ui/OTP/index.js +24 -18
- package/dist/components/TekWallet/components/ui/PageHeader/index.js +3 -3
- package/dist/components/TekWallet/components/ui/QRCode/index.js +3 -1
- package/dist/components/TekWallet/components/ui/QrCodeReader/index.js +2 -3
- package/dist/components/TekWallet/components/ui/ReceiveDirectly/index.d.ts +26 -0
- package/dist/components/TekWallet/components/ui/ReceiveDirectly/index.js +365 -0
- package/dist/components/TekWallet/components/ui/ReceiveFunction/components/HelpView.js +4 -4
- package/dist/components/TekWallet/components/ui/ReceiveFunction/components/SortGroup.js +4 -4
- package/dist/components/TekWallet/components/ui/ReceiveFunction/components/SortTool.js +7 -12
- package/dist/components/TekWallet/components/ui/ReceiveFunction/index.js +39 -56
- package/dist/components/TekWallet/components/ui/ReceiveHistory/ReceiveCardHistory.js +13 -13
- package/dist/components/TekWallet/components/ui/ReceiveHistory/ReceiveHistoryDetails.js +22 -29
- package/dist/components/TekWallet/components/ui/ReceiveHistory/index.js +19 -19
- package/dist/components/TekWallet/components/ui/Row/index.js +3 -3
- package/dist/components/TekWallet/components/ui/ScanQRToSend/index.js +7 -7
- package/dist/components/TekWallet/components/ui/SearchBar.d.ts +10 -0
- package/dist/components/TekWallet/components/ui/SearchBar.js +42 -0
- package/dist/components/TekWallet/components/ui/SendExternalToken/index.js +7 -7
- package/dist/components/TekWallet/components/ui/SendInternalToken/index.js +5 -5
- package/dist/components/TekWallet/components/ui/SmartList/index.js +3 -3
- package/dist/components/TekWallet/components/ui/StatusDisplay/index.js +7 -7
- package/dist/components/TekWallet/components/ui/SvgPath/index.js +27 -27
- package/dist/components/TekWallet/components/ui/SwiperControlled/index.js +1 -3
- package/dist/components/TekWallet/components/ui/TimeFilter/index.js +9 -8
- package/dist/components/TekWallet/components/ui/TimeText/index.js +1 -1
- package/dist/components/TekWallet/components/ui/TokenItem/index.js +7 -15
- package/dist/components/TekWallet/components/ui/TokenSelection/index.js +5 -5
- package/dist/components/TekWallet/components/ui/TokensBoard/index.js +12 -12
- package/dist/components/TekWallet/components/ui/TransferConfirmation/index.js +3 -3
- package/dist/components/TekWallet/components/ui/TransferInternal/index.js +3 -3
- package/dist/components/TekWallet/components/ui/UpdateLockToken/index.js +4 -4
- package/dist/components/TekWallet/components/ui/UserInfo/index.js +4 -4
- package/dist/components/TekWallet/components/ui/WaitingData/index.js +13 -12
- package/dist/components/TekWallet/components/ui/WithdrawFunction/components/selectToken.js +11 -11
- package/dist/components/TekWallet/components/ui/WithdrawFunction/components/sendForm.js +30 -30
- package/dist/components/TekWallet/components/ui/WithdrawFunction/components/sortByBalance.js +3 -3
- package/dist/components/TekWallet/components/ui/WithdrawFunction/components/sortByToken.js +3 -3
- package/dist/components/TekWallet/components/ui/WithdrawFunction/components/summary/infoSummary.js +8 -8
- package/dist/components/TekWallet/components/ui/WithdrawFunction/index.js +9 -9
- package/dist/components/TekWallet/components/views/ActivityView/index.js +4 -4
- package/dist/components/TekWallet/components/views/AssetView/Menu.js +3 -3
- package/dist/components/TekWallet/components/views/AssetView/index.js +12 -12
- package/dist/components/TekWallet/components/views/AuthView/index.js +4 -4
- package/dist/components/TekWallet/components/views/AuthViewSignIn/index.js +4 -4
- package/dist/components/TekWallet/components/views/ChangePasscodeView/index.js +8 -6
- package/dist/components/TekWallet/components/views/CreateWalletView/index.js +4 -4
- package/dist/components/TekWallet/components/views/DetailActivityView/LoadingView.js +4 -4
- package/dist/components/TekWallet/components/views/GetSeedPhraseWalletView/index.js +7 -7
- package/dist/components/TekWallet/components/views/ImportWalletView/index.js +4 -7
- package/dist/components/TekWallet/components/views/SendExternalView/components/Form.js +32 -37
- package/dist/components/TekWallet/components/views/SendExternalView/components/Result.js +16 -16
- package/dist/components/TekWallet/components/views/SendExternalView/components/SelectNetwork.js +3 -3
- package/dist/components/TekWallet/components/views/SendExternalView/components/SelectToken.js +7 -32
- package/dist/components/TekWallet/components/views/SendExternalView/components/Summary.js +12 -12
- package/dist/components/TekWallet/components/views/SendExternalView/index.js +3 -3
- package/dist/components/TekWallet/components/views/SendInternalView/components/AmountForm.js +26 -24
- package/dist/components/TekWallet/components/views/SendInternalView/components/Form.js +27 -33
- package/dist/components/TekWallet/components/views/SendInternalView/components/Result.js +14 -14
- package/dist/components/TekWallet/components/views/SendInternalView/components/SelectToken.js +7 -32
- package/dist/components/TekWallet/components/views/SendInternalView/components/Summary.js +10 -10
- package/dist/components/TekWallet/components/views/SendInternalView/index.js +3 -3
- package/dist/components/TekWallet/components/views/SettingView/index.js +4 -13
- package/dist/components/TekWallet/components/views/SwapView/components/FromCard/FromCardSkeleton.js +7 -8
- package/dist/components/TekWallet/components/views/SwapView/components/FromCard/index.js +20 -25
- package/dist/components/TekWallet/components/views/SwapView/components/SelectToken.js +7 -32
- package/dist/components/TekWallet/components/views/SwapView/components/Summary.js +36 -39
- package/dist/components/TekWallet/components/views/SwapView/components/ToCard/index.js +7 -7
- package/dist/components/TekWallet/components/views/SwapView/index.js +12 -10
- package/dist/components/TekWallet/hooks/useEventHandler.d.ts +1 -0
- package/dist/components/TekWallet/hooks/useEventHandler.js +9 -7
- package/dist/components/TekWallet/hooks/useRefetchOnWindowFocused.d.ts +7 -0
- package/dist/components/TekWallet/hooks/useRefetchOnWindowFocused.js +144 -0
- package/dist/components/TekWallet/hooks/useValidateAmount.js +3 -3
- package/dist/components/TekWallet/hooks/useWarningWrongPasscode.js +5 -5
- package/dist/components/TekWallet/index.d.ts +2 -0
- package/dist/components/TekWallet/index.js +2 -12
- package/dist/components/TekWallet/layouts/ChildPageLayout/index.js +3 -3
- package/dist/components/TekWallet/providers/ActivitiesProvider/index.js +28 -0
- package/dist/components/TekWallet/providers/ActivitiesProvider/type.d.ts +1 -0
- package/dist/components/TekWallet/providers/EventHandlerProvider/index.js +11 -1
- package/dist/components/TekWallet/providers/RealtimeProvider/index.js +15 -13
- package/dist/components/TekWallet/providers/TekWalletProvider/index.d.ts +9 -1
- package/dist/components/TekWallet/providers/TekWalletProvider/index.js +11 -4
- package/dist/components/TekWallet/providers/index.d.ts +0 -1
- package/dist/components/TekWallet/providers/index.js +0 -1
- package/dist/components/TekWallet/theme/mui/components/index.d.ts +133 -0
- package/dist/components/TekWallet/theme/mui/components/index.js +14 -0
- package/dist/components/TekWallet/theme/mui/components/overrides/Button.d.ts +142 -0
- package/dist/components/TekWallet/theme/mui/components/overrides/Button.js +84 -0
- package/dist/components/TekWallet/theme/mui/components/overrides/Drawer.d.ts +4 -0
- package/dist/components/TekWallet/theme/mui/components/overrides/Drawer.js +9 -0
- package/dist/components/TekWallet/theme/mui/components/overrides/Paper.d.ts +3 -0
- package/dist/components/TekWallet/theme/mui/components/overrides/Paper.js +15 -0
- package/dist/components/TekWallet/theme/mui/components/overrides/SnackBar.d.ts +3 -0
- package/dist/components/TekWallet/theme/mui/components/overrides/SnackBar.js +32 -0
- package/dist/components/TekWallet/theme/mui/fixed-mixins.d.ts +2 -0
- package/dist/components/TekWallet/theme/mui/fixed-mixins.js +218 -0
- package/dist/components/TekWallet/theme/mui/index.d.ts +3 -3
- package/dist/components/TekWallet/theme/mui/index.js +16 -32
- package/dist/components/TekWallet/theme/mui/palette.d.ts +34 -0
- package/dist/components/TekWallet/theme/mui/palette.js +133 -0
- package/dist/components/TekWallet/theme/mui/shadows/index.d.ts +3 -0
- package/dist/components/TekWallet/theme/mui/shadows/index.js +64 -0
- package/dist/components/TekWallet/theme/mui/spacing.d.ts +1 -0
- package/dist/components/TekWallet/theme/mui/spacing.js +5 -0
- package/dist/components/TekWallet/theme/mui/theme.d.ts +9 -442
- package/dist/components/TekWallet/theme/mui/theme.js +38 -415
- package/dist/components/TekWallet/theme/mui/type.d.ts +5 -0
- package/dist/components/TekWallet/theme/mui/type.js +9 -0
- package/dist/components/TekWallet/theme/mui/typography.d.ts +27 -0
- package/dist/components/TekWallet/theme/mui/typography.js +30 -0
- package/dist/components/TekWallet/theme/mui/utils/deepMergeTheme.d.ts +2 -0
- package/dist/components/TekWallet/theme/mui/utils/deepMergeTheme.js +7 -0
- package/dist/components/TekWallet/utils/getContractColor.d.ts +1 -0
- package/dist/components/TekWallet/utils/getContractColor.js +30 -0
- package/package.json +1 -1
- package/dist/components/TekWallet/components/ui/CardHistorySwap/index.d.ts +0 -12
- package/dist/components/TekWallet/components/ui/CardHistorySwap/index.js +0 -75
- package/dist/components/TekWallet/components/ui/DetailSwapResult/index.d.ts +0 -8
- package/dist/components/TekWallet/components/ui/DetailSwapResult/index.js +0 -122
- package/dist/components/TekWallet/components/ui/HistorySwap/index.d.ts +0 -16
- package/dist/components/TekWallet/components/ui/HistorySwap/index.js +0 -434
- package/dist/components/TekWallet/components/ui/SwapFunction/index.d.ts +0 -16
- package/dist/components/TekWallet/components/ui/SwapFunction/index.js +0 -271
- package/dist/components/TekWallet/components/ui/SwapToken/index.d.ts +0 -31
- package/dist/components/TekWallet/components/ui/SwapToken/index.js +0 -293
- package/dist/components/TekWallet/providers/ThemeProvider/index.d.ts +0 -8
- package/dist/components/TekWallet/providers/ThemeProvider/index.js +0 -43
- package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/components.d.ts +0 -3
- package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/components.js +0 -158
- package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/palette.d.ts +0 -55
- package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/palette.js +0 -45
- package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/theme.d.ts +0 -2
- package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/theme.js +0 -13
- package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/typography.d.ts +0 -39
- package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/typography.js +0 -65
|
@@ -93,7 +93,7 @@ var Formatter_1 = __importDefault(require("../Formatter"));
|
|
|
93
93
|
var ListItemCustom_1 = __importDefault(require("../ListItemCustom"));
|
|
94
94
|
var CustomTooltip_1 = __importDefault(require("../CustomTooltip"));
|
|
95
95
|
var DialogContentLayout_1 = __importDefault(require("../DialogContentLayout"));
|
|
96
|
-
var
|
|
96
|
+
var mui_1 = require("../../../theme/mui");
|
|
97
97
|
var ChildPageLayout_1 = __importDefault(require("../../layouts/ChildPageLayout"));
|
|
98
98
|
var LineValue_1 = __importDefault(require("../LineValue"));
|
|
99
99
|
var SvgPath_1 = require("../SvgPath");
|
|
@@ -107,6 +107,8 @@ var HelpButton_1 = __importDefault(require("./components/HelpButton"));
|
|
|
107
107
|
var SortGroup_1 = __importStar(require("./components/SortGroup"));
|
|
108
108
|
var SortTool_1 = require("./components/SortTool");
|
|
109
109
|
var DefaultPageLayout_1 = __importDefault(require("../../layouts/DefaultPageLayout"));
|
|
110
|
+
var SearchBar_1 = __importDefault(require("../SearchBar"));
|
|
111
|
+
var providers_1 = require("../../../providers");
|
|
110
112
|
var ReceiveMethods;
|
|
111
113
|
(function (ReceiveMethods) {
|
|
112
114
|
ReceiveMethods["RECEIVE_INTERNAL"] = "Receive internally";
|
|
@@ -138,7 +140,7 @@ exports.ReceiveFunction = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
138
140
|
var stepSwiperRef = (0, react_1.useRef)(null);
|
|
139
141
|
var amountInputRef = (0, react_1.useRef)(null);
|
|
140
142
|
var _d = (0, react_1.useState)(false), isSharing = _d[0], setIsSharing = _d[1];
|
|
141
|
-
var theme = (0,
|
|
143
|
+
var theme = (0, mui_1.useTheme)();
|
|
142
144
|
var _e = (0, react_1.useState)(ReceiveStep.SELECT_METHOD), currentStep = _e[0], setCurrentStep = _e[1];
|
|
143
145
|
var _f = (0, react_1.useState)(), selectedToken = _f[0], setSelectedToken = _f[1];
|
|
144
146
|
var _g = (0, react_1.useState)(), selectedNetwork = _g[0], setSelectedNetwork = _g[1];
|
|
@@ -366,7 +368,14 @@ exports.ReceiveFunction = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
366
368
|
if (isInitPasscode && !receiveInternalTokens) {
|
|
367
369
|
updateReceiveInternalToken();
|
|
368
370
|
}
|
|
369
|
-
}, [
|
|
371
|
+
}, [
|
|
372
|
+
isInitPasscode,
|
|
373
|
+
receiveExternalTokens,
|
|
374
|
+
receiveInternalTokens,
|
|
375
|
+
updateReceiveExternalToken,
|
|
376
|
+
updateReceiveInternalToken,
|
|
377
|
+
]);
|
|
378
|
+
var keyboardThemeMode = (0, providers_1.useKeyboardThemeMode)();
|
|
370
379
|
var sharedImageName = (0, react_1.useMemo)(function () {
|
|
371
380
|
var _a;
|
|
372
381
|
if (isInternal) {
|
|
@@ -431,7 +440,7 @@ exports.ReceiveFunction = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
431
440
|
};
|
|
432
441
|
return ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: drawerRef, trigger: props.children, onOpen: props.onOpen, onDone: handleOnClose, sx: props.sx, children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { title: RECEIVE_STEP_NAME[ReceiveStep.SELECT_METHOD], onClose: close, children: (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: stepDrawerRef, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, sx: {
|
|
433
442
|
width: "100%",
|
|
434
|
-
}, trigger: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
443
|
+
}, trigger: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g12, height: "fit-content", width: "100%" }), children: [functionsList.includes(ReceiveMethods.RECEIVE_INTERNAL) && ((0, jsx_runtime_1.jsx)(ListItemCustom_1.default, { title: "Top up via internal transfer", description: "Receive crypto from other Ting users", icon: (0, jsx_runtime_1.jsx)(Icon_1.default, { iconKey: "IC_RECEIVE_INTERNAL", width: 24 }), onClick: function () { return handleSelectMethod(ReceiveMethods.RECEIVE_INTERNAL); }, recommended: true })), functionsList.includes(ReceiveMethods.RECEIVE_EXTERNAL) && ((0, jsx_runtime_1.jsx)(ListItemCustom_1.default, { title: "Top up via blockchain", description: "Deposit using a Web3 or an Exchange wallet", icon: (0, jsx_runtime_1.jsx)(Icon_1.default, { iconKey: "IC_RECEIVE_EXTERNAL", width: 24 }), onClick: function () { return handleSelectMethod(ReceiveMethods.RECEIVE_EXTERNAL); }, recommended: true })), functionsList.includes(ReceiveMethods.RECEIVE_FIAT) && ((0, jsx_runtime_1.jsx)(FiatDeposit_1.default, { children: (0, jsx_runtime_1.jsx)(ListItemCustom_1.default, { title: "Fiat-Gateway", description: "Experimental deposit via bank transfer", icon: (0, jsx_runtime_1.jsx)(Icon_1.default, { iconKey: "IC_RECEIVE_EXTERNAL", width: 24 }), recommended: false, onClick: function () { return handleSelectMethod(ReceiveMethods.RECEIVE_FIAT); } }) }))] }), children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { sx: {
|
|
435
444
|
position: "relative",
|
|
436
445
|
sx: "100dvh",
|
|
437
446
|
}, sxs: {
|
|
@@ -439,10 +448,10 @@ exports.ReceiveFunction = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
439
448
|
height: "100%",
|
|
440
449
|
overflowY: "hidden",
|
|
441
450
|
},
|
|
442
|
-
}, header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: RECEIVE_STEP_NAME[Math.max(currentStep, ReceiveStep.SELECT_TOKEN)], overrideBack: handleBack, children: false && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
451
|
+
}, header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: RECEIVE_STEP_NAME[Math.max(currentStep, ReceiveStep.SELECT_TOKEN)], overrideBack: handleBack, children: false && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8, marginLeft: "auto" }), children: [(0, jsx_runtime_1.jsx)(HelpButton_1.default, {}), !!handleGotoHistory && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Divider, { orientation: "vertical", sx: {
|
|
443
452
|
height: "1rem",
|
|
444
453
|
width: "1px",
|
|
445
|
-
backgroundColor: theme.palette.
|
|
454
|
+
backgroundColor: theme.palette.divider,
|
|
446
455
|
} }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 20, height: 20, display: "block" }, onClick: handleGotoHistory, children: SvgPath_1.IC_HISTORY })] }))] })) }), footer: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
447
456
|
maxHeight: currentStep === ReceiveStep.SHOW_QR_CODE ? "120px" : 0,
|
|
448
457
|
overflow: "hidden",
|
|
@@ -459,38 +468,13 @@ exports.ReceiveFunction = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
459
468
|
}, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: {
|
|
460
469
|
height: "100%",
|
|
461
470
|
overflow: "hidden",
|
|
462
|
-
}, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
471
|
+
}, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g12, height: "fit-content" }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
463
472
|
position: "sticky",
|
|
464
|
-
backgroundColor: theme.palette.background.
|
|
473
|
+
backgroundColor: theme.palette.background.default,
|
|
465
474
|
zIndex: 100,
|
|
466
475
|
top: "0px",
|
|
467
|
-
pb: theme.
|
|
468
|
-
}, children: [!isEmptyDepositTokens && ((0, jsx_runtime_1.jsx)(
|
|
469
|
-
borderRadius: theme.mixins.customRadius.r12,
|
|
470
|
-
border: "1px solid",
|
|
471
|
-
borderColor: theme.palette.border.accent3,
|
|
472
|
-
background: theme.palette.background.white,
|
|
473
|
-
color: theme.palette.text.black,
|
|
474
|
-
py: theme.mixins.customPadding.p6,
|
|
475
|
-
px: theme.mixins.customPadding.p12,
|
|
476
|
-
fontSize: theme.typography.fontSize16,
|
|
477
|
-
width: "100%",
|
|
478
|
-
lineHeight: "100%",
|
|
479
|
-
"input::placeholder": {
|
|
480
|
-
fontSize: theme.typography.fontSize12,
|
|
481
|
-
pl: theme.mixins.customPadding.p4,
|
|
482
|
-
fontWeight: theme.typography.fontWeight500,
|
|
483
|
-
color: theme.palette.text.black,
|
|
484
|
-
lineHeight: "100%",
|
|
485
|
-
},
|
|
486
|
-
}, endAdornment: (0, jsx_runtime_1.jsx)(material_1.InputAdornment, { position: "end", sx: {
|
|
487
|
-
visibility: isSearching ? "visible" : "hidden",
|
|
488
|
-
}, children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: {
|
|
489
|
-
width: 20,
|
|
490
|
-
height: 20,
|
|
491
|
-
p: theme.mixins.customPadding.p4,
|
|
492
|
-
cursor: "pointer",
|
|
493
|
-
}, onClick: handleClearSearch, children: SvgPath_1.IC_CLOSE }) }) })), (tokenRender === null || tokenRender === void 0 ? void 0 : tokenRender.length) > 0 && (0, jsx_runtime_1.jsx)(SortGroup_1.default, { onChange: handleSort })] }), isLoadingDepositTokens && (0, jsx_runtime_1.jsx)(WaitingData_1.default, {}), isEmptyDepositTokens && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { sx: { py: "4rem" }, title: "No deposit tokens", description: "No deposit tokens" })), isSearching && isEmptySearch && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { sx: { py: "4rem" }, title: "No search results", description: "Let's try again with a different search" })), tokenRender === null || tokenRender === void 0 ? void 0 : tokenRender.map(function (item, index) {
|
|
476
|
+
pb: theme.styleMixins.customPadding.p12,
|
|
477
|
+
}, children: [!isEmptyDepositTokens && ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(SearchBar_1.default, { onChange: handleSearch, value: searchValue, placeholder: "Search...", onClearSearch: handleClearSearch }) })), (tokenRender === null || tokenRender === void 0 ? void 0 : tokenRender.length) > 0 && (0, jsx_runtime_1.jsx)(SortGroup_1.default, { onChange: handleSort })] }), isLoadingDepositTokens && (0, jsx_runtime_1.jsx)(WaitingData_1.default, {}), isEmptyDepositTokens && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { sx: { py: "4rem" }, title: "No deposit tokens", description: "No deposit tokens" })), isSearching && isEmptySearch && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { sx: { py: "4rem" }, title: "No search results", description: "Let's try again with a different search" })), tokenRender === null || tokenRender === void 0 ? void 0 : tokenRender.map(function (item, index) {
|
|
494
478
|
var stringifiedTokenData = JSON.stringify(item);
|
|
495
479
|
if (!item)
|
|
496
480
|
return null;
|
|
@@ -498,14 +482,13 @@ exports.ReceiveFunction = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
498
482
|
})] }) }) }) }, "slide_step_".concat(ReceiveStep.SELECT_TOKEN)), (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: {
|
|
499
483
|
height: "100%",
|
|
500
484
|
overflow: "hidden",
|
|
501
|
-
}, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
502
|
-
|
|
503
|
-
|
|
504
|
-
color: theme.palette.primary.main,
|
|
485
|
+
}, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g12, display: isExternal ? "flex" : "none" }), children: [(networks === null || networks === void 0 ? void 0 : networks.length) > 0 && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.paper), { borderRadius: theme.styleMixins.customRadius.r16, background: theme.palette.background.secondary, gap: theme.styleMixins.gaps.g2 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.fieldTitle), { fontWeight: theme.typography.fontWeight700, color: theme.palette.text.darkContrast }), children: "Choosing a network? Let us help!" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.activityDescription), { color: theme.palette.text.secondary, fontWeight: theme.typography.fontWeight500 }), children: "Select the network used by your sending platform." }), (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: chooseNetworkSupportDrawerRef, sx: {
|
|
486
|
+
mt: 0.25,
|
|
487
|
+
}, trigger: (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", gap: 0.125, alignItems: "center", sx: { color: theme.palette.primary.main }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { component: "div", sx: {
|
|
505
488
|
fontWeight: theme.typography.fontWeight600,
|
|
506
489
|
fontSize: theme.typography.fontSize10,
|
|
507
490
|
lineHeight: "100%",
|
|
508
|
-
}, children: "Learn more" }), children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { title: "How to choose my top up network?", onClose: closeChooseNetworkSupport, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
491
|
+
}, children: "Learn more" }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 6, height: 6, mt: "4px" }, children: (0, jsx_runtime_1.jsx)("svg", { width: "4", height: "6", viewBox: "0 0 4 6", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: (0, jsx_runtime_1.jsx)("path", { d: "M3.7 3L0.7 6L0 5.3L2.3 3L0 0.7L0.7 0L3.7 3Z", fill: "currentColor" }) }) })] }), children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { title: "How to choose my top up network?", onClose: closeChooseNetworkSupport, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { component: "div", sx: __assign(__assign({}, theme.styleMixins.listDescription), { color: theme.palette.text.primary }), children: "When top up, choose the same network as the one used on the sending platform. For example, if transferring funds using BSC network, select BSC for top up. Otherwise, you may risk losing your assets." }), (0, jsx_runtime_1.jsx)(Text_1.default, { component: "div", sx: __assign(__assign({}, theme.styleMixins.listDescription), { color: theme.palette.text.primary }), children: "If unsure, test with a small amount and confirm it arrives safely before top up the rest." })] }) }) })] })), networks === null || networks === void 0 ? void 0 : networks.map(function (item, index) {
|
|
509
492
|
if (!item)
|
|
510
493
|
return null;
|
|
511
494
|
return ((0, jsx_runtime_1.jsx)(NetworkSelection_1.default, { onClick: handleSelectNetwork, networkData: JSON.stringify(item), active: (selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.id) === item.id, token: selectedToken }, "network_".concat(item.id, "_").concat(index)));
|
|
@@ -515,35 +498,35 @@ exports.ReceiveFunction = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
515
498
|
}, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
516
499
|
display: "flex",
|
|
517
500
|
flexDirection: "column",
|
|
518
|
-
gap: theme.
|
|
519
|
-
}, children: [(0, jsx_runtime_1.jsx)("div", { id: "share-receive-info", children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({ width: "100%" }, theme.
|
|
520
|
-
color: theme.palette.
|
|
501
|
+
gap: theme.styleMixins.gaps.g16,
|
|
502
|
+
}, children: [(0, jsx_runtime_1.jsx)("div", { id: "share-receive-info", children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({ width: "100%" }, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g12, backgroundColor: theme.palette.background.tertiary, borderRadius: theme.styleMixins.customRadius.r16, padding: theme.styleMixins.customPadding.p16, paddingTop: "5rem", alignItems: "flex-start", position: "relative", marginTop: "4.6875rem" }), children: [(0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
|
|
503
|
+
color: theme.palette.divider,
|
|
521
504
|
width: "100%",
|
|
522
|
-
} }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
505
|
+
} }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.center), { top: 0, width: "fit-content", height: "fit-content", borderRadius: theme.styleMixins.customRadius.r12, padding: theme.styleMixins.customPadding.p8 }), children: [(0, jsx_runtime_1.jsx)(QRCode_1.default, { value: qrCodeValue, logo: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.link, bgColor: "transparent", size: 150 }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.center), { padding: theme.styleMixins.customPadding.p4, borderRadius: 9999, backgroundColor: theme.palette.background.default }), children: (0, jsx_runtime_1.jsx)(Icon_1.default, { crossOrigin: "anonymous", src: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.link, sx: {
|
|
523
506
|
borderRadius: 9999,
|
|
524
507
|
width: 24,
|
|
525
508
|
height: 24,
|
|
526
|
-
} }) })] }), isExternal && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
509
|
+
} }) })] }), isExternal && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.valueDescription), children: "Network" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({}, theme.styleMixins.row), onClick: handleBack, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { component: "button", sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g4, cursor: "pointer", transition: "transform 0.3s ease-in-out", "&:active": {
|
|
527
510
|
transform: "translateX(0.5rem)",
|
|
528
511
|
} }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { width: 24, height: 24, sx: {
|
|
529
512
|
borderRadius: "9999px",
|
|
530
|
-
}, src: selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.link }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.
|
|
513
|
+
}, src: selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.link }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.value), children: selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.name })] }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: {
|
|
531
514
|
width: 12,
|
|
532
515
|
height: 12,
|
|
533
516
|
ml: "auto",
|
|
534
517
|
transform: "rotate(90deg)",
|
|
535
|
-
}, children: SvgPath_1.IC_CHEVRON_RIGHT })] })] })), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
536
|
-
color: theme.palette.
|
|
518
|
+
}, children: SvgPath_1.IC_CHEVRON_RIGHT })] })] })), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g4, color: "text.secondary" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.valueDescription), { color: "inherit" }), children: isInternal ? "Internal address" : "Address" }), isInternal && ((0, jsx_runtime_1.jsx)(CustomTooltip_1.default, { trigger: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 16, height: 16, mb: "3px" }, children: SvgPath_1.IC_TOOLTIP }), children: (0, jsx_runtime_1.jsx)(DialogContentLayout_1.default, { content: (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.styleMixins.warning), children: ["This address is used to receive token by internal transfer. You can not use it for blockchain transaction. If you want to receive token by blockchain, please select the ", (0, jsx_runtime_1.jsx)("strong", { children: "Receive External" }), " method instead."] }) }) }))] }), (0, jsx_runtime_1.jsxs)(CopyTextComponent_1.default, { sx: __assign(__assign({}, theme.styleMixins.row), { justifyContent: "space-between" }), value: receiveAddress || "", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.value), { wordBreak: "break-all", maxWidth: "85%" }), children: receiveAddress }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 20, height: 20 }, children: SvgPath_1.IC_COPY })] })] }), (!!userInfo || !!amount || isExternal || !!warningMessage) && ((0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
|
|
519
|
+
color: theme.palette.divider,
|
|
537
520
|
width: "100%",
|
|
538
|
-
} })), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({ width: "100%" }, theme.
|
|
521
|
+
} })), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({ width: "100%" }, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g12 }), children: [!!userInfo && ((0, jsx_runtime_1.jsx)(LineValue_1.default, { sx: {
|
|
539
522
|
alignItems: "start",
|
|
540
|
-
}, field: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.
|
|
523
|
+
}, field: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.valueDescription), { color: theme.palette.text.secondary, fontSize: theme.typography.fontSize13 }), children: "Received user" }), value: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { width: 16, height: 16, src: userInfo === null || userInfo === void 0 ? void 0 : userInfo.avatar, sx: {
|
|
541
524
|
borderRadius: "9999px",
|
|
542
|
-
} }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
543
|
-
color: theme.palette.
|
|
525
|
+
} }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g2 }), children: (0, jsx_runtime_1.jsxs)(Text_1.default, { children: [userInfo === null || userInfo === void 0 ? void 0 : userInfo.nickname, " "] }) })] }), valueDescription: (0, jsx_runtime_1.jsx)(Text_1.default, { children: userInfo === null || userInfo === void 0 ? void 0 : userInfo.username }) })), !!amount && ((0, jsx_runtime_1.jsx)(LineValue_1.default, { field: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.valueDescription), { color: theme.palette.text.secondary, fontSize: theme.typography.fontSize13 }), children: "Amount" }), value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.value), { fontSize: theme.typography.fontSize13 }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: amount, unit: " ".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name) }) }) })), isExternal && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(LineValue_1.default, { field: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.valueDescription), { color: theme.palette.text.secondary, fontSize: theme.typography.fontSize13 }), children: "Top Up Arrival Time" }), value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.value), { fontSize: theme.typography.fontSize13 }), children: "~ 2 Minutes" }) }), (0, jsx_runtime_1.jsx)(LineValue_1.default, { field: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.valueDescription), { color: theme.palette.text.secondary, fontSize: theme.typography.fontSize13 }), children: "Withdrawal Arrival Time" }), value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.value), { fontSize: theme.typography.fontSize13 }), children: "~ 4 Minutes" }) })] }))] }), !!warningMessage && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
|
|
526
|
+
color: theme.palette.divider,
|
|
544
527
|
width: "100%",
|
|
545
|
-
mt: theme.
|
|
546
|
-
} }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.
|
|
528
|
+
mt: theme.styleMixins.customMargin.m12,
|
|
529
|
+
} }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.valueDescription), children: warningMessage })] }))] }) }), isInternal && false && ((0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: amountDrawerRef, sx: {
|
|
547
530
|
width: "100%",
|
|
548
531
|
display: "flex",
|
|
549
532
|
justifyContent: "center",
|
|
@@ -553,8 +536,8 @@ exports.ReceiveFunction = (0, react_1.forwardRef)(function (_a, ref) {
|
|
|
553
536
|
fontWeight: theme.typography.fontWeight500,
|
|
554
537
|
display: "flex",
|
|
555
538
|
alignItems: "center",
|
|
556
|
-
gap: theme.
|
|
557
|
-
}, children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 20, height: 20 }, children: amount ? SvgPath_1.IC_EDIT : SvgPath_1.IC_SET }), amount ? "Edit" : "Set", " amount"] }) }), children: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Keyboard, { id: keyboardId, onChange: handleChangeAmount, keyboardType: xhub_keyboard_1.KeyboardType.Double, value: inputAmount === null || inputAmount === void 0 ? void 0 : inputAmount.toString(), keyboardId: "amount-keyboard-id", children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { onClose: closeAmountModal, title: (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.
|
|
539
|
+
gap: theme.styleMixins.gaps.g4,
|
|
540
|
+
}, children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 20, height: 20 }, children: amount ? SvgPath_1.IC_EDIT : SvgPath_1.IC_SET }), amount ? "Edit" : "Set", " amount"] }) }), children: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Keyboard, { theme: keyboardThemeMode, id: keyboardId, onChange: handleChangeAmount, keyboardType: xhub_keyboard_1.KeyboardType.Double, value: inputAmount === null || inputAmount === void 0 ? void 0 : inputAmount.toString(), keyboardId: "amount-keyboard-id", children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { onClose: closeAmountModal, title: (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.styleMixins.fieldTitle), children: [amount ? "Edit" : "Set", " ", selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name, " amount"] }), children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { htmlFor: keyboardId, children: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Input, { ref: amountInputRef, elementsAcceptIds: ["amount-keyboard-id"], value: inputAmount === null || inputAmount === void 0 ? void 0 : inputAmount.toString(), displayType: xhub_keyboard_1.DisplayType.Double, rightElement: (0, jsx_runtime_1.jsx)(Button_1.default.Secondary, { onClick: handleClickMaxAmount, sx: __assign({}, theme.styleMixins.smallButton), children: "Max" }) }) }), amountError && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.validationError), children: amountError })), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { width: "100%", mt: theme.styleMixins.customMargin.m8, gap: theme.styleMixins.gaps.g12 }), children: [!!amount && ((0, jsx_runtime_1.jsx)(Button_1.default.Text, { onClick: handleUnset, children: "Unset" })), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { sx: { flex: 1 }, onClick: handleContinue, status: !!amountError || !inputAmount
|
|
558
541
|
? Button_1.BUTTON_STATUS.DISABLED
|
|
559
542
|
: Button_1.BUTTON_STATUS.ENABLED, children: "Continue" })] })] }) }) }) }))] }) }) }) }, "slide_step_".concat(ReceiveStep.SHOW_QR_CODE))] }) }) }) }) }));
|
|
560
543
|
});
|
|
@@ -4,7 +4,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
7
|
-
var
|
|
7
|
+
var mui_1 = require("../../../theme/mui");
|
|
8
8
|
var Text_1 = __importDefault(require("../Text"));
|
|
9
9
|
var Column_1 = __importDefault(require("../Column"));
|
|
10
10
|
var Row_1 = __importDefault(require("../Row"));
|
|
@@ -17,7 +17,7 @@ var SvgPath_1 = require("../SvgPath");
|
|
|
17
17
|
var formatDate_1 = require("../../../utils/formatDate");
|
|
18
18
|
var ReceiveCardHistory = function (_a) {
|
|
19
19
|
var toAddress = _a.toAddress, date = _a.date, amount = _a.amount, currencySlug = _a.currencySlug, network = _a.network, status = _a.status;
|
|
20
|
-
var theme = (0,
|
|
20
|
+
var theme = (0, mui_1.useTheme)();
|
|
21
21
|
var getStatusColor = function (status) {
|
|
22
22
|
switch (status) {
|
|
23
23
|
case "success":
|
|
@@ -27,30 +27,30 @@ var ReceiveCardHistory = function (_a) {
|
|
|
27
27
|
case "processing":
|
|
28
28
|
return theme.palette.warning.main;
|
|
29
29
|
default:
|
|
30
|
-
return theme.palette.text.
|
|
30
|
+
return theme.palette.text.secondary;
|
|
31
31
|
}
|
|
32
32
|
};
|
|
33
33
|
return ((0, jsx_runtime_1.jsxs)(Column_1.default, { sx: {
|
|
34
|
-
gap: theme.
|
|
35
|
-
}, children: [(0, jsx_runtime_1.jsx)(Row_1.default, { sx: { justifyContent: "space-between" }, children: (0, jsx_runtime_1.jsxs)(Column_1.default, { sx: { gap: theme.
|
|
34
|
+
gap: theme.styleMixins.gaps.g2,
|
|
35
|
+
}, children: [(0, jsx_runtime_1.jsx)(Row_1.default, { sx: { justifyContent: "space-between" }, children: (0, jsx_runtime_1.jsxs)(Column_1.default, { sx: { gap: theme.styleMixins.gaps.g1 }, children: [(0, jsx_runtime_1.jsxs)(Text_1.default, { sx: {
|
|
36
36
|
fontWeight: 700,
|
|
37
37
|
fontSize: "1rem",
|
|
38
38
|
}, children: [(0, number_extension_1.formatCurrencyNumber)(Number(amount !== null && amount !== void 0 ? amount : 0)), " ", currencySlug === null || currencySlug === void 0 ? void 0 : currencySlug.toUpperCase()] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
39
39
|
backgroundColor: getStatusColor(status !== null && status !== void 0 ? status : ""),
|
|
40
|
-
borderRadius: theme.
|
|
41
|
-
padding: theme.
|
|
40
|
+
borderRadius: theme.styleMixins.customRadius.r8,
|
|
41
|
+
padding: theme.styleMixins.customPadding.p4,
|
|
42
42
|
width: "fit-content",
|
|
43
43
|
display: "flex",
|
|
44
44
|
alignItems: "center",
|
|
45
45
|
justifyContent: "center",
|
|
46
|
-
}, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
46
|
+
}, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: { fontWeight: 500, fontSize: "0.625rem" }, children: (0, safeText_1.firstLetterToUpperCase)(status !== null && status !== void 0 ? status : "unknown") }) })] }) }), (0, jsx_runtime_1.jsxs)(Column_1.default, { sx: { gap: theme.styleMixins.gaps.g2, paddingTop: theme.styleMixins.customPadding.p4 }, children: [(0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "To address:", titleStyle: {
|
|
47
47
|
fontWeight: 500,
|
|
48
48
|
fontSize: "0.813rem",
|
|
49
|
-
color: theme.palette.text.
|
|
49
|
+
color: theme.palette.text.secondary,
|
|
50
50
|
}, value: (0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: (0, safeText_1.safeText)(toAddress !== null && toAddress !== void 0 ? toAddress : "", {
|
|
51
51
|
isShort: true,
|
|
52
52
|
}), children: (0, jsx_runtime_1.jsxs)(Row_1.default, { sx: {
|
|
53
|
-
gap: theme.
|
|
53
|
+
gap: theme.styleMixins.gaps.g1,
|
|
54
54
|
justifyContent: "space-between",
|
|
55
55
|
width: "100%",
|
|
56
56
|
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
@@ -60,16 +60,16 @@ var ReceiveCardHistory = function (_a) {
|
|
|
60
60
|
}, children: (0, safeText_1.safeText)(toAddress !== null && toAddress !== void 0 ? toAddress : "", {
|
|
61
61
|
isShort: true,
|
|
62
62
|
}) }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 16, height: 16 }, children: SvgPath_1.IC_COPY })] }) }) }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Network:", titleStyle: {
|
|
63
|
-
color: theme.palette.text.
|
|
63
|
+
color: theme.palette.text.secondary,
|
|
64
64
|
fontWeight: 500,
|
|
65
65
|
fontSize: "0.813rem",
|
|
66
66
|
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
67
|
-
color: theme.palette.text.
|
|
67
|
+
color: theme.palette.text.secondary,
|
|
68
68
|
whiteSpace: "nowrap",
|
|
69
69
|
fontWeight: 500,
|
|
70
70
|
fontSize: "0.813rem",
|
|
71
71
|
}, children: network === null || network === void 0 ? void 0 : network.toUpperCase() }) }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
72
|
-
color: theme.palette.text.
|
|
72
|
+
color: theme.palette.text.secondary,
|
|
73
73
|
fontWeight: 500,
|
|
74
74
|
fontSize: "0.813rem",
|
|
75
75
|
}, children: (0, formatDate_1.customFormatDate)(date !== null && date !== void 0 ? date : "", { format: formatDate_1.DateFormat.MMM_DD_YYYY_HH_MM_SS }) })] })] }));
|
|
@@ -17,7 +17,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
17
17
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
18
18
|
var react_1 = require("react");
|
|
19
19
|
var useWallet_1 = __importDefault(require("../../../hooks/useWallet"));
|
|
20
|
-
var
|
|
20
|
+
var mui_1 = require("../../../theme/mui");
|
|
21
21
|
var ChildPageLayout_1 = __importDefault(require("../../layouts/ChildPageLayout"));
|
|
22
22
|
var Button_1 = __importDefault(require("../Button"));
|
|
23
23
|
var Text_1 = __importDefault(require("../Text"));
|
|
@@ -31,7 +31,7 @@ var ReceiveHistoryDetails = function (_a) {
|
|
|
31
31
|
var _b, _c, _d;
|
|
32
32
|
var onClose = _a.onClose, swapData = _a.receiveData;
|
|
33
33
|
var transaction = (0, useWallet_1.default)().transaction;
|
|
34
|
-
var theme = (0,
|
|
34
|
+
var theme = (0, mui_1.useTheme)();
|
|
35
35
|
var resultData = transaction || (swapData === null || swapData === void 0 ? void 0 : swapData.data);
|
|
36
36
|
var feeInfo = (0, react_1.useMemo)(function () {
|
|
37
37
|
var _a, _b;
|
|
@@ -42,81 +42,74 @@ var ReceiveHistoryDetails = function (_a) {
|
|
|
42
42
|
var getInfoDetailOutputs = (0, react_1.useMemo)(function () {
|
|
43
43
|
return (getDetailOutputs === null || getDetailOutputs === void 0 ? void 0 : getDetailOutputs[0]) || {};
|
|
44
44
|
}, [getDetailOutputs]);
|
|
45
|
-
return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { sx: __assign({ color: theme.palette.text.
|
|
46
|
-
px: theme.
|
|
45
|
+
return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { sx: __assign({ color: theme.palette.text.primary, width: "100%" }, theme.styleMixins.pagePadding), footer: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
46
|
+
px: theme.styleMixins.customPadding.p12,
|
|
47
47
|
position: "relative",
|
|
48
48
|
bottom: theme.typography.fontSize24,
|
|
49
49
|
}, children: (resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "processing" ||
|
|
50
|
-
(resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "failed" ? ((0, jsx_runtime_1.jsx)(Button_1.default.Primary, { onClick: onClose, sx: __assign(__assign({ gap: theme.
|
|
50
|
+
(resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "failed" ? ((0, jsx_runtime_1.jsx)(Button_1.default.Primary, { onClick: onClose, sx: __assign(__assign({ gap: theme.styleMixins.gaps.g4 }, theme.styleMixins.row), { color: theme.palette.text.secondary, borderRadius: theme.styleMixins.customRadius.r12, height: "40px" }), fullWidth: true, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
51
51
|
fontSize: theme.typography.fontSize12,
|
|
52
52
|
fontWeight: theme.typography.fontWeight600,
|
|
53
53
|
leading: theme.typography.leading160,
|
|
54
54
|
textTransform: "none",
|
|
55
55
|
color: theme.palette.secondary.main,
|
|
56
|
-
}, children: "Close" }) })) : ((resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "success" && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
56
|
+
}, children: "Close" }) })) : ((resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "success" && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8, justifyContent: "center" }), children: [(0, jsx_runtime_1.jsx)(Button_1.default.Secondary, { onClick: onClose, sx: __assign(__assign({ gap: theme.styleMixins.gaps.g4 }, theme.styleMixins.row), { borderRadius: theme.styleMixins.customRadius.r12, borderColor: theme.palette.primary.main, backgroundColor: "transparent", maxWidth: "100%", height: "40px" }), fullWidth: true, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
57
57
|
fontSize: theme.typography.fontSize13,
|
|
58
58
|
fontWeight: theme.typography.fontWeight600,
|
|
59
59
|
color: theme.palette.primary.main,
|
|
60
60
|
leading: theme.typography.leading160,
|
|
61
61
|
textTransform: "none",
|
|
62
|
-
}, children: "Close" }) }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { onClick: onClose, sx: __assign(__assign({ gap: theme.
|
|
62
|
+
}, children: "Close" }) }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { onClick: onClose, sx: __assign(__assign({ gap: theme.styleMixins.gaps.g4 }, theme.styleMixins.row), { color: theme.palette.text.secondary, borderRadius: theme.styleMixins.customRadius.r12, maxWidth: "100%", height: "40px" }), fullWidth: true, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
63
63
|
fontSize: theme.typography.fontSize13,
|
|
64
64
|
fontWeight: theme.typography.fontWeight600,
|
|
65
65
|
leading: theme.typography.leading160,
|
|
66
66
|
textTransform: "none",
|
|
67
67
|
color: theme.palette.secondary.main,
|
|
68
|
-
}, children: "View asset" }) })] }))) }), children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({ width: "100%" }, theme.
|
|
68
|
+
}, children: "View asset" }) })] }))) }), children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({ width: "100%" }, theme.styleMixins.column), { top: 0, transform: "translateY(30%)", gap: theme.styleMixins.gaps.g12, backgroundColor: theme.palette.background.tertiary, borderRadius: theme.styleMixins.customRadius.r16, padding: theme.styleMixins.customPadding.p16, paddingTop: "80px", alignItems: "flex-start", position: "relative", marginTop: "75px" }), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.center), { top: 0, width: "fit-content", height: "fit-content", borderRadius: theme.styleMixins.customRadius.r12, padding: theme.styleMixins.customPadding.p8 }), children: (0, jsx_runtime_1.jsx)(Icon_1.default, { width: 100, height: 100, src: (0, getIcon_1.default)((resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "success"
|
|
69
69
|
? "success"
|
|
70
70
|
: (resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "failed"
|
|
71
71
|
? "failed"
|
|
72
72
|
: (resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "processing"
|
|
73
73
|
? "processing"
|
|
74
|
-
: "") }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
75
|
-
color: theme.palette.text.
|
|
74
|
+
: "") }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { mt: theme.styleMixins.customMargin.m8, textAlign: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
75
|
+
color: theme.palette.text.secondary,
|
|
76
76
|
fontSize: theme.typography.fontSize14,
|
|
77
77
|
fontWeight: theme.typography.fontWeight400,
|
|
78
78
|
}, children: "Swapping Token" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
79
|
-
color: (resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "processing"
|
|
80
|
-
? theme.palette.text.warningStatus
|
|
81
|
-
: (resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "failed"
|
|
82
|
-
? theme.palette.text.errorStatus
|
|
83
|
-
: (resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status) == "success"
|
|
84
|
-
? theme.palette.text.alertStatus
|
|
85
|
-
: theme.palette.text.warningStatus,
|
|
86
79
|
fontSize: theme.typography.fontSize24,
|
|
87
80
|
fontWeight: theme.typography.fontWeight600,
|
|
88
81
|
textTransform: "capitalize",
|
|
89
82
|
}, children: resultData === null || resultData === void 0 ? void 0 : resultData.transaction_status }), (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
|
|
90
83
|
width: "100%",
|
|
91
|
-
color: theme.palette.text.
|
|
92
|
-
mt: theme.
|
|
93
|
-
} }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
84
|
+
color: theme.palette.text.secondary,
|
|
85
|
+
mt: theme.styleMixins.customMargin.m12,
|
|
86
|
+
} }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { justifyContent: "space-between", mt: theme.styleMixins.customMargin.m16 }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: (_c = resultData === null || resultData === void 0 ? void 0 : resultData.currency_data) === null || _c === void 0 ? void 0 : _c.link, width: 20, height: 20, className: "rounded-full" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
94
87
|
fontSize: theme.typography.fontSize14,
|
|
95
88
|
fontWeight: theme.typography.fontWeight700,
|
|
96
|
-
}, children: resultData === null || resultData === void 0 ? void 0 : resultData.amount })] }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("swap_horizontal"), width: 20, height: 20 }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
89
|
+
}, children: resultData === null || resultData === void 0 ? void 0 : resultData.amount })] }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("swap_horizontal"), width: 20, height: 20 }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: getInfoDetailOutputs === null || getInfoDetailOutputs === void 0 ? void 0 : getInfoDetailOutputs.link, width: 20, height: 20, className: "rounded-full" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
97
90
|
fontSize: theme.typography.fontSize14,
|
|
98
91
|
fontWeight: theme.typography.fontWeight700,
|
|
99
92
|
}, children: (0, roundToTwoSignificantDecimals_1.default)((resultData === null || resultData === void 0 ? void 0 : resultData.amount) * (getInfoDetailOutputs === null || getInfoDetailOutputs === void 0 ? void 0 : getInfoDetailOutputs.swap_amount)) })] })] }), (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
|
|
100
93
|
width: "100%",
|
|
101
|
-
color: theme.palette.text.
|
|
102
|
-
mt: theme.
|
|
94
|
+
color: theme.palette.text.secondary,
|
|
95
|
+
mt: theme.styleMixins.customMargin.m12,
|
|
103
96
|
} }), (0, jsx_runtime_1.jsx)(LineValue_1.default, { sx: {
|
|
104
|
-
mt: theme.
|
|
105
|
-
mb: theme.
|
|
97
|
+
mt: theme.styleMixins.customMargin.m16,
|
|
98
|
+
mb: theme.styleMixins.customMargin.m16,
|
|
106
99
|
}, field: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
107
100
|
fontSize: theme.typography.fontSize12,
|
|
108
|
-
color: theme.palette.text.
|
|
101
|
+
color: theme.palette.text.primary,
|
|
109
102
|
}, children: "Price" }), value: (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: {
|
|
110
103
|
fontSize: theme.typography.fontSize14,
|
|
111
104
|
fontWeight: theme.typography.fontWeight700,
|
|
112
|
-
ml: theme.
|
|
105
|
+
ml: theme.styleMixins.customMargin.m8,
|
|
113
106
|
}, children: ["1 ", (_d = resultData === null || resultData === void 0 ? void 0 : resultData.currency_data) === null || _d === void 0 ? void 0 : _d.full_name, " ~ ", getInfoDetailOutputs === null || getInfoDetailOutputs === void 0 ? void 0 : getInfoDetailOutputs.swap_amount, " ", getInfoDetailOutputs === null || getInfoDetailOutputs === void 0 ? void 0 : getInfoDetailOutputs.full_name] }) }), (0, jsx_runtime_1.jsx)(LineValue_1.default, { field: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
114
107
|
fontSize: theme.typography.fontSize12,
|
|
115
|
-
color: theme.palette.text.
|
|
108
|
+
color: theme.palette.text.primary,
|
|
116
109
|
}, children: "Date time" }), value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
117
110
|
fontSize: theme.typography.fontSize14,
|
|
118
111
|
fontWeight: theme.typography.fontWeight700,
|
|
119
|
-
ml: theme.
|
|
112
|
+
ml: theme.styleMixins.customMargin.m8,
|
|
120
113
|
}, children: (0, formatDate_1.default)(resultData === null || resultData === void 0 ? void 0 : resultData.date_created) }) })] })] }) }));
|
|
121
114
|
};
|
|
122
115
|
exports.default = ReceiveHistoryDetails;
|
|
@@ -96,7 +96,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
96
96
|
/* eslint-disable react-hooks/exhaustive-deps */
|
|
97
97
|
var react_1 = require("react");
|
|
98
98
|
var ChildPageLayout_1 = __importDefault(require("../../layouts/ChildPageLayout"));
|
|
99
|
-
var
|
|
99
|
+
var mui_1 = require("../../../theme/mui");
|
|
100
100
|
var BackHeader_1 = __importDefault(require("../BackHeader"));
|
|
101
101
|
var material_1 = require("@mui/material");
|
|
102
102
|
var Icon_1 = __importDefault(require("../Icon"));
|
|
@@ -135,7 +135,7 @@ var historyHistoryStatus = [
|
|
|
135
135
|
];
|
|
136
136
|
var ReceiveHistory = function (props) {
|
|
137
137
|
var _a;
|
|
138
|
-
var theme = (0,
|
|
138
|
+
var theme = (0, mui_1.useTheme)();
|
|
139
139
|
var _b = (0, react_1.useState)(["all"]), selectedStatuses = _b[0], setSelectedStatuses = _b[1];
|
|
140
140
|
var _c = (0, react_1.useState)(["all"]), tempSelectedStatuses = _c[0], setTempSelectedStatuses = _c[1];
|
|
141
141
|
var _d = (0, react_1.useState)(undefined), transactionDetail = _d[0], setTransactionDetail = _d[1];
|
|
@@ -364,11 +364,11 @@ var ReceiveHistory = function (props) {
|
|
|
364
364
|
}, [currentId, hasOpenedDetail, selectedItem, transactionDetail, drawerRefs.current.detail]);
|
|
365
365
|
return ((0, jsx_runtime_1.jsxs)(ChildPageLayout_1.default, { sx: {
|
|
366
366
|
width: "100dvw",
|
|
367
|
-
}, header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "Top Up History", overrideBack: props.onClose }), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
368
|
-
// pt: theme.
|
|
369
|
-
gap: theme.
|
|
367
|
+
}, header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "Top Up History", overrideBack: props.onClose }), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { px: theme.styleMixins.customPadding.p16,
|
|
368
|
+
// pt: theme.styleMixins.customPadding.p16,
|
|
369
|
+
gap: theme.styleMixins.gaps.g8, ml: theme.styleMixins.customMargin.m4 }), children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", alignItems: "center", gap: 4, children: [(0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: function (ref) {
|
|
370
370
|
drawerRefs.current.status = ref !== null && ref !== void 0 ? ref : undefined;
|
|
371
|
-
}, direction: DrawerComponent_1.DRAWER_DIRECTION.BOTTOM, trigger: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
371
|
+
}, direction: DrawerComponent_1.DRAWER_DIRECTION.BOTTOM, trigger: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g4, mb: theme.styleMixins.customMargin.m4 }), children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", alignItems: "center", gap: 0.8, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
372
372
|
fontSize: theme.typography.fontSize12,
|
|
373
373
|
fontWeight: theme.typography.fontWeight500,
|
|
374
374
|
}, children: selectedStatuses.includes("all")
|
|
@@ -376,7 +376,7 @@ var ReceiveHistory = function (props) {
|
|
|
376
376
|
: selectedStatuses.length === 1
|
|
377
377
|
? ((_a = historyHistoryStatus.find(function (s) { return s.name === selectedStatuses[0]; })) === null || _a === void 0 ? void 0 : _a.title) ||
|
|
378
378
|
selectedStatuses[0]
|
|
379
|
-
: "".concat(selectedStatuses.length, " Status") }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("arrow_down"), width: 7, height: 7 })] }) }), children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { overrideHeader: (0, jsx_runtime_1.jsxs)(BackHeader_1.default, { sx: __assign(__assign({}, theme.
|
|
379
|
+
: "".concat(selectedStatuses.length, " Status") }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("arrow_down"), width: 7, height: 7 })] }) }), children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { overrideHeader: (0, jsx_runtime_1.jsxs)(BackHeader_1.default, { sx: __assign(__assign({}, theme.styleMixins.row), { justifyContent: "space-between" }), hideBack: true, overrideBack: props.onClose, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
380
380
|
fontWeight: theme.typography.fontWeight500,
|
|
381
381
|
fontSize: theme.typography.fontSize15,
|
|
382
382
|
}, children: "Status" }), (0, jsx_runtime_1.jsx)(CloseModal_1.default, { sx: {
|
|
@@ -386,10 +386,10 @@ var ReceiveHistory = function (props) {
|
|
|
386
386
|
backgroundColor: theme.palette.background.tertiary,
|
|
387
387
|
}, children: (0, jsx_runtime_1.jsx)(ModalStatusFilter_1.default, { statusList: historyHistoryStatus, handleStatusSelect: handleStatusSelect, selectedStatuses: tempSelectedStatuses, onApply: handleApplyStatuses, onReset: handleResetStatuses }) }) }), (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: function (ref) {
|
|
388
388
|
drawerRefs.current.date = ref !== null && ref !== void 0 ? ref : undefined;
|
|
389
|
-
}, direction: DrawerComponent_1.DRAWER_DIRECTION.BOTTOM, trigger: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
389
|
+
}, direction: DrawerComponent_1.DRAWER_DIRECTION.BOTTOM, trigger: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g4, mb: theme.styleMixins.customMargin.m4 }), children: (0, jsx_runtime_1.jsxs)(material_1.Stack, { direction: "row", alignItems: "center", gap: 0.8, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
390
390
|
fontSize: theme.typography.fontSize12,
|
|
391
391
|
fontWeight: theme.typography.fontWeight500,
|
|
392
|
-
}, children: "Date" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("arrow_down"), width: 7, height: 7 })] }) }), children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { overrideHeader: (0, jsx_runtime_1.jsxs)(BackHeader_1.default, { sx: __assign(__assign({}, theme.
|
|
392
|
+
}, children: "Date" }), (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("arrow_down"), width: 7, height: 7 })] }) }), children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { overrideHeader: (0, jsx_runtime_1.jsxs)(BackHeader_1.default, { sx: __assign(__assign({}, theme.styleMixins.row), { justifyContent: "space-between" }), hideBack: true, overrideBack: props.onClose, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
393
393
|
fontWeight: theme.typography.fontWeight500,
|
|
394
394
|
fontSize: theme.typography.fontSize15,
|
|
395
395
|
}, children: "Filter" }), (0, jsx_runtime_1.jsx)(CloseModal_1.default, { sx: {
|
|
@@ -405,9 +405,9 @@ var ReceiveHistory = function (props) {
|
|
|
405
405
|
}, drawerRefs: drawerRefs.current.date }) }) })] }) }), resultData && resultData.length > 0 && ((0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
|
|
406
406
|
width: "100%",
|
|
407
407
|
opacity: 0.6,
|
|
408
|
-
backgroundColor: theme.palette.
|
|
409
|
-
mb: theme.
|
|
410
|
-
} })), isLoading && ((0, jsx_runtime_1.jsx)(material_1.Box, { className: "px-4 py-2 space-y-3", children: resultData.map(function (_, index) { return ((0, jsx_runtime_1.jsx)(ItemHistorySkeleton_1.ItemHistorySkeletonShimmer, {}, index)); }) })), !isLoading && resultData && resultData.length > 0 ? ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
408
|
+
backgroundColor: theme.palette.divider,
|
|
409
|
+
mb: theme.styleMixins.customMargin.m16,
|
|
410
|
+
} })), isLoading && ((0, jsx_runtime_1.jsx)(material_1.Box, { className: "px-4 py-2 space-y-3", children: resultData.map(function (_, index) { return ((0, jsx_runtime_1.jsx)(ItemHistorySkeleton_1.ItemHistorySkeletonShimmer, {}, index)); }) })), !isLoading && resultData && resultData.length > 0 ? ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { overflow: "hidden" }), children: [(0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: function (ref) {
|
|
411
411
|
drawerRefs.current.detail = ref !== null && ref !== void 0 ? ref : undefined;
|
|
412
412
|
}, sx: {
|
|
413
413
|
width: "100%",
|
|
@@ -422,24 +422,24 @@ var ReceiveHistory = function (props) {
|
|
|
422
422
|
} }, "detail-".concat(currentId))) }) }, "drawer-".concat(currentId)), resultData.map(function (item, i) { return ((0, jsx_runtime_1.jsxs)(material_1.Box, { onClick: function () {
|
|
423
423
|
// handleTransactionClick(item.id);
|
|
424
424
|
}, sx: {
|
|
425
|
-
px: theme.
|
|
425
|
+
px: theme.styleMixins.customPadding.p16,
|
|
426
426
|
}, children: [(0, jsx_runtime_1.jsx)(ReceiveCardHistory_1.default, { toAddress: item.to_address, date: item.date_created, amount: item.amount, currencySlug: item.currency_slug, network: item.network, status: item.transaction_status }, item.id), (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
|
|
427
427
|
width: "100%",
|
|
428
428
|
opacity: 0.6,
|
|
429
|
-
backgroundColor: theme.palette.
|
|
430
|
-
my: theme.
|
|
429
|
+
backgroundColor: theme.palette.divider,
|
|
430
|
+
my: theme.styleMixins.customMargin.m16,
|
|
431
431
|
} })] }, i)); })] })) : (resultData.length == 0 &&
|
|
432
|
-
!isLoading && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign(__assign({}, theme.
|
|
432
|
+
!isLoading && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign(__assign({}, theme.styleMixins.center), { padding: theme.styleMixins.customPadding.p24 }), theme.styleMixins.column), { gap: theme.styleMixins.gaps.g4, textAlign: "center" }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("result"), width: 62, height: 62, sx: {
|
|
433
433
|
mx: "auto",
|
|
434
|
-
mb: theme.
|
|
434
|
+
mb: theme.styleMixins.customMargin.m12,
|
|
435
435
|
} }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
436
436
|
fontSize: theme.typography.fontSize14,
|
|
437
437
|
fontWeight: theme.typography.fontWeight700,
|
|
438
|
-
color: theme.palette.text.
|
|
438
|
+
color: theme.palette.text.primary,
|
|
439
439
|
}, children: "No Results Found" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
440
440
|
fontSize: theme.typography.fontSize12,
|
|
441
441
|
fontWeight: theme.typography.fontWeight600,
|
|
442
|
-
color: theme.palette.text.
|
|
442
|
+
color: theme.palette.text.secondary,
|
|
443
443
|
}, children: resultData.length === 0
|
|
444
444
|
? "No transaction history available."
|
|
445
445
|
: "Switch your filter to display your latest transaction history." })] })))] }));
|