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
|
@@ -87,8 +87,8 @@ exports.default = Form;
|
|
|
87
87
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
88
88
|
var material_1 = require("@mui/material");
|
|
89
89
|
var Input_1 = __importDefault(require("../../../ui/Input"));
|
|
90
|
-
var SvgPath_1 = require("../../../ui/SvgPath");
|
|
91
90
|
var Text_1 = __importDefault(require("../../../ui/Text"));
|
|
91
|
+
var mui_1 = require("../../../../theme/mui");
|
|
92
92
|
var providers_1 = require("../../../../providers");
|
|
93
93
|
var react_1 = require("react");
|
|
94
94
|
var validate_wallet_address_service_1 = __importDefault(require("../../../../services/axios/validate-wallet-address-service"));
|
|
@@ -114,7 +114,7 @@ var getEstimateFeeDebounce = (0, lodash_1.debounce)(function (callback) {
|
|
|
114
114
|
}, 500, { leading: true, trailing: true });
|
|
115
115
|
function Form(props) {
|
|
116
116
|
var _this = this;
|
|
117
|
-
var theme = (0,
|
|
117
|
+
var theme = (0, mui_1.useTheme)();
|
|
118
118
|
var searchParams = (0, navigation_1.useSearchParams)();
|
|
119
119
|
var address = searchParams.get("address") || "";
|
|
120
120
|
var selectedToken = props.selectedToken, onContinue = props.onContinue, sx = props.sx;
|
|
@@ -324,59 +324,53 @@ function Form(props) {
|
|
|
324
324
|
});
|
|
325
325
|
}
|
|
326
326
|
}, [address]);
|
|
327
|
+
var keyboardThemeMode = (0, providers_1.useKeyboardThemeMode)();
|
|
327
328
|
return ((0, jsx_runtime_1.jsx)(xhub_keyboard_1.Keyboard, { styles: {
|
|
328
329
|
container: {
|
|
329
330
|
height: "100%",
|
|
330
331
|
},
|
|
331
|
-
}, 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.
|
|
332
|
+
}, id: keyboardId, onChange: handleKeyboardChangeAmount, keyboardType: xhub_keyboard_1.KeyboardType.Double, value: amount === null || amount === void 0 ? void 0 : amount.toString(), keyboardId: "form-amount-keyboard-id", onOpen: handleKeyboardOpen, onClose: handleKeyboardClose, theme: keyboardThemeMode, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g16, minHeight: "100%", transition: "padding-bottom 0.3s ease-in-out" }), sx), (isKeyboardOpen
|
|
332
333
|
? {
|
|
333
|
-
paddingBottom: theme.
|
|
334
|
+
paddingBottom: theme.styleMixins.customPadding.p8,
|
|
334
335
|
}
|
|
335
|
-
: {})), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
336
|
+
: {})), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
336
337
|
fontSize: theme.typography.fontSize14,
|
|
337
|
-
color: theme.palette.text.
|
|
338
|
+
color: theme.palette.text.primary,
|
|
338
339
|
fontWeight: theme.typography.fontWeight700,
|
|
339
340
|
}, children: "Wallet address" }), (0, jsx_runtime_1.jsx)(Input_1.default, { sx: {
|
|
340
|
-
paddingX: theme.
|
|
341
|
+
paddingX: theme.styleMixins.customPadding.p16,
|
|
341
342
|
}, inputRest: {
|
|
342
343
|
placeholder: "Enter recipient address",
|
|
343
344
|
value: recipientAddress,
|
|
344
345
|
onChange: handleChangeRecipientAddress,
|
|
345
|
-
}, rightPart: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
346
|
+
}, rightPart: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8 }), children: !!recipientAddress ? ((0, jsx_runtime_1.jsx)(material_1.Box, { onClick: handleClearRecipientAddress, sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8, cursor: "pointer" }), children: (0, jsx_runtime_1.jsx)(Icon_1.default, { iconKey: "IC_CLOSE", sx: { width: 12, height: 12 } }) })) : ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8, color: "primary.main" }), 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: 20, height: 20 } }) }), (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)(Icon_1.default, { iconKey: "IC_DOCUMENTS", sx: { width: 20, height: 20 } }) })] })) }) }), !!recipientAddressError && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.validationError), children: recipientAddressError }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8, alignItems: "center", justifyContent: "space-between" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
346
347
|
fontSize: theme.typography.fontSize14,
|
|
347
|
-
color: theme.palette.text.
|
|
348
|
+
color: theme.palette.text.primary,
|
|
348
349
|
fontWeight: theme.typography.fontWeight700,
|
|
349
|
-
}, children: "Transfer amount" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
350
|
+
}, children: "Transfer amount" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8, alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.value), { fontSize: theme.typography.fontSize11, color: theme.palette.text.secondary }), children: "Your balance " }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.value), { fontSize: theme.typography.fontSize12, color: theme.palette.text.primary, 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: {
|
|
350
351
|
display: "inline-flex",
|
|
351
352
|
alignItems: "center",
|
|
352
|
-
gap: theme.
|
|
353
|
+
gap: theme.styleMixins.gaps.g4,
|
|
353
354
|
pointerEvents: "none",
|
|
354
355
|
}, 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: {
|
|
355
356
|
container: {
|
|
356
|
-
paddingRight: theme.
|
|
357
|
-
paddingLeft: theme.
|
|
358
|
-
paddingTop: theme.
|
|
359
|
-
paddingBottom: theme.
|
|
360
|
-
border: "1px ".concat(theme.palette.
|
|
361
|
-
borderRadius: theme.
|
|
357
|
+
paddingRight: theme.styleMixins.customPadding.p10,
|
|
358
|
+
paddingLeft: theme.styleMixins.customPadding.p16,
|
|
359
|
+
paddingTop: theme.styleMixins.customPadding.p10,
|
|
360
|
+
paddingBottom: theme.styleMixins.customPadding.p10,
|
|
361
|
+
border: "1px ".concat(theme.palette.divider, " solid"),
|
|
362
|
+
borderRadius: theme.shape.borderRadius,
|
|
363
|
+
backgroundColor: "transparent",
|
|
364
|
+
color: theme.palette.text.primary,
|
|
362
365
|
},
|
|
363
|
-
|
|
364
|
-
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
paddingX: theme.mixins.customPadding.p16,
|
|
370
|
-
paddingY: theme.mixins.customPadding.p8,
|
|
371
|
-
border: "0px solid",
|
|
372
|
-
cursor: "pointer",
|
|
373
|
-
}, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
374
|
-
fontSize: theme.typography.fontSize12,
|
|
375
|
-
color: theme.palette.text.primary,
|
|
376
|
-
fontWeight: theme.typography.fontWeight500,
|
|
377
|
-
}, 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: {
|
|
366
|
+
placeholder: {
|
|
367
|
+
color: theme.palette.text.primary,
|
|
368
|
+
fontSize: theme.typography.fontSize13,
|
|
369
|
+
opacity: 0.5,
|
|
370
|
+
},
|
|
371
|
+
}, rightElement: (0, jsx_runtime_1.jsx)(Button_1.default, { onClick: handleClickMaxAmount, size: "small", color: "secondary", children: "Max" }) }) }), !!amountErrorMessage && ((0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.styleMixins.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.styleMixins.column), { gap: theme.styleMixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
378
372
|
fontSize: theme.typography.fontSize14,
|
|
379
|
-
color: theme.palette.text.
|
|
373
|
+
color: theme.palette.text.primary,
|
|
380
374
|
fontWeight: theme.typography.fontWeight700,
|
|
381
375
|
}, children: "Message" }), (0, jsx_runtime_1.jsx)(Input_1.default, { inputRest: {
|
|
382
376
|
placeholder: "Enter comment if needed",
|
|
@@ -58,13 +58,13 @@ var Fees_1 = __importStar(require("../../../ui/Fees"));
|
|
|
58
58
|
var safeText_1 = require("../../../../utils/safeText");
|
|
59
59
|
var react_1 = require("react");
|
|
60
60
|
var Button_1 = __importDefault(require("../../../ui/Button"));
|
|
61
|
-
var
|
|
61
|
+
var mui_1 = require("../../../../theme/mui");
|
|
62
62
|
var Formatter_1 = __importDefault(require("../../../ui/Formatter"));
|
|
63
63
|
var Icon_1 = __importDefault(require("../../../ui/Icon"));
|
|
64
64
|
var useFormatter_1 = __importDefault(require("../../../../hooks/useFormatter"));
|
|
65
65
|
function Result(props) {
|
|
66
66
|
var _a, _b, _c, _d, _e, _f, _g, _h, _j;
|
|
67
|
-
var theme = (0,
|
|
67
|
+
var theme = (0, mui_1.useTheme)();
|
|
68
68
|
var formatDate = (0, useFormatter_1.default)().formatDate;
|
|
69
69
|
var response = props.response, onDone = props.onDone, payload = props.payload, estimateFee = props.estimateFee, selectedToken = props.selectedToken;
|
|
70
70
|
var status = (0, react_1.useMemo)(function () { var _a; return ((_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.transaction_status) || "failed"; }, [(_a = response === null || response === void 0 ? void 0 : response.data) === null || _a === void 0 ? void 0 : _a.transaction_status]);
|
|
@@ -83,11 +83,11 @@ function Result(props) {
|
|
|
83
83
|
display: "flex",
|
|
84
84
|
flexDirection: "column",
|
|
85
85
|
alignItems: "center",
|
|
86
|
-
gap: theme.
|
|
86
|
+
gap: theme.styleMixins.gaps.g16,
|
|
87
87
|
my: "auto",
|
|
88
88
|
backgroundColor: theme.palette.background.tertiary,
|
|
89
|
-
borderRadius: theme.
|
|
90
|
-
padding: theme.
|
|
89
|
+
borderRadius: theme.styleMixins.customRadius.r16,
|
|
90
|
+
padding: theme.styleMixins.customPadding.p16,
|
|
91
91
|
paddingTop: "0px",
|
|
92
92
|
}, children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { iconKey: status === "success" ? "IC_CHECK_CIRCLE" : "IC_ERROR_CIRCLE", width: 100, sx: {
|
|
93
93
|
transform: "translateY(-50%)",
|
|
@@ -97,33 +97,33 @@ function Result(props) {
|
|
|
97
97
|
alignItems: "center",
|
|
98
98
|
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
99
99
|
fontSize: theme.typography.fontSize13,
|
|
100
|
-
color: theme.palette.text.
|
|
100
|
+
color: theme.palette.text.secondary,
|
|
101
101
|
}, children: "Transfer" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
102
102
|
color: theme.palette.text.primary,
|
|
103
103
|
textTransform: "capitalize",
|
|
104
104
|
fontWeight: 600,
|
|
105
105
|
fontSize: theme.typography.fontSize24,
|
|
106
|
-
}, children: status })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { width: "100%", borderTop: "1px ".concat(theme.palette.
|
|
106
|
+
}, children: status })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { width: "100%", borderTop: "1px ".concat(theme.palette.divider, " solid") } }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.bigValue), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: "- ", value: amount, unit: tokenName }) }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { width: "100%", borderTop: "1px ".concat(theme.palette.divider, " solid") } }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Recipient address", titleStyle: {
|
|
107
107
|
fontSize: "0.875rem",
|
|
108
108
|
fontWeight: 500,
|
|
109
|
-
color: "
|
|
110
|
-
}, value: (0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: recipientAddress || "", children: (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex flex-row gap-2 items-center", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.
|
|
109
|
+
color: "text.secondary",
|
|
110
|
+
}, value: (0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: recipientAddress || "", children: (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex flex-row gap-2 items-center", children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.value), children: (0, safeText_1.safeText)(recipientAddress || "", { isShort: true }) }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: {
|
|
111
111
|
width: 16,
|
|
112
112
|
height: 16,
|
|
113
113
|
ml: "auto",
|
|
114
114
|
}, children: SvgPath_1.IC_COPY })] }) }), isAligned: true }), message && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Message", titleStyle: {
|
|
115
115
|
fontSize: "0.875rem",
|
|
116
116
|
fontWeight: 500,
|
|
117
|
-
color: "
|
|
118
|
-
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.
|
|
117
|
+
color: "text.secondary",
|
|
118
|
+
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.value), { textAlign: "right" }), children: message }), isAligned: true })), dateCreated && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Date time", titleStyle: {
|
|
119
119
|
fontSize: "0.875rem",
|
|
120
120
|
fontWeight: 500,
|
|
121
|
-
color: "
|
|
122
|
-
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.
|
|
121
|
+
color: "text.secondary",
|
|
122
|
+
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.value), children: formatDate(dateCreated, true) }), isAligned: true })), (0, jsx_runtime_1.jsx)(Fees_1.default, { isFeePaidByAmount: true, feesData: feeInfo || estimateFee, amount: +(amount || 0), tokenSlug: ((_j = response === null || response === void 0 ? void 0 : response.data) === null || _j === void 0 ? void 0 : _j.currency_slug) || "", feesStyle: Fees_1.FeesStyle.DEFAULT })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
123
123
|
marginTop: "auto",
|
|
124
124
|
width: "100%",
|
|
125
125
|
display: "grid",
|
|
126
126
|
gridTemplateColumns: "1fr",
|
|
127
|
-
gap: theme.
|
|
127
|
+
gap: theme.styleMixins.gaps.g8,
|
|
128
128
|
}, children: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { sx: { width: "100%" }, onClick: onDone, children: "Done" }) })] }));
|
|
129
129
|
}
|
package/dist/components/TekWallet/components/views/SendInternalView/components/SelectToken.js
CHANGED
|
@@ -58,20 +58,20 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
58
58
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
59
59
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
60
60
|
var material_1 = require("@mui/material");
|
|
61
|
-
var providers_1 = require("../../../../providers");
|
|
62
61
|
var TokenSelection_1 = __importDefault(require("../../../ui/TokenSelection"));
|
|
63
|
-
var SvgPath_1 = require("../../../ui/SvgPath");
|
|
64
62
|
var EmptyData_1 = __importDefault(require("../../../ui/EmptyData"));
|
|
65
63
|
var WaitingData_1 = __importDefault(require("../../../ui/WaitingData"));
|
|
66
64
|
var react_1 = require("react");
|
|
67
65
|
var lodash_1 = require("lodash");
|
|
68
66
|
var SortGroup_1 = __importStar(require("../../../ui/ReceiveFunction/components/SortGroup"));
|
|
69
67
|
var SortTool_1 = require("../../../ui/ReceiveFunction/components/SortTool");
|
|
68
|
+
var SearchBar_1 = __importDefault(require("../../../ui/SearchBar"));
|
|
69
|
+
var mui_1 = require("../../../../theme/mui");
|
|
70
70
|
var searchDebounce = (0, lodash_1.debounce)(function (callback) {
|
|
71
71
|
callback();
|
|
72
72
|
}, 500, { leading: true, trailing: true });
|
|
73
73
|
var SelectToken = function (props) {
|
|
74
|
-
var theme = (0,
|
|
74
|
+
var theme = (0, mui_1.useTheme)();
|
|
75
75
|
var _a = (0, react_1.useState)(""), searchValue = _a[0], setSearchValue = _a[1];
|
|
76
76
|
var _b = (0, react_1.useState)(), searchedReceiveTokens = _b[0], setSearchedReceiveTokens = _b[1];
|
|
77
77
|
var _c = (0, react_1.useState)([]), tokenRender = _c[0], setTokenRender = _c[1];
|
|
@@ -132,38 +132,13 @@ var SelectToken = function (props) {
|
|
|
132
132
|
setTokenRender(tokens || []);
|
|
133
133
|
}
|
|
134
134
|
}, [isSearching, searchedReceiveTokens, tokens]);
|
|
135
|
-
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
135
|
+
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g12, height: "fit-content" }), children: [!isEmptyDepositTokens && !isLoadingDepositTokens && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
136
136
|
position: "sticky",
|
|
137
|
-
backgroundColor: theme.palette.background.
|
|
137
|
+
backgroundColor: theme.palette.background.default,
|
|
138
138
|
zIndex: 100,
|
|
139
139
|
top: "0px",
|
|
140
|
-
pb: theme.
|
|
141
|
-
}, children: [(0, jsx_runtime_1.jsx)(
|
|
142
|
-
borderRadius: theme.mixins.customRadius.r12,
|
|
143
|
-
border: "1px solid",
|
|
144
|
-
borderColor: theme.palette.border.accent3,
|
|
145
|
-
background: theme.palette.background.white,
|
|
146
|
-
color: theme.palette.text.black,
|
|
147
|
-
py: theme.mixins.customPadding.p6,
|
|
148
|
-
px: theme.mixins.customPadding.p12,
|
|
149
|
-
fontSize: theme.typography.fontSize16,
|
|
150
|
-
width: "100%",
|
|
151
|
-
lineHeight: "100%",
|
|
152
|
-
"input::placeholder": {
|
|
153
|
-
fontSize: theme.typography.fontSize12,
|
|
154
|
-
pl: theme.mixins.customPadding.p4,
|
|
155
|
-
fontWeight: theme.typography.fontWeight500,
|
|
156
|
-
color: theme.palette.text.black,
|
|
157
|
-
lineHeight: "100%",
|
|
158
|
-
},
|
|
159
|
-
}, endAdornment: (0, jsx_runtime_1.jsx)(material_1.InputAdornment, { position: "end", sx: {
|
|
160
|
-
visibility: isSearching ? "visible" : "hidden",
|
|
161
|
-
}, children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: {
|
|
162
|
-
width: 20,
|
|
163
|
-
height: 20,
|
|
164
|
-
p: theme.mixins.customPadding.p4,
|
|
165
|
-
cursor: "pointer",
|
|
166
|
-
}, 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, { numberOfSkeleton: 8 }), 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) {
|
|
140
|
+
pb: theme.styleMixins.customPadding.p12,
|
|
141
|
+
}, 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, { numberOfSkeleton: 8 }), 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) {
|
|
167
142
|
var stringifiedTokenData = JSON.stringify(item);
|
|
168
143
|
if (!item)
|
|
169
144
|
return null;
|
|
@@ -69,12 +69,12 @@ var Fees_1 = __importStar(require("../../../ui/Fees"));
|
|
|
69
69
|
var ConfirmSendInternal_1 = __importDefault(require("../../../ui/ConfirmSendInternal"));
|
|
70
70
|
var react_1 = require("react");
|
|
71
71
|
var Button_1 = __importStar(require("../../../ui/Button"));
|
|
72
|
-
var
|
|
72
|
+
var mui_1 = require("../../../../theme/mui");
|
|
73
73
|
var Formatter_1 = __importDefault(require("../../../ui/Formatter"));
|
|
74
74
|
function Summary(props) {
|
|
75
75
|
var estimateFee = props.estimateFee, selectedToken = props.selectedToken, payload = props.payload, confirmProps = props.confirmProps;
|
|
76
76
|
var _a = confirmProps || {}, onSuccess = _a.onSuccess, onError = _a.onError, onStart = _a.onStart, onFinally = _a.onFinally, confirmPropsRest = __rest(_a, ["onSuccess", "onError", "onStart", "onFinally"]);
|
|
77
|
-
var theme = (0,
|
|
77
|
+
var theme = (0, mui_1.useTheme)();
|
|
78
78
|
var recipientAddress = (0, react_1.useMemo)(function () { return payload.to_address; }, [payload.to_address]);
|
|
79
79
|
var amount = (0, react_1.useMemo)(function () { return payload.amount; }, [payload.amount]);
|
|
80
80
|
var message = (0, react_1.useMemo)(function () { return payload.message; }, [payload.message]);
|
|
@@ -84,27 +84,27 @@ function Summary(props) {
|
|
|
84
84
|
flexDirection: "column",
|
|
85
85
|
gap: 4,
|
|
86
86
|
height: "100%",
|
|
87
|
-
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.
|
|
87
|
+
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.headerTitle), { textAlign: "start", mr: "auto" }), children: "Transaction summary" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
88
88
|
display: "flex",
|
|
89
89
|
flexDirection: "column",
|
|
90
|
-
gap: theme.
|
|
90
|
+
gap: theme.styleMixins.gaps.g16,
|
|
91
91
|
}, children: [(0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Amount", titleStyle: {
|
|
92
92
|
fontSize: "0.875rem",
|
|
93
93
|
fontWeight: 500,
|
|
94
|
-
color: "
|
|
95
|
-
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.
|
|
94
|
+
color: "text.secondary",
|
|
95
|
+
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.value), { textAlign: "right" }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: amount, unit: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name }) }), isAligned: true }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { column: true, title: "Recipient address", titleStyle: {
|
|
96
96
|
fontSize: "0.875rem",
|
|
97
97
|
fontWeight: 500,
|
|
98
|
-
color: "
|
|
99
|
-
}, value: (0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: recipientAddress || "", sx: { width: "100%" }, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
98
|
+
color: "text.secondary",
|
|
99
|
+
}, value: (0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: recipientAddress || "", sx: { width: "100%" }, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.value), { wordBreak: "break-all", textAlign: "left" }), children: recipientAddress }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: {
|
|
100
100
|
width: 16,
|
|
101
101
|
height: 16,
|
|
102
102
|
ml: "auto",
|
|
103
103
|
}, children: SvgPath_1.IC_COPY })] }) }), isAligned: true }), message && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { column: true, title: "Message", titleStyle: {
|
|
104
104
|
fontSize: "0.875rem",
|
|
105
105
|
fontWeight: 500,
|
|
106
|
-
color: "
|
|
107
|
-
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.
|
|
106
|
+
color: "text.secondary",
|
|
107
|
+
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.value), { textAlign: "left" }), children: message }), isAligned: true })), (0, jsx_runtime_1.jsx)(Fees_1.default, { isFeePaidByAmount: true, feesData: estimateFee, amount: +(amount || 0), tokenSlug: (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.slug) || "", feesStyle: Fees_1.FeesStyle.DEFAULT })] }), (0, jsx_runtime_1.jsx)(ConfirmSendInternal_1.default, __assign({ sx: {
|
|
108
108
|
width: "100%",
|
|
109
109
|
marginTop: "auto",
|
|
110
110
|
}, payload: payload }, confirmPropsRest, { onSuccess: function (res) {
|
|
@@ -32,7 +32,7 @@ var DefaultPageLayout_1 = __importDefault(require("../../layouts/DefaultPageLayo
|
|
|
32
32
|
var Summary_1 = __importDefault(require("./components/Summary"));
|
|
33
33
|
var Result_1 = __importDefault(require("./components/Result"));
|
|
34
34
|
var useCustomRouter_1 = __importDefault(require("../../../hooks/useCustomRouter"));
|
|
35
|
-
var
|
|
35
|
+
var mui_1 = require("../../../theme/mui");
|
|
36
36
|
var TransferStep;
|
|
37
37
|
(function (TransferStep) {
|
|
38
38
|
TransferStep[TransferStep["SELECT_TOKEN"] = 0] = "SELECT_TOKEN";
|
|
@@ -55,7 +55,7 @@ var InternalAmountError;
|
|
|
55
55
|
exports.SendInternalView = (0, react_1.forwardRef)(function (props, ref) {
|
|
56
56
|
var isInitPasscode = (0, useWalletData_1.default)().isInitPasscode;
|
|
57
57
|
var _a = (0, useWithdrawData_1.default)(), updateSendInternalToken = _a.updateSendInternalToken, sendInternalTokens = _a.sendInternalTokens;
|
|
58
|
-
var theme = (0,
|
|
58
|
+
var theme = (0, mui_1.useTheme)();
|
|
59
59
|
var router = (0, useCustomRouter_1.default)();
|
|
60
60
|
var drawerRef = (0, react_1.useRef)(null);
|
|
61
61
|
var stepsRef = (0, react_1.useRef)(null);
|
|
@@ -142,7 +142,7 @@ exports.SendInternalView = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
142
142
|
paddingRight: "0px",
|
|
143
143
|
paddingTop: "0px",
|
|
144
144
|
paddingBottom: "0px",
|
|
145
|
-
}, children: selectedToken && ((0, jsx_runtime_1.jsx)(react_1.Suspense, { children: (0, jsx_runtime_1.jsx)(Form_1.default, { sx: __assign({}, theme.
|
|
145
|
+
}, children: selectedToken && ((0, jsx_runtime_1.jsx)(react_1.Suspense, { children: (0, jsx_runtime_1.jsx)(Form_1.default, { sx: __assign({}, theme.styleMixins.pagePadding), selectedToken: selectedToken, onContinue: gotoConfirmStep }, clearFormKey) })) }) }, TransferStep.FORM), (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: { minHeight: "100%" }, children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { sx: {
|
|
146
146
|
height: "100%",
|
|
147
147
|
}, children: payload && ((0, jsx_runtime_1.jsx)(Summary_1.default, { estimateFee: estimateFee, payload: __assign(__assign({}, payload), { await_completion: true }), selectedToken: selectedToken, confirmProps: {
|
|
148
148
|
onSuccess: handleSendSuccess,
|
|
@@ -56,7 +56,7 @@ var material_1 = require("@mui/material");
|
|
|
56
56
|
var ChildPageLayout_1 = __importDefault(require("../../layouts/ChildPageLayout"));
|
|
57
57
|
var ListItemCustom_1 = __importDefault(require("../../ui/ListItemCustom"));
|
|
58
58
|
var ChangePasscode_1 = __importDefault(require("../../ui/ChangePasscode"));
|
|
59
|
-
var
|
|
59
|
+
var mui_1 = require("../../../theme/mui");
|
|
60
60
|
var TekWalletProvider_1 = require("../../../providers/TekWalletProvider");
|
|
61
61
|
var SvgPath_1 = require("../../ui/SvgPath");
|
|
62
62
|
var Button_1 = __importStar(require("../../ui/Button"));
|
|
@@ -64,7 +64,7 @@ var react_1 = require("react");
|
|
|
64
64
|
var SettingView = function (props) {
|
|
65
65
|
var _a = props;
|
|
66
66
|
var _b = (0, react_1.useState)(Button_1.BUTTON_STATUS.ENABLED), buttonStatus = _b[0], setButtonStatus = _b[1];
|
|
67
|
-
var theme = (0,
|
|
67
|
+
var theme = (0, mui_1.useTheme)();
|
|
68
68
|
var onLogout = (0, TekWalletProvider_1.useWalletSetup)().onLogout;
|
|
69
69
|
var handleLogout = function () {
|
|
70
70
|
if (!onLogout)
|
|
@@ -72,18 +72,9 @@ var SettingView = function (props) {
|
|
|
72
72
|
onLogout === null || onLogout === void 0 ? void 0 : onLogout();
|
|
73
73
|
setButtonStatus(Button_1.BUTTON_STATUS.LOADING);
|
|
74
74
|
};
|
|
75
|
-
return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "Setting" }), children: (0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, { sx: __assign(__assign({}, theme.
|
|
75
|
+
return ((0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "Setting" }), children: (0, jsx_runtime_1.jsxs)(DefaultPageLayout_1.default, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g16 }), children: [(0, jsx_runtime_1.jsx)(ChangePasscode_1.default, { children: (0, jsx_runtime_1.jsx)(ListItemCustom_1.default, { hideTag: true, title: "Change Passcode", description: "Change your passcode", icon: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "2rem", height: "2rem", color: "text.secondary" }, children: SvgPath_1.IC_CHANGE_PASSCODE }) }) }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { sx: {
|
|
76
76
|
marginTop: "auto",
|
|
77
|
-
|
|
78
|
-
textTransform: "capitalize",
|
|
79
|
-
position: "relative",
|
|
80
|
-
padding: "".concat(theme.mixins.customPadding.p12, " ").concat(theme.mixins.customPadding.p16),
|
|
81
|
-
fontWeight: theme.typography.fontWeight500,
|
|
82
|
-
fontSize: theme.typography.fontSize14,
|
|
83
|
-
lineHeight: theme.typography.leading100,
|
|
84
|
-
backgroundColor: theme.palette.background.error,
|
|
85
|
-
color: theme.palette.text.white,
|
|
86
|
-
}, onClick: handleLogout, status: buttonStatus, children: "Logout" })] }) }));
|
|
77
|
+
}, color: "error", onClick: handleLogout, status: buttonStatus, children: "Logout" })] }) }));
|
|
87
78
|
};
|
|
88
79
|
exports.SettingView = SettingView;
|
|
89
80
|
exports.default = exports.SettingView;
|
package/dist/components/TekWallet/components/views/SwapView/components/FromCard/FromCardSkeleton.js
CHANGED
|
@@ -2,14 +2,13 @@
|
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
var jsx_runtime_1 = require("react/jsx-runtime");
|
|
4
4
|
var material_1 = require("@mui/material");
|
|
5
|
-
var
|
|
5
|
+
var mui_1 = require("../../../../../theme/mui");
|
|
6
6
|
var FromCardSkeleton = function () {
|
|
7
|
-
var theme = (0,
|
|
7
|
+
var theme = (0, mui_1.useTheme)();
|
|
8
8
|
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
9
9
|
border: "1px solid",
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
padding: theme.mixins.customPadding.p16,
|
|
10
|
+
borderRadius: theme.styleMixins.customRadius.r16,
|
|
11
|
+
padding: theme.styleMixins.customPadding.p16,
|
|
13
12
|
backdropFilter: "blur(12px)",
|
|
14
13
|
opacity: 0.7,
|
|
15
14
|
}, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
@@ -20,8 +19,8 @@ var FromCardSkeleton = function () {
|
|
|
20
19
|
display: "flex",
|
|
21
20
|
justifyContent: "space-between",
|
|
22
21
|
alignItems: "center",
|
|
23
|
-
mt: theme.
|
|
24
|
-
mb: theme.
|
|
25
|
-
}, children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { sx: { width: "30%", height: 36, display: "block", transform: "none" } }) }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { mt: theme.
|
|
22
|
+
mt: theme.styleMixins.customMargin.m12,
|
|
23
|
+
mb: theme.styleMixins.customMargin.m12,
|
|
24
|
+
}, children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { sx: { width: "30%", height: 36, display: "block", transform: "none" } }) }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { mt: theme.styleMixins.customMargin.m16 }, children: (0, jsx_runtime_1.jsx)(material_1.Skeleton, { sx: { width: "100%", height: 36, transform: "none" } }) })] }));
|
|
26
25
|
};
|
|
27
26
|
exports.default = FromCardSkeleton;
|
|
@@ -41,7 +41,7 @@ var jsx_runtime_1 = require("react/jsx-runtime");
|
|
|
41
41
|
var material_1 = require("@mui/material");
|
|
42
42
|
var react_1 = require("react");
|
|
43
43
|
var Icon_1 = __importDefault(require("../../../../ui/Icon"));
|
|
44
|
-
var
|
|
44
|
+
var mui_1 = require("../../../../../theme/mui");
|
|
45
45
|
var useWallet_1 = __importDefault(require("../../../../../hooks/useWallet"));
|
|
46
46
|
var Button_1 = __importDefault(require("../../../../ui/Button"));
|
|
47
47
|
var Text_1 = __importDefault(require("../../../../ui/Text"));
|
|
@@ -58,7 +58,7 @@ var FromCard = function (_a) {
|
|
|
58
58
|
var _b, _c, _d;
|
|
59
59
|
var selectedToken = _a.selectedToken, onChange = _a.onChange, amount = _a.amount, onChangeToken = _a.onChangeToken, setFromInfoIsReady = _a.setFromInfoIsReady, keyboardId = _a.keyboardId, _e = _a.amountWasChanged, amountWasChanged = _e === void 0 ? true : _e, fromTokens = _a.fromTokens;
|
|
60
60
|
var _f = (0, useWallet_1.default)(), updateSwapTokens = _f.updateSwapTokens, isInitPasscode = _f.isInitPasscode;
|
|
61
|
-
var theme = (0,
|
|
61
|
+
var theme = (0, mui_1.useTheme)();
|
|
62
62
|
var selectTokenRef = (0, react_1.useRef)(null);
|
|
63
63
|
var _g = (0, useValidateAmount_1.default)({
|
|
64
64
|
validationData: {
|
|
@@ -108,38 +108,38 @@ var FromCard = function (_a) {
|
|
|
108
108
|
}, [errorContent, setFromInfoIsReady]);
|
|
109
109
|
return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
110
110
|
border: "1px solid",
|
|
111
|
-
borderColor: "".concat(!!shouldShowError ?
|
|
112
|
-
borderRadius: theme.
|
|
113
|
-
padding: theme.
|
|
111
|
+
borderColor: "".concat(!!shouldShowError ? theme.palette.error.main : "".concat(theme.palette.primary.main)),
|
|
112
|
+
borderRadius: theme.styleMixins.customRadius.r16,
|
|
113
|
+
padding: theme.styleMixins.customPadding.p16,
|
|
114
114
|
backdropFilter: "blur(12px)",
|
|
115
115
|
}, children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
116
116
|
display: "flex",
|
|
117
117
|
justifyContent: "space-between",
|
|
118
118
|
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
119
|
-
color: theme.palette.text.
|
|
119
|
+
color: theme.palette.text.primary,
|
|
120
120
|
fontWeight: theme.typography.fontWeight600,
|
|
121
121
|
}, children: "From" }), (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: {
|
|
122
|
-
color: theme.palette.text.
|
|
122
|
+
color: theme.palette.text.secondary,
|
|
123
123
|
fontSize: theme.typography.fontSize12,
|
|
124
124
|
fontWeight: theme.typography.fontWeight400,
|
|
125
125
|
}, children: ["Balance:", " ", (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
126
|
-
color: theme.palette.text.
|
|
126
|
+
color: theme.palette.text.primary,
|
|
127
127
|
fontWeight: theme.typography.fontWeight500,
|
|
128
128
|
fontSize: theme.typography.fontSize12,
|
|
129
129
|
}, children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.balance, unit: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name }) })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
130
130
|
display: "flex",
|
|
131
131
|
justifyContent: "space-between",
|
|
132
132
|
alignItems: "center",
|
|
133
|
-
mt: theme.
|
|
134
|
-
mb: theme.
|
|
133
|
+
mt: theme.styleMixins.customMargin.m20,
|
|
134
|
+
mb: theme.styleMixins.customMargin.m16,
|
|
135
135
|
}, children: [(0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: selectTokenRef, direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, trigger: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
|
|
136
136
|
display: "flex",
|
|
137
137
|
alignItems: "center",
|
|
138
|
-
gap: theme.
|
|
138
|
+
gap: theme.styleMixins.gaps.g4,
|
|
139
139
|
cursor: "pointer",
|
|
140
140
|
}, children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.link, width: 20, height: 20, sx: { borderRadius: "9999px" } }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
141
141
|
flex: 1,
|
|
142
|
-
color: theme.palette.text.
|
|
142
|
+
color: theme.palette.text.primary,
|
|
143
143
|
fontWeight: theme.typography.fontWeight600,
|
|
144
144
|
}, children: (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name) || (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.full_name) }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 10, height: 10, display: "block" }, children: SvgPath_1.IC_ARROW_BLACK_DROP })] }), children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { header: (0, jsx_runtime_1.jsx)(PageHeader_1.default, { title: "Select Token", overrideBack: closeSelectToken }), children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { sx: {
|
|
145
145
|
width: "100dvw",
|
|
@@ -149,6 +149,12 @@ var FromCard = function (_a) {
|
|
|
149
149
|
padding: "0",
|
|
150
150
|
border: "none",
|
|
151
151
|
minWidth: "0px !important",
|
|
152
|
+
color: theme.palette.text.primary,
|
|
153
|
+
backgroundColor: "transparent",
|
|
154
|
+
},
|
|
155
|
+
placeholder: {
|
|
156
|
+
color: theme.palette.text.primary,
|
|
157
|
+
opacity: 0.5,
|
|
152
158
|
},
|
|
153
159
|
input: {
|
|
154
160
|
display: "flex",
|
|
@@ -160,19 +166,8 @@ var FromCard = function (_a) {
|
|
|
160
166
|
display: "flex",
|
|
161
167
|
alignItems: "center",
|
|
162
168
|
justifyContent: "space-between",
|
|
163
|
-
}, children: [!!shouldShowError && errorContent, (0, jsx_runtime_1.jsx)(Button_1.default, { sx: {
|
|
164
|
-
textTransform: "capitalize",
|
|
165
|
-
backgroundColor: theme.palette.background.tertiary,
|
|
166
|
-
borderRadius: theme.mixins.customRadius.r8,
|
|
167
|
-
color: theme.palette.text.primary,
|
|
168
|
-
px: theme.mixins.customPadding.p16,
|
|
169
|
-
py: theme.mixins.customPadding.p8,
|
|
169
|
+
}, children: [!!shouldShowError && errorContent, (0, jsx_runtime_1.jsx)(Button_1.default, { color: "secondary", size: "medium", sx: {
|
|
170
170
|
marginLeft: "auto",
|
|
171
|
-
}, onClick: handleClickGetMaxValue, children:
|
|
172
|
-
color: theme.palette.primary.main,
|
|
173
|
-
fontWeight: theme.typography.fontWeight600,
|
|
174
|
-
fontSize: theme.typography.fontSize12,
|
|
175
|
-
lineHeight: theme.typography.leading100,
|
|
176
|
-
}, children: "Max" }) })] })] }));
|
|
171
|
+
}, onClick: handleClickGetMaxValue, children: "Max" })] })] }));
|
|
177
172
|
};
|
|
178
173
|
exports.default = FromCard;
|