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
|
@@ -90,6 +90,7 @@ var Input_1 = __importDefault(require("../../../ui/Input"));
|
|
|
90
90
|
var Formatter_1 = __importDefault(require("../../../ui/Formatter"));
|
|
91
91
|
var SvgPath_1 = require("../../../ui/SvgPath");
|
|
92
92
|
var Text_1 = __importDefault(require("../../../ui/Text"));
|
|
93
|
+
var mui_1 = require("../../../../theme/mui");
|
|
93
94
|
var providers_1 = require("../../../../providers");
|
|
94
95
|
var react_1 = require("react");
|
|
95
96
|
var validate_wallet_address_service_1 = __importDefault(require("../../../../services/axios/validate-wallet-address-service"));
|
|
@@ -118,7 +119,7 @@ var getEstimateFeeDebounce = (0, lodash_1.debounce)(function (callback) {
|
|
|
118
119
|
}, 500, { leading: true, trailing: true });
|
|
119
120
|
function Form(props) {
|
|
120
121
|
var _this = this;
|
|
121
|
-
var theme = (0,
|
|
122
|
+
var theme = (0, mui_1.useTheme)();
|
|
122
123
|
var searchParams = (0, navigation_1.useSearchParams)();
|
|
123
124
|
var address = searchParams.get("address") || "";
|
|
124
125
|
var selectedToken = props.selectedToken, onContinue = props.onContinue, sx = props.sx;
|
|
@@ -405,32 +406,33 @@ function Form(props) {
|
|
|
405
406
|
(0, react_1.useEffect)(function () {
|
|
406
407
|
validateAmount((amount === null || amount === void 0 ? void 0 : amount.toString()) || "");
|
|
407
408
|
}, [amount, validateAmount]);
|
|
409
|
+
var keyboardThemeMode = (0, providers_1.useKeyboardThemeMode)();
|
|
408
410
|
return ((0, jsx_runtime_1.jsx)(xhub_keyboard_1.Keyboard, { styles: {
|
|
409
411
|
container: {
|
|
410
412
|
height: "100%",
|
|
411
413
|
},
|
|
412
|
-
}, 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.jsx)(react_2.AnimatePresence, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign(__assign({}, theme.
|
|
414
|
+
}, 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.jsx)(react_2.AnimatePresence, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g16, minHeight: "100%", transition: "padding-bottom 0.3s ease-in-out" }), sx), (isKeyboardOpen
|
|
413
415
|
? {
|
|
414
|
-
paddingBottom: theme.
|
|
416
|
+
paddingBottom: theme.styleMixins.customPadding.p8,
|
|
415
417
|
}
|
|
416
|
-
: {})), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
418
|
+
: {})), 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: {
|
|
417
419
|
fontSize: theme.typography.fontSize14,
|
|
418
|
-
color: theme.palette.text.
|
|
420
|
+
color: theme.palette.text.primary,
|
|
419
421
|
fontWeight: theme.typography.fontWeight700,
|
|
420
422
|
}, children: "Wallet address" }), (0, jsx_runtime_1.jsx)(Input_1.default, { sx: {
|
|
421
|
-
paddingX: theme.
|
|
423
|
+
paddingX: theme.styleMixins.customPadding.p16,
|
|
422
424
|
}, inputRest: {
|
|
423
425
|
placeholder: "Enter recipient address",
|
|
424
426
|
value: recipientAddress,
|
|
425
427
|
onChange: handleChangeRecipientAddress,
|
|
426
428
|
id: "recipient-address-input-id",
|
|
427
|
-
}, rightPart: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
429
|
+
}, 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)("label", { htmlFor: "recipient-address-input-id", children: (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)(material_1.SvgIcon, { sx: { width: 12, height: 12 }, children: SvgPath_1.IC_CLOSE }) }) })) : ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.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 }))] }), allowSelectNetwork && ((0, jsx_runtime_1.jsxs)(react_2.motion.div, { initial: { opacity: 0, height: 0 }, animate: { opacity: 1, height: "auto" }, transition: { duration: 0.3 }, style: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g8, willChange: "height, opacity" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
428
430
|
fontSize: theme.typography.fontSize14,
|
|
429
|
-
color: theme.palette.text.
|
|
431
|
+
color: theme.palette.text.primary,
|
|
430
432
|
fontWeight: theme.typography.fontWeight700,
|
|
431
433
|
}, children: "Network" }), (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: selectNetworkDrawerRef, trigger: (0, jsx_runtime_1.jsx)(Input_1.default, { sx: {
|
|
432
|
-
paddingLeft: theme.
|
|
433
|
-
paddingRight: theme.
|
|
434
|
+
paddingLeft: theme.styleMixins.customPadding.p12,
|
|
435
|
+
paddingRight: theme.styleMixins.customPadding.p16,
|
|
434
436
|
}, inputRest: {
|
|
435
437
|
placeholder: "Select a network",
|
|
436
438
|
value: (selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.name) || "",
|
|
@@ -438,42 +440,35 @@ function Form(props) {
|
|
|
438
440
|
inputProps: {
|
|
439
441
|
readOnly: true,
|
|
440
442
|
},
|
|
441
|
-
}, leftPart: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
443
|
+
}, leftPart: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8 }), children: (0, jsx_runtime_1.jsx)(Icon_1.default, { iconKey: "IC_NETWORK", src: (selectedNetwork === null || selectedNetwork === void 0 ? void 0 : selectedNetwork.link) || undefined, sx: { width: 24, height: 24 } }) }), rightPart: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { display: "block" }, children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 10, height: 18, display: "block" }, children: SvgPath_1.ARROW_DOWN }) }) }), children: (0, jsx_runtime_1.jsx)(ModalLayout_1.default, { title: "Select network", onClose: closeSelectNetwork, children: (0, jsx_runtime_1.jsx)(SelectNetwork_1.default, { networks: networks, selectedNetwork: selectedNetwork, selectedToken: selectedToken, onChangeNetwork: handleChangeNetwork }) }) })] })), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.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: {
|
|
442
444
|
fontSize: theme.typography.fontSize14,
|
|
443
|
-
color: theme.palette.text.
|
|
445
|
+
color: theme.palette.text.primary,
|
|
444
446
|
fontWeight: theme.typography.fontWeight700,
|
|
445
|
-
}, children: "Withdrawal amount" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
447
|
+
}, children: "Withdrawal 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: balance, unit: " ".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name) }) })] })] }), (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Label, { htmlFor: keyboardId, children: (0, jsx_runtime_1.jsx)(xhub_keyboard_1.Input, { elementsAcceptIds: ["form-amount-keyboard-id"], value: amount === null || amount === void 0 ? void 0 : amount.toString(), displayType: xhub_keyboard_1.DisplayType.Double, placeholder: ((0, jsx_runtime_1.jsx)(material_1.Box, { component: "span", sx: { pointerEvents: "none" }, children: placeholder })), styles: {
|
|
446
448
|
container: {
|
|
447
|
-
paddingRight: theme.
|
|
448
|
-
paddingLeft: theme.
|
|
449
|
-
paddingTop: theme.
|
|
450
|
-
paddingBottom: theme.
|
|
451
|
-
border: "1px ".concat(theme.palette.
|
|
452
|
-
borderRadius: theme.
|
|
449
|
+
paddingRight: theme.styleMixins.customPadding.p10,
|
|
450
|
+
paddingLeft: theme.styleMixins.customPadding.p16,
|
|
451
|
+
paddingTop: theme.styleMixins.customPadding.p10,
|
|
452
|
+
paddingBottom: theme.styleMixins.customPadding.p10,
|
|
453
|
+
border: "1px ".concat(theme.palette.divider, " solid"),
|
|
454
|
+
borderRadius: theme.shape.borderRadius,
|
|
455
|
+
backgroundColor: "transparent",
|
|
456
|
+
color: theme.palette.text.primary,
|
|
453
457
|
},
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
|
|
457
|
-
|
|
458
|
-
|
|
459
|
-
|
|
460
|
-
paddingX: theme.mixins.customPadding.p16,
|
|
461
|
-
paddingY: theme.mixins.customPadding.p8,
|
|
462
|
-
border: "0px solid",
|
|
463
|
-
cursor: "pointer",
|
|
464
|
-
}, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
465
|
-
fontSize: theme.typography.fontSize12,
|
|
466
|
-
color: theme.palette.text.primary,
|
|
467
|
-
fontWeight: theme.typography.fontWeight500,
|
|
468
|
-
}, 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: {
|
|
458
|
+
placeholder: {
|
|
459
|
+
color: theme.palette.text.primary,
|
|
460
|
+
fontSize: theme.typography.fontSize13,
|
|
461
|
+
opacity: 0.5,
|
|
462
|
+
},
|
|
463
|
+
}, rightElement: (0, jsx_runtime_1.jsx)(Button_1.default, { size: "small", color: "secondary", onClick: handleClickMaxAmount, 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: {
|
|
469
464
|
fontSize: theme.typography.fontSize14,
|
|
470
|
-
color: theme.palette.text.
|
|
465
|
+
color: theme.palette.text.primary,
|
|
471
466
|
fontWeight: theme.typography.fontWeight700,
|
|
472
|
-
}, children: "Memo" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
467
|
+
}, children: "Memo" }), (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)(Input_1.default, { inputRest: {
|
|
473
468
|
placeholder: "Enter memo if needed",
|
|
474
469
|
value: comment,
|
|
475
470
|
onChange: handleChangeComment,
|
|
476
|
-
} }), !!memoError && (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.
|
|
471
|
+
} }), !!memoError && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.validationError), children: memoError }))] }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.validationDescription), children: "Enter memo if your receiving platform requires one to avoid losing your funds." })] }), (0, jsx_runtime_1.jsx)(Fees_1.default, { isFeePaidByAmount: true, feesData: estimateFee, amount: +amount, tokenSlug: (selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.slug) || "", feesStyle: Fees_1.FeesStyle.WITH_BACKGROUND, setIsEnoughBalanceToPayFee: setIsEnoughBalanceToPayFee }), (0, jsx_runtime_1.jsx)(QrCodeReader_1.default, { ref: scannerAddressQrCodeRef, onResult: handleScanAddressQrCode }), (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { loading: isValidatingAddress || isEstimatingFee, onClick: handleContinue, status: !recipientAddress ||
|
|
477
472
|
!selectedNetwork ||
|
|
478
473
|
!amount ||
|
|
479
474
|
!!recipientAddressError ||
|
|
@@ -58,7 +58,7 @@ 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"));
|
|
@@ -71,7 +71,7 @@ var getIconKey = function (status) {
|
|
|
71
71
|
};
|
|
72
72
|
function Result(props) {
|
|
73
73
|
var _a;
|
|
74
|
-
var theme = (0,
|
|
74
|
+
var theme = (0, mui_1.useTheme)();
|
|
75
75
|
var formatDate = (0, useFormatter_1.default)().formatDate;
|
|
76
76
|
var response = props.transaction, onDone = props.onDone, payload = props.payload, selectedToken = props.selectedToken;
|
|
77
77
|
var status = (0, react_1.useMemo)(function () { return (response === null || response === void 0 ? void 0 : response.transaction_status) || "failed"; }, [response === null || response === void 0 ? void 0 : response.transaction_status]);
|
|
@@ -91,11 +91,11 @@ function Result(props) {
|
|
|
91
91
|
display: "flex",
|
|
92
92
|
flexDirection: "column",
|
|
93
93
|
alignItems: "center",
|
|
94
|
-
gap: theme.
|
|
94
|
+
gap: theme.styleMixins.gaps.g16,
|
|
95
95
|
my: "auto",
|
|
96
96
|
backgroundColor: theme.palette.background.tertiary,
|
|
97
|
-
borderRadius: theme.
|
|
98
|
-
padding: theme.
|
|
97
|
+
borderRadius: theme.styleMixins.customRadius.r16,
|
|
98
|
+
padding: theme.styleMixins.customPadding.p16,
|
|
99
99
|
paddingTop: "0px",
|
|
100
100
|
}, children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { iconKey: getIconKey(status), width: 100, sx: {
|
|
101
101
|
transform: "translateY(-50%)",
|
|
@@ -105,37 +105,37 @@ function Result(props) {
|
|
|
105
105
|
alignItems: "center",
|
|
106
106
|
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
107
107
|
fontSize: theme.typography.fontSize13,
|
|
108
|
-
color: theme.palette.text.
|
|
108
|
+
color: theme.palette.text.secondary,
|
|
109
109
|
}, children: "Withdraw" }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
110
110
|
color: theme.palette.text.primary,
|
|
111
111
|
textTransform: "capitalize",
|
|
112
112
|
fontWeight: 600,
|
|
113
113
|
fontSize: theme.typography.fontSize24,
|
|
114
|
-
}, children: status })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: { width: "100%", borderTop: "1px ".concat(theme.palette.
|
|
114
|
+
}, 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: {
|
|
115
115
|
fontSize: "0.875rem",
|
|
116
116
|
fontWeight: 500,
|
|
117
|
-
color: "
|
|
118
|
-
}, 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.
|
|
117
|
+
color: "text.secondary",
|
|
118
|
+
}, 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: {
|
|
119
119
|
width: 16,
|
|
120
120
|
height: 16,
|
|
121
121
|
ml: "auto",
|
|
122
122
|
}, children: SvgPath_1.IC_COPY })] }) }), isAligned: true }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Network", titleStyle: {
|
|
123
123
|
fontSize: "0.875rem",
|
|
124
124
|
fontWeight: 500,
|
|
125
|
-
color: "
|
|
126
|
-
}, value: (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex gap-2 items-center", children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: networkInfo === null || networkInfo === void 0 ? void 0 : networkInfo.link, width: 20 }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.
|
|
125
|
+
color: "text.secondary",
|
|
126
|
+
}, value: (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex gap-2 items-center", children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: networkInfo === null || networkInfo === void 0 ? void 0 : networkInfo.link, width: 20 }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.value), children: networkInfo === null || networkInfo === void 0 ? void 0 : networkInfo.name })] }), isAligned: true }), memo && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Memo", titleStyle: {
|
|
127
127
|
fontSize: "0.875rem",
|
|
128
128
|
fontWeight: 500,
|
|
129
|
-
color: "
|
|
130
|
-
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.
|
|
129
|
+
color: "text.secondary",
|
|
130
|
+
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.value), children: memo }), isAligned: true })), dateCreated && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Date time", titleStyle: {
|
|
131
131
|
fontSize: "0.875rem",
|
|
132
132
|
fontWeight: 500,
|
|
133
|
-
color: "
|
|
134
|
-
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.
|
|
133
|
+
color: "text.secondary",
|
|
134
|
+
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.value), children: formatDate(dateCreated, true) }), isAligned: true })), !!feeInfo && ((0, jsx_runtime_1.jsx)(Fees_1.default, { isFeePaidByAmount: true, feesData: feeInfo, amount: +(amount || 0), tokenSlug: (response === null || response === void 0 ? void 0 : response.currency_slug) || "", feesStyle: Fees_1.FeesStyle.DEFAULT }))] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
|
|
135
135
|
marginTop: "auto",
|
|
136
136
|
width: "100%",
|
|
137
137
|
display: "grid",
|
|
138
138
|
gridTemplateColumns: "1fr",
|
|
139
|
-
gap: theme.
|
|
139
|
+
gap: theme.styleMixins.gaps.g8,
|
|
140
140
|
}, children: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { sx: { width: "100%" }, onClick: onDone, children: "Done" }) })] }));
|
|
141
141
|
}
|
package/dist/components/TekWallet/components/views/SendExternalView/components/SelectNetwork.js
CHANGED
|
@@ -17,15 +17,15 @@ 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 material_1 = require("@mui/material");
|
|
20
|
-
var
|
|
20
|
+
var mui_1 = require("../../../../theme/mui");
|
|
21
21
|
var NetworkSelection_1 = __importDefault(require("../../../ui/NetworkSelection"));
|
|
22
22
|
function SelectNetwork(props) {
|
|
23
23
|
var networks = props.networks, selectedNetwork = props.selectedNetwork, onChangeNetwork = props.onChangeNetwork, selectedToken = props.selectedToken;
|
|
24
|
-
var theme = (0,
|
|
24
|
+
var theme = (0, mui_1.useTheme)();
|
|
25
25
|
var handleSelectNetwork = (0, react_1.useCallback)(function (network) {
|
|
26
26
|
onChangeNetwork === null || onChangeNetwork === void 0 ? void 0 : onChangeNetwork(network);
|
|
27
27
|
}, [onChangeNetwork]);
|
|
28
|
-
return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
28
|
+
return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g8 }), children: networks === null || networks === void 0 ? void 0 : networks.map(function (item, index) {
|
|
29
29
|
if (!item)
|
|
30
30
|
return null;
|
|
31
31
|
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)));
|
package/dist/components/TekWallet/components/views/SendExternalView/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;
|
|
@@ -68,14 +68,14 @@ var SvgPath_1 = require("../../../ui/SvgPath");
|
|
|
68
68
|
var Fees_1 = __importStar(require("../../../ui/Fees"));
|
|
69
69
|
var react_1 = require("react");
|
|
70
70
|
var Button_1 = __importStar(require("../../../ui/Button"));
|
|
71
|
-
var
|
|
71
|
+
var mui_1 = require("../../../../theme/mui");
|
|
72
72
|
var Formatter_1 = __importDefault(require("../../../ui/Formatter"));
|
|
73
73
|
var ConfirmSendExternal_1 = __importDefault(require("../../../ui/ConfirmSendExternal"));
|
|
74
74
|
var Icon_1 = __importDefault(require("../../../ui/Icon"));
|
|
75
75
|
function Summary(props) {
|
|
76
76
|
var estimateFee = props.estimateFee, selectedToken = props.selectedToken, payload = props.payload, confirmProps = props.confirmProps;
|
|
77
77
|
var _a = confirmProps || {}, onSuccess = _a.onSuccess, onError = _a.onError, onStart = _a.onStart, onFinally = _a.onFinally, confirmPropsRest = __rest(_a, ["onSuccess", "onError", "onStart", "onFinally"]);
|
|
78
|
-
var theme = (0,
|
|
78
|
+
var theme = (0, mui_1.useTheme)();
|
|
79
79
|
var recipientAddress = (0, react_1.useMemo)(function () { return payload.to_address; }, [payload.to_address]);
|
|
80
80
|
var amount = (0, react_1.useMemo)(function () { return payload.amount; }, [payload.amount]);
|
|
81
81
|
var memo = (0, react_1.useMemo)(function () { return payload.memo; }, [payload.memo]);
|
|
@@ -85,31 +85,31 @@ function Summary(props) {
|
|
|
85
85
|
flexDirection: "column",
|
|
86
86
|
gap: 3,
|
|
87
87
|
height: "100%",
|
|
88
|
-
}, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.
|
|
88
|
+
}, 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: {
|
|
89
89
|
display: "flex",
|
|
90
90
|
flexDirection: "column",
|
|
91
|
-
gap: theme.
|
|
91
|
+
gap: theme.styleMixins.gaps.g16,
|
|
92
92
|
}, children: [(0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Amount", titleStyle: {
|
|
93
93
|
fontSize: "0.875rem",
|
|
94
94
|
fontWeight: 500,
|
|
95
|
-
color: "
|
|
96
|
-
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.
|
|
95
|
+
color: "text.secondary",
|
|
96
|
+
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.value), 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, { title: "Recipient address", column: true, titleStyle: {
|
|
97
97
|
fontSize: "0.875rem",
|
|
98
98
|
fontWeight: 500,
|
|
99
|
-
color: "
|
|
100
|
-
}, 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.
|
|
99
|
+
color: "text.secondary",
|
|
100
|
+
}, 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: {
|
|
101
101
|
width: 16,
|
|
102
102
|
height: 16,
|
|
103
103
|
ml: "auto",
|
|
104
104
|
}, children: SvgPath_1.IC_COPY })] }) }), isAligned: true }), (0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Network", titleStyle: {
|
|
105
105
|
fontSize: "0.875rem",
|
|
106
106
|
fontWeight: 500,
|
|
107
|
-
color: "
|
|
108
|
-
}, value: (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex gap-2 items-center", children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: payload.network.link, width: 20 }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.
|
|
107
|
+
color: "text.secondary",
|
|
108
|
+
}, value: (0, jsx_runtime_1.jsxs)(material_1.Box, { className: "flex gap-2 items-center", children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: payload.network.link, width: 20 }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.value), children: payload.network.name })] }), isAligned: true }), memo && ((0, jsx_runtime_1.jsx)(InlineTitleValue_1.default, { title: "Memo", titleStyle: {
|
|
109
109
|
fontSize: "0.875rem",
|
|
110
110
|
fontWeight: 500,
|
|
111
|
-
color: "
|
|
112
|
-
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.
|
|
111
|
+
color: "text.secondary",
|
|
112
|
+
}, value: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.value), children: memo }), 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)(ConfirmSendExternal_1.default, __assign({ sx: {
|
|
113
113
|
width: "100%",
|
|
114
114
|
marginTop: "auto",
|
|
115
115
|
}, payload: payload }, confirmPropsRest, { onSuccess: function (res) {
|
|
@@ -31,7 +31,7 @@ var PageHeader_1 = __importDefault(require("../../ui/PageHeader"));
|
|
|
31
31
|
var DefaultPageLayout_1 = __importDefault(require("../../layouts/DefaultPageLayout"));
|
|
32
32
|
var Summary_1 = __importDefault(require("./components/Summary"));
|
|
33
33
|
var useCustomRouter_1 = __importDefault(require("../../../hooks/useCustomRouter"));
|
|
34
|
-
var
|
|
34
|
+
var mui_1 = require("../../../theme/mui");
|
|
35
35
|
var SendExternalStep;
|
|
36
36
|
(function (SendExternalStep) {
|
|
37
37
|
SendExternalStep[SendExternalStep["SELECT_TOKEN"] = 0] = "SELECT_TOKEN";
|
|
@@ -52,7 +52,7 @@ var WithdrawAmountError;
|
|
|
52
52
|
exports.SendExternalView = (0, react_1.forwardRef)(function (props, ref) {
|
|
53
53
|
var isInitPasscode = (0, useWalletData_1.default)().isInitPasscode;
|
|
54
54
|
var _a = (0, useWithdrawData_1.default)(), updateWithdrawToken = _a.updateWithdrawToken, withdrawTokens = _a.withdrawTokens;
|
|
55
|
-
var theme = (0,
|
|
55
|
+
var theme = (0, mui_1.useTheme)();
|
|
56
56
|
var router = (0, useCustomRouter_1.default)();
|
|
57
57
|
var drawerRef = (0, react_1.useRef)(null);
|
|
58
58
|
var stepsRef = (0, react_1.useRef)(null);
|
|
@@ -127,7 +127,7 @@ exports.SendExternalView = (0, react_1.forwardRef)(function (props, ref) {
|
|
|
127
127
|
height: "100%",
|
|
128
128
|
}, swiperStyle: {
|
|
129
129
|
height: "100%",
|
|
130
|
-
}, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: { height: "100%", overflow: "hidden" }, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { children: (0, jsx_runtime_1.jsx)(SelectToken_1.default, { tokens: withdrawTokens, selectedToken: selectedToken, onChangeToken: handleSelectToken }) }) }) }, SendExternalStep.SELECT_TOKEN), "price", (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: { minHeight: "100%" }, children: (0, jsx_runtime_1.jsx)(react_1.Suspense, { children: !!selectedToken && ((0, jsx_runtime_1.jsx)(Form_1.default, { sx: __assign({}, theme.
|
|
130
|
+
}, children: [(0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: { height: "100%", overflow: "hidden" }, children: (0, jsx_runtime_1.jsx)(ChildPageLayout_1.default, { children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { children: (0, jsx_runtime_1.jsx)(SelectToken_1.default, { tokens: withdrawTokens, selectedToken: selectedToken, onChangeToken: handleSelectToken }) }) }) }, SendExternalStep.SELECT_TOKEN), "price", (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: { minHeight: "100%" }, children: (0, jsx_runtime_1.jsx)(react_1.Suspense, { children: !!selectedToken && ((0, jsx_runtime_1.jsx)(Form_1.default, { sx: __assign({}, theme.styleMixins.pagePadding), selectedToken: selectedToken, onContinue: gotoConfirmStep }, clearFormKey)) }) }, SendExternalStep.ADDRESS_FORM), (0, jsx_runtime_1.jsx)(react_2.SwiperSlide, { style: { minHeight: "100%" }, children: (0, jsx_runtime_1.jsx)(DefaultPageLayout_1.default, { sx: {
|
|
131
131
|
height: "100%",
|
|
132
132
|
}, children: payload && ((0, jsx_runtime_1.jsx)(Summary_1.default, { estimateFee: estimateFee, payload: __assign(__assign({}, payload), { await_completion: true }), selectedToken: selectedToken, confirmProps: {
|
|
133
133
|
onSuccess: handleSendSuccess,
|
package/dist/components/TekWallet/components/views/SendInternalView/components/AmountForm.js
CHANGED
|
@@ -90,7 +90,6 @@ var Input_1 = __importDefault(require("../../../ui/Input"));
|
|
|
90
90
|
var Formatter_1 = __importDefault(require("../../../ui/Formatter"));
|
|
91
91
|
var SvgPath_1 = require("../../../ui/SvgPath");
|
|
92
92
|
var Text_1 = __importDefault(require("../../../ui/Text"));
|
|
93
|
-
var providers_1 = require("../../../../providers");
|
|
94
93
|
var react_1 = require("react");
|
|
95
94
|
var validate_wallet_address_service_1 = __importDefault(require("../../../../services/axios/validate-wallet-address-service"));
|
|
96
95
|
var lodash_1 = require("lodash");
|
|
@@ -104,6 +103,8 @@ var type_1 = require("../../../../services/axios/get-activities-service/type");
|
|
|
104
103
|
var Fees_1 = __importStar(require("../../../ui/Fees"));
|
|
105
104
|
var xhub_keyboard_1 = require("xhub-keyboard");
|
|
106
105
|
var useUniqueId_1 = require("../../../../hooks/useUniqueId");
|
|
106
|
+
var mui_1 = require("../../../../theme/mui");
|
|
107
|
+
var providers_1 = require("../../../../providers");
|
|
107
108
|
var validateAddressDebounce = (0, lodash_1.debounce)(function (callback) {
|
|
108
109
|
callback();
|
|
109
110
|
}, 500, { leading: true, trailing: true });
|
|
@@ -112,7 +113,7 @@ var getEstimateFeeDebounce = (0, lodash_1.debounce)(function (callback) {
|
|
|
112
113
|
}, 500, { leading: true, trailing: true });
|
|
113
114
|
function Form(props) {
|
|
114
115
|
var _this = this;
|
|
115
|
-
var theme = (0,
|
|
116
|
+
var theme = (0, mui_1.useTheme)();
|
|
116
117
|
var selectedToken = props.selectedToken, onContinue = props.onContinue, sx = props.sx;
|
|
117
118
|
var _a = (0, react_1.useState)(""), recipientAddress = _a[0], setRecipientAddress = _a[1];
|
|
118
119
|
var _b = (0, react_1.useState)(), recipientAddressError = _b[0], setRecipientAddressError = _b[1];
|
|
@@ -312,59 +313,60 @@ function Form(props) {
|
|
|
312
313
|
var handleKeyboardClose = function () {
|
|
313
314
|
setIsKeyboardOpen(false);
|
|
314
315
|
};
|
|
316
|
+
var keyboardThemeMode = (0, providers_1.useKeyboardThemeMode)();
|
|
315
317
|
return ((0, jsx_runtime_1.jsx)(xhub_keyboard_1.Keyboard, { styles: {
|
|
316
318
|
container: {
|
|
317
319
|
height: "100%",
|
|
318
320
|
},
|
|
319
|
-
}, id: keyboardId, onChange: handleKeyboardChangeAmount, keyboardType: xhub_keyboard_1.KeyboardType.Double, value: amount === null || amount === void 0 ? void 0 : amount.toString(), keyboardId: "form-amount-keyboard-id", onOpen: handleKeyboardOpen, onClose: handleKeyboardClose, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign(__assign({}, theme.
|
|
321
|
+
}, id: keyboardId, onChange: handleKeyboardChangeAmount, keyboardType: xhub_keyboard_1.KeyboardType.Double, value: amount === null || amount === void 0 ? void 0 : amount.toString(), keyboardId: "form-amount-keyboard-id", onOpen: handleKeyboardOpen, onClose: handleKeyboardClose, theme: keyboardThemeMode, 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
|
|
320
322
|
? {
|
|
321
|
-
paddingBottom: theme.
|
|
323
|
+
paddingBottom: theme.styleMixins.customPadding.p8,
|
|
322
324
|
}
|
|
323
|
-
: {})), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
325
|
+
: {})), 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: {
|
|
324
326
|
fontSize: theme.typography.fontSize14,
|
|
325
|
-
color: theme.palette.text.
|
|
327
|
+
color: theme.palette.text.primary,
|
|
326
328
|
fontWeight: theme.typography.fontWeight700,
|
|
327
329
|
}, children: "Wallet address" }), (0, jsx_runtime_1.jsx)(Input_1.default, { sx: {
|
|
328
|
-
paddingX: theme.
|
|
330
|
+
paddingX: theme.styleMixins.customPadding.p16,
|
|
329
331
|
}, inputRest: {
|
|
330
332
|
placeholder: "Enter recipient address",
|
|
331
333
|
value: recipientAddress,
|
|
332
334
|
onChange: handleChangeRecipientAddress,
|
|
333
|
-
}, rightPart: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
335
|
+
}, 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)(material_1.SvgIcon, { sx: { width: 12, height: 12 }, children: SvgPath_1.IC_CLOSE }) })) : ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8 }), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { onClick: openScannerAddressQrCode, children: (0, jsx_runtime_1.jsx)(Icon_1.default, { iconKey: "IC_SCAN", sx: { width: 18, height: 18 } }) }), (0, jsx_runtime_1.jsx)(material_1.Divider, { orientation: "vertical", variant: "fullWidth", flexItem: true }), (0, jsx_runtime_1.jsx)(material_1.Box, { onClick: handlePaste, children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 18, height: 18 }, children: SvgPath_1.IC_DOCUMENTS }) })] })) }) }), !!recipientAddressError && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.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: {
|
|
334
336
|
fontSize: theme.typography.fontSize14,
|
|
335
|
-
color: theme.palette.text.
|
|
337
|
+
color: theme.palette.text.primary,
|
|
336
338
|
fontWeight: theme.typography.fontWeight700,
|
|
337
|
-
}, children: "Withdrawal amount" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
339
|
+
}, children: "Withdrawal 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: {
|
|
338
340
|
display: "inline-flex",
|
|
339
341
|
alignItems: "center",
|
|
340
|
-
gap: theme.
|
|
342
|
+
gap: theme.styleMixins.gaps.g4,
|
|
341
343
|
pointerEvents: "none",
|
|
342
344
|
}, children: [(0, jsx_runtime_1.jsx)(Formatter_1.default, { value: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.min_value }), " -", " ", (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.max_value, unit: " ".concat(selectedToken === null || selectedToken === void 0 ? void 0 : selectedToken.name) })] })), styles: {
|
|
343
345
|
container: {
|
|
344
|
-
paddingRight: theme.
|
|
345
|
-
paddingLeft: theme.
|
|
346
|
-
paddingTop: theme.
|
|
347
|
-
paddingBottom: theme.
|
|
348
|
-
border: "1px ".concat(theme.palette.
|
|
349
|
-
borderRadius: theme.
|
|
346
|
+
paddingRight: theme.styleMixins.customPadding.p4,
|
|
347
|
+
paddingLeft: theme.styleMixins.customPadding.p16,
|
|
348
|
+
paddingTop: theme.styleMixins.customPadding.p4,
|
|
349
|
+
paddingBottom: theme.styleMixins.customPadding.p4,
|
|
350
|
+
border: "1px ".concat(theme.palette.divider, " solid"),
|
|
351
|
+
borderRadius: theme.styleMixins.customRadius.r8,
|
|
350
352
|
},
|
|
351
|
-
}, rightElement: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.
|
|
353
|
+
}, rightElement: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8 }), children: (0, jsx_runtime_1.jsx)(material_1.Box, { onClick: handleClickMaxAmount, sx: {
|
|
352
354
|
background: theme.palette.background.tertiary,
|
|
353
|
-
color: theme.palette.text.
|
|
355
|
+
color: theme.palette.text.primary,
|
|
354
356
|
fontSize: theme.typography.fontSize11,
|
|
355
357
|
fontWeight: theme.typography.fontWeight700,
|
|
356
|
-
borderRadius: theme.
|
|
357
|
-
paddingX: theme.
|
|
358
|
-
paddingY: theme.
|
|
358
|
+
borderRadius: theme.styleMixins.customRadius.r4,
|
|
359
|
+
paddingX: theme.styleMixins.customPadding.p16,
|
|
360
|
+
paddingY: theme.styleMixins.customPadding.p8,
|
|
359
361
|
border: "0px solid",
|
|
360
362
|
cursor: "pointer",
|
|
361
363
|
}, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
|
|
362
364
|
fontSize: theme.typography.fontSize12,
|
|
363
365
|
color: theme.palette.text.primary,
|
|
364
366
|
fontWeight: theme.typography.fontWeight500,
|
|
365
|
-
}, children: "Max" }) }) }) }) }), !!amountErrorMessage && ((0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, theme.
|
|
367
|
+
}, 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: {
|
|
366
368
|
fontSize: theme.typography.fontSize14,
|
|
367
|
-
color: theme.palette.text.
|
|
369
|
+
color: theme.palette.text.primary,
|
|
368
370
|
fontWeight: theme.typography.fontWeight700,
|
|
369
371
|
}, children: "Message" }), (0, jsx_runtime_1.jsx)(Input_1.default, { inputRest: {
|
|
370
372
|
placeholder: "Enter comment if needed",
|