tek-wallet 0.0.750 → 0.0.753

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/README.md +18 -10
  2. package/dist/components/TekWallet/components/index.d.ts +8 -0
  3. package/dist/components/TekWallet/components/index.js +8 -0
  4. package/dist/components/TekWallet/components/layouts/ChildPageLayout/index.js +14 -3
  5. package/dist/components/TekWallet/components/ui/BackHeader/index.js +5 -1
  6. package/dist/components/TekWallet/components/ui/BottomActionLayout/index.d.ts +3 -3
  7. package/dist/components/TekWallet/components/ui/BottomActionLayout/index.js +24 -6
  8. package/dist/components/TekWallet/components/ui/Button/index.js +2 -2
  9. package/dist/components/TekWallet/components/ui/ConfirmByPasscode/index.js +2 -6
  10. package/dist/components/TekWallet/components/ui/ConfirmSendExternal/index.d.ts +20 -0
  11. package/dist/components/TekWallet/components/ui/ConfirmSendExternal/index.js +173 -0
  12. package/dist/components/TekWallet/components/ui/ConfirmSendInternal/index.d.ts +17 -0
  13. package/dist/components/TekWallet/components/ui/ConfirmSendInternal/index.js +100 -0
  14. package/dist/components/TekWallet/components/ui/ConfirmSwapToken/Result.d.ts +8 -0
  15. package/dist/components/TekWallet/components/ui/ConfirmSwapToken/Result.js +112 -0
  16. package/dist/components/TekWallet/components/ui/ConfirmSwapToken/index.d.ts +18 -0
  17. package/dist/components/TekWallet/components/ui/ConfirmSwapToken/index.js +169 -0
  18. package/dist/components/TekWallet/components/ui/ConfirmTransaction/index.d.ts +6 -2
  19. package/dist/components/TekWallet/components/ui/ConfirmTransaction/index.js +11 -6
  20. package/dist/components/TekWallet/components/ui/ConfirmTransfer/index.d.ts +28 -0
  21. package/dist/components/TekWallet/components/ui/ConfirmTransfer/index.js +253 -0
  22. package/dist/components/TekWallet/components/ui/ConfirmTransfer/type.d.ts +16 -0
  23. package/dist/components/TekWallet/components/ui/ConfirmTransfer/type.js +2 -0
  24. package/dist/components/TekWallet/components/ui/CopyableText/index.js +1 -1
  25. package/dist/components/TekWallet/components/ui/DetailSwap/index.js +1 -1
  26. package/dist/components/TekWallet/components/ui/Fees/index.d.ts +1 -1
  27. package/dist/components/TekWallet/components/ui/Fees/index.js +51 -41
  28. package/dist/components/TekWallet/components/ui/FeesAutoDebounce/index.d.ts +10 -0
  29. package/dist/components/TekWallet/components/ui/FeesAutoDebounce/index.js +223 -0
  30. package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareAction.js +2 -2
  31. package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareImage.js +13 -13
  32. package/dist/components/TekWallet/components/ui/FiatDeposit/index.js +6 -4
  33. package/dist/components/TekWallet/components/ui/Formatter/index.d.ts +1 -0
  34. package/dist/components/TekWallet/components/ui/Formatter/index.js +4 -2
  35. package/dist/components/TekWallet/components/ui/FunctionItem/index.js +5 -4
  36. package/dist/components/TekWallet/components/ui/Icon/index.d.ts +4 -2
  37. package/dist/components/TekWallet/components/ui/Icon/index.js +44 -3
  38. package/dist/components/TekWallet/components/ui/Input/index.js +3 -3
  39. package/dist/components/TekWallet/components/ui/ListItemCustom/index.d.ts +2 -1
  40. package/dist/components/TekWallet/components/ui/ListItemCustom/index.js +3 -3
  41. package/dist/components/TekWallet/components/ui/QRCode/index.js +1 -1
  42. package/dist/components/TekWallet/components/ui/SendExternalToken/index.js +1 -1
  43. package/dist/components/TekWallet/components/ui/SendExternalTokenWithdrawn/index.d.ts +2 -5
  44. package/dist/components/TekWallet/components/ui/SvgPath/index.d.ts +12 -0
  45. package/dist/components/TekWallet/components/ui/SvgPath/index.js +27 -15
  46. package/dist/components/TekWallet/components/ui/SwapFunction/index.js +4 -4
  47. package/dist/components/TekWallet/components/ui/SwapToken/index.d.ts +2 -3
  48. package/dist/components/TekWallet/components/ui/TokensBoard/index.js +1 -3
  49. package/dist/components/TekWallet/components/ui/ValidateWalletAddress/index.d.ts +5 -0
  50. package/dist/components/TekWallet/components/ui/ValidateWalletAddress/index.js +67 -0
  51. package/dist/components/TekWallet/components/ui/WaitingData/index.d.ts +1 -0
  52. package/dist/components/TekWallet/components/ui/WaitingData/index.js +10 -6
  53. package/dist/components/TekWallet/components/ui/WithdrawFunction/index.d.ts +1 -1
  54. package/dist/components/TekWallet/components/ui/WithdrawFunction/index.js +70 -32
  55. package/dist/components/TekWallet/components/views/AssetView/Menu.d.ts +7 -0
  56. package/dist/components/TekWallet/components/views/AssetView/Menu.js +25 -0
  57. package/dist/components/TekWallet/components/views/AssetView/index.js +25 -26
  58. package/dist/components/TekWallet/components/views/NotFoundView/index.d.ts +2 -0
  59. package/dist/components/TekWallet/components/views/NotFoundView/index.js +7 -0
  60. package/dist/components/TekWallet/components/views/SendExternalView/components/Form.d.ts +11 -0
  61. package/dist/components/TekWallet/components/views/SendExternalView/components/Form.js +450 -0
  62. package/dist/components/TekWallet/components/views/SendExternalView/components/Result.d.ts +14 -0
  63. package/dist/components/TekWallet/components/views/SendExternalView/components/Result.js +140 -0
  64. package/dist/components/TekWallet/components/views/SendExternalView/components/SelectNetwork.d.ts +10 -0
  65. package/dist/components/TekWallet/components/views/SendExternalView/components/SelectNetwork.js +34 -0
  66. package/dist/components/TekWallet/components/views/SendExternalView/components/SelectToken.d.ts +8 -0
  67. package/dist/components/TekWallet/components/views/SendExternalView/components/SelectToken.js +173 -0
  68. package/dist/components/TekWallet/components/views/SendExternalView/components/Summary.d.ts +12 -0
  69. package/dist/components/TekWallet/components/views/SendExternalView/components/Summary.js +131 -0
  70. package/dist/components/TekWallet/components/views/SendExternalView/index.d.ts +23 -0
  71. package/dist/components/TekWallet/components/views/SendExternalView/index.js +143 -0
  72. package/dist/components/TekWallet/components/views/SendInternalView/components/AmountForm.d.ts +11 -0
  73. package/dist/components/TekWallet/components/views/SendInternalView/components/AmountForm.js +380 -0
  74. package/dist/components/TekWallet/components/views/SendInternalView/components/Form.d.ts +11 -0
  75. package/dist/components/TekWallet/components/views/SendInternalView/components/Form.js +381 -0
  76. package/dist/components/TekWallet/components/views/SendInternalView/components/Result.d.ts +13 -0
  77. package/dist/components/TekWallet/components/views/SendInternalView/components/Result.js +128 -0
  78. package/dist/components/TekWallet/components/views/SendInternalView/components/SelectToken.d.ts +8 -0
  79. package/dist/components/TekWallet/components/views/SendInternalView/components/SelectToken.js +173 -0
  80. package/dist/components/TekWallet/components/views/SendInternalView/components/Summary.d.ts +11 -0
  81. package/dist/components/TekWallet/components/views/SendInternalView/components/Summary.js +126 -0
  82. package/dist/components/TekWallet/components/views/SendInternalView/index.d.ts +24 -0
  83. package/dist/components/TekWallet/components/views/SendInternalView/index.js +155 -0
  84. package/dist/components/TekWallet/components/views/SwapView/components/CardTo/index.d.ts +11 -0
  85. package/dist/components/TekWallet/components/views/SwapView/components/CardTo/index.js +111 -0
  86. package/dist/components/TekWallet/components/views/SwapView/components/FromCard/index.d.ts +14 -0
  87. package/dist/components/TekWallet/components/views/SwapView/components/FromCard/index.js +180 -0
  88. package/dist/components/TekWallet/components/views/SwapView/components/SelectToken.d.ts +9 -0
  89. package/dist/components/TekWallet/components/views/SwapView/components/SelectToken.js +173 -0
  90. package/dist/components/TekWallet/components/views/SwapView/components/Summary.d.ts +14 -0
  91. package/dist/components/TekWallet/components/views/SwapView/components/Summary.js +239 -0
  92. package/dist/components/TekWallet/components/views/SwapView/functions/convertTokensRate.d.ts +3 -0
  93. package/dist/components/TekWallet/components/views/SwapView/functions/convertTokensRate.js +14 -0
  94. package/dist/components/TekWallet/components/views/SwapView/index.d.ts +11 -0
  95. package/dist/components/TekWallet/components/views/SwapView/index.js +218 -0
  96. package/dist/components/TekWallet/components/views/TekWalletView/expose.d.ts +2 -0
  97. package/dist/components/TekWallet/components/views/TekWalletView/expose.js +18 -0
  98. package/dist/components/TekWallet/components/views/TekWalletView/index.d.ts +3 -0
  99. package/dist/components/TekWallet/components/views/TekWalletView/index.js +16 -0
  100. package/dist/components/TekWallet/components/views/TekWalletView/routes.d.ts +9 -0
  101. package/dist/components/TekWallet/components/views/TekWalletView/routes.js +74 -0
  102. package/dist/components/TekWallet/hooks/useValidateAmount.d.ts +26 -0
  103. package/dist/components/TekWallet/hooks/useValidateAmount.js +103 -0
  104. package/dist/components/TekWallet/providers/EventHandlerProvider/index.js +5 -0
  105. package/dist/components/TekWallet/providers/RealtimeProvider/index.js +2 -2
  106. package/dist/components/TekWallet/providers/TekWalletProvider/index.d.ts +3 -0
  107. package/dist/components/TekWallet/providers/TekWalletProvider/index.js +8 -2
  108. package/dist/components/TekWallet/providers/WithdrawProvider/index.js +36 -0
  109. package/dist/components/TekWallet/services/axios/get-est-fee-service/type.d.ts +5 -4
  110. package/dist/components/TekWallet/services/axios/send-external-service/type.d.ts +5 -30
  111. package/dist/components/TekWallet/services/axios/swap-service/type.d.ts +4 -0
  112. package/dist/components/TekWallet/services/axios/transfer-internal-service/type.d.ts +4 -32
  113. package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/components.js +3 -3
  114. package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/palette.js +3 -3
  115. package/dist/components/TekWallet/theme/mui/theme.js +9 -9
  116. package/dist/components/TekWallet/utils/stop.d.ts +3 -0
  117. package/dist/components/TekWallet/utils/stop.js +6 -0
  118. package/package.json +2 -2
  119. package/dist/components/TekWallet/components/ui/CardFrom/index.d.ts +0 -10
  120. package/dist/components/TekWallet/components/ui/CardFrom/index.js +0 -91
  121. package/dist/components/TekWallet/components/ui/CardTo/index.d.ts +0 -10
  122. package/dist/components/TekWallet/components/ui/CardTo/index.js +0 -39
  123. package/dist/components/TekWallet/components/ui/ConfirmLayout copy/index.d.ts +0 -7
  124. package/dist/components/TekWallet/components/ui/ConfirmLayout copy/index.js +0 -67
  125. package/dist/components/TekWallet/components/views/HelpView/index.d.ts +0 -2
  126. package/dist/components/TekWallet/components/views/HelpView/index.js +0 -7
@@ -0,0 +1,16 @@
1
+ import { FeesDataType } from "../../../services/axios/get-est-fee-service/type";
2
+ import { UserInfoDto } from "../../../types/expose-type";
3
+ export interface LockData {
4
+ amount: number;
5
+ tokenSlug: string;
6
+ }
7
+ export interface TransferInfoDto {
8
+ network?: string;
9
+ type?: string;
10
+ message?: string;
11
+ datetime?: string;
12
+ link?: string;
13
+ user?: UserInfoDto;
14
+ receiver?: UserInfoDto;
15
+ fee?: FeesDataType;
16
+ }
@@ -0,0 +1,2 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
@@ -80,6 +80,6 @@ var CopyableText = function (_a) {
80
80
  }
81
81
  return function () { return clearTimeout(timer); };
82
82
  }, [copied]);
83
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", alignItems: "center", gap: 0.5, sx: sx === null || sx === void 0 ? void 0 : sx.container, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: copied ? "success.main" : "text.primary", sx: sx === null || sx === void 0 ? void 0 : sx.text, children: copied ? "Copied!" : displayText || copyText }), (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: handleCopy, size: "small", sx: __assign({ padding: 0.5 }, sx === null || sx === void 0 ? void 0 : sx.button), children: (0, jsx_runtime_1.jsx)("span", { children: (0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: [(0, jsx_runtime_1.jsx)("mask", { id: "mask0_860_5627", maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "20", height: "20", children: (0, jsx_runtime_1.jsx)("rect", { width: "20", height: "20", fill: "#D9D9D9" }) }), (0, jsx_runtime_1.jsx)("g", { mask: "url(#mask0_860_5627)", children: (0, jsx_runtime_1.jsx)("path", { d: "M7.54804 14.5826C7.17293 14.5826 6.85587 14.4531 6.59685 14.1941C6.33783 13.9351 6.20831 13.618 6.20831 13.2429V3.75577C6.20831 3.38066 6.33783 3.06359 6.59685 2.80456C6.85587 2.54553 7.17293 2.41602 7.54804 2.41602H15.0352C15.4103 2.41602 15.7273 2.54553 15.9864 2.80456C16.2454 3.06359 16.3749 3.38066 16.3749 3.75577V13.2429C16.3749 13.618 16.2454 13.9351 15.9864 14.1941C15.7273 14.4531 15.4103 14.5826 15.0352 14.5826H7.54804ZM7.54804 13.4993H15.0352C15.0993 13.4993 15.158 13.4726 15.2115 13.4192C15.2649 13.3658 15.2916 13.307 15.2916 13.2429V3.75577C15.2916 3.69166 15.2649 3.63288 15.2115 3.57945C15.158 3.52604 15.0993 3.49933 15.0352 3.49933H7.54804C7.48393 3.49933 7.42517 3.52604 7.37175 3.57945C7.31832 3.63288 7.2916 3.69166 7.2916 3.75577V13.2429C7.2916 13.307 7.31832 13.3658 7.37175 13.4192C7.42517 13.4726 7.48393 13.4993 7.54804 13.4993ZM4.96473 17.1659C4.58963 17.1659 4.27257 17.0364 4.01354 16.7774C3.75451 16.5184 3.625 16.2013 3.625 15.8262V5.25577H4.70831V15.8262C4.70831 15.8903 4.73502 15.9491 4.78844 16.0025C4.84187 16.0559 4.90063 16.0826 4.96473 16.0826H13.5352V17.1659H4.96473Z", fill: "#1E4841" }) })] }) }) })] }));
83
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", alignItems: "center", gap: 0.5, sx: sx === null || sx === void 0 ? void 0 : sx.container, children: [(0, jsx_runtime_1.jsx)(material_1.Typography, { variant: "body2", color: copied ? "success.main" : "text.primary", sx: sx === null || sx === void 0 ? void 0 : sx.text, children: copied ? "Copied!" : displayText || copyText }), (0, jsx_runtime_1.jsx)(material_1.IconButton, { onClick: handleCopy, size: "small", sx: __assign({ padding: 0.5 }, sx === null || sx === void 0 ? void 0 : sx.button), children: (0, jsx_runtime_1.jsx)("span", { children: (0, jsx_runtime_1.jsxs)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "20", height: "20", viewBox: "0 0 20 20", fill: "none", children: [(0, jsx_runtime_1.jsx)("mask", { id: "mask0_860_5627", maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "20", height: "20", children: (0, jsx_runtime_1.jsx)("rect", { width: "20", height: "20", fill: "#D9D9D9" }) }), (0, jsx_runtime_1.jsx)("g", { mask: "url(#mask0_860_5627)", children: (0, jsx_runtime_1.jsx)("path", { d: "M7.54804 14.5826C7.17293 14.5826 6.85587 14.4531 6.59685 14.1941C6.33783 13.9351 6.20831 13.618 6.20831 13.2429V3.75577C6.20831 3.38066 6.33783 3.06359 6.59685 2.80456C6.85587 2.54553 7.17293 2.41602 7.54804 2.41602H15.0352C15.4103 2.41602 15.7273 2.54553 15.9864 2.80456C16.2454 3.06359 16.3749 3.38066 16.3749 3.75577V13.2429C16.3749 13.618 16.2454 13.9351 15.9864 14.1941C15.7273 14.4531 15.4103 14.5826 15.0352 14.5826H7.54804ZM7.54804 13.4993H15.0352C15.0993 13.4993 15.158 13.4726 15.2115 13.4192C15.2649 13.3658 15.2916 13.307 15.2916 13.2429V3.75577C15.2916 3.69166 15.2649 3.63288 15.2115 3.57945C15.158 3.52604 15.0993 3.49933 15.0352 3.49933H7.54804C7.48393 3.49933 7.42517 3.52604 7.37175 3.57945C7.31832 3.63288 7.2916 3.69166 7.2916 3.75577V13.2429C7.2916 13.307 7.31832 13.3658 7.37175 13.4192C7.42517 13.4726 7.48393 13.4993 7.54804 13.4993ZM4.96473 17.1659C4.58963 17.1659 4.27257 17.0364 4.01354 16.7774C3.75451 16.5184 3.625 16.2013 3.625 15.8262V5.25577H4.70831V15.8262C4.70831 15.8903 4.73502 15.9491 4.78844 16.0025C4.84187 16.0559 4.90063 16.0826 4.96473 16.0826H13.5352V17.1659H4.96473Z", fill: "#1C461D" }) })] }) }) })] }));
84
84
  };
85
85
  exports.default = CopyableText;
@@ -32,7 +32,7 @@ var DetailSwap = function (props) {
32
32
  color: theme.palette.text.accent,
33
33
  fontSize: theme.typography.fontSize12,
34
34
  fontWeight: theme.typography.fontWeight400,
35
- }, children: "Best Price" }), value: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: (0, jsx_runtime_1.jsxs)(Text_1.default, { className: "truncate", sx: {
35
+ }, children: "Best Price" }), value: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: {
36
36
  color: theme.palette.text.blackContrast,
37
37
  fontSize: theme.typography.fontSize12,
38
38
  fontWeight: theme.typography.fontWeight500,
@@ -14,5 +14,5 @@ export interface FeesProps extends Omit<AccordionProps, "children"> {
14
14
  feesStyle?: FeesStyle;
15
15
  estimateReceive?: string | number;
16
16
  }
17
- declare function Fees(props: FeesProps): import("react/jsx-runtime").JSX.Element | null;
17
+ declare function Fees(props: FeesProps): import("react/jsx-runtime").JSX.Element;
18
18
  export default Fees;
@@ -60,7 +60,7 @@ function Fees(props) {
60
60
  var fee_detail = (_a = feesData === null || feesData === void 0 ? void 0 : feesData.fee_detail) !== null && _a !== void 0 ? _a : [];
61
61
  return ((_b = fee_detail === null || fee_detail === void 0 ? void 0 : fee_detail.map(function (fee, index, array) {
62
62
  var _a, _b;
63
- var totalfee_in_currency = array === null || array === void 0 ? void 0 : array.reduce(function (acc, fee_detail) {
63
+ var totalFeeInCurrency = array === null || array === void 0 ? void 0 : array.reduce(function (acc, fee_detail) {
64
64
  var _a, _b;
65
65
  if (((_a = fee_detail.currency) === null || _a === void 0 ? void 0 : _a.slug) === ((_b = fee === null || fee === void 0 ? void 0 : fee.currency) === null || _b === void 0 ? void 0 : _b.slug)) {
66
66
  return acc + fee_detail.fee_in_currency;
@@ -68,7 +68,7 @@ function Fees(props) {
68
68
  return acc;
69
69
  }, 0);
70
70
  var balanceUseToPaidFee = getBalanceUseToPaidFee((_b = (_a = fee === null || fee === void 0 ? void 0 : fee.currency) === null || _a === void 0 ? void 0 : _a.slug) !== null && _b !== void 0 ? _b : "");
71
- var payable = balanceUseToPaidFee >= totalfee_in_currency;
71
+ var payable = balanceUseToPaidFee >= totalFeeInCurrency;
72
72
  return __assign(__assign({}, fee), { isEnoughBalanceToPay: payable });
73
73
  })) !== null && _b !== void 0 ? _b : []);
74
74
  }, [feesData === null || feesData === void 0 ? void 0 : feesData.fee_detail, getBalanceUseToPaidFee]);
@@ -78,48 +78,58 @@ function Fees(props) {
78
78
  }, [feeCheckedBalance]);
79
79
  (0, react_1.useEffect)(function () {
80
80
  if (!isNotEnoughBalanceToPayFee) {
81
- setIsEnoughBalanceToPayFee === null || setIsEnoughBalanceToPayFee === void 0 ? void 0 : setIsEnoughBalanceToPayFee(!isNotEnoughBalanceToPayFee);
81
+ setIsEnoughBalanceToPayFee === null || setIsEnoughBalanceToPayFee === void 0 ? void 0 : setIsEnoughBalanceToPayFee(true);
82
+ return;
82
83
  }
83
- }, [isNotEnoughBalanceToPayFee, setIsEnoughBalanceToPayFee]);
84
- var totalfee_in_currency = (0, react_1.useMemo)(function () {
84
+ setIsEnoughBalanceToPayFee === null || setIsEnoughBalanceToPayFee === void 0 ? void 0 : setIsEnoughBalanceToPayFee(false);
85
+ });
86
+ var isChargeFee = (0, react_1.useMemo)(function () {
87
+ return (feesData === null || feesData === void 0 ? void 0 : feesData.fee_in_usd) && +(feesData === null || feesData === void 0 ? void 0 : feesData.fee_in_usd) === 0;
88
+ }, [feesData]);
89
+ (0, react_1.useEffect)(function () {
90
+ if (!isChargeFee) {
91
+ setIsEnoughBalanceToPayFee === null || setIsEnoughBalanceToPayFee === void 0 ? void 0 : setIsEnoughBalanceToPayFee(true);
92
+ }
93
+ });
94
+ var totalFeeInCurrency = (0, react_1.useMemo)(function () {
85
95
  return feesData === null || feesData === void 0 ? void 0 : feesData.fee_in_currency;
86
96
  }, [feesData]);
87
- return feeCheckedBalance.length > 0 ? ((0, jsx_runtime_1.jsxs)(material_1.Accordion, __assign({ defaultExpanded: true }, rest, { disableGutters: true, sx: __assign(__assign({}, getStyled(feesStyle !== null && feesStyle !== void 0 ? feesStyle : FeesStyle.DEFAULT, theme)), sx), children: [(0, jsx_runtime_1.jsx)(material_1.AccordionSummary, { expandIcon: (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("arrow_down"), width: 8, height: 8 }), children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { width: "100%" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
88
- fontSize: theme.typography.fontSize11,
89
- fontWeight: theme.typography.fontWeight500,
90
- color: theme.palette.text.black,
91
- }, children: "Total fees" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
92
- borderTop: "1px dashed",
93
- borderColor: theme.palette.border.accent,
94
- flex: 1,
95
- height: "1px",
96
- width: "100%",
97
- ml: theme.mixins.gaps.g8,
98
- mr: theme.mixins.gaps.g8,
99
- } }), (0, jsx_runtime_1.jsx)(Formatter_1.default, { sx: {
100
- fontSize: theme.typography.fontSize13,
101
- fontWeight: theme.typography.fontWeight500,
102
- color: theme.palette.text.black,
103
- }, value: totalfee_in_currency, unit: " ".concat(tokenSlug.toUpperCase()), disableTooltip: true }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { width: "0.5rem" }) })] }) }), (0, jsx_runtime_1.jsx)(material_1.AccordionDetails, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8, pt: theme.mixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { alignItems: "stretch" }), children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { flex: 1, gap: theme.mixins.gaps.g8 }), children: feeCheckedBalance === null || feeCheckedBalance === void 0 ? void 0 : feeCheckedBalance.map(function (item, index) {
104
- var _a, _b, _c, _d;
105
- return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [index !== 0 && ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
106
- borderRight: "1px dashed ".concat(theme.palette.border.accent),
107
- width: "1px",
108
- height: "1rem",
109
- pr: theme.mixins.gaps.g6,
110
- } })), (0, jsx_runtime_1.jsx)(FeeDetails, { feeName: (_a = item.fee_type) === null || _a === void 0 ? void 0 : _a.name, fee_in_currency: item.fee_in_currency, fee_in_usd: item.fee_in_usd, currencyName: (_b = item.currency) === null || _b === void 0 ? void 0 : _b.name }, (_c = item.fee_type) === null || _c === void 0 ? void 0 : _c.name)] }, (_d = item.fee_type) === null || _d === void 0 ? void 0 : _d.name));
111
- }) }) }), isNotEnoughBalanceToPayFee && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: "ⓘ Insufficient transaction fee!" })), (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
112
- borderColor: theme.palette.border.black16,
113
- my: theme.mixins.gaps.g4,
114
- } }), estimateReceive !== undefined && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { justifyContent: "space-between" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
115
- fontSize: theme.typography.fontSize11,
116
- fontWeight: theme.typography.fontWeight500,
117
- lineHeight: theme.typography.leading160,
118
- }, children: "Receive amount estimated" }), (0, jsx_runtime_1.jsx)(Formatter_1.default, { sx: {
119
- fontSize: theme.typography.fontSize16,
120
- fontWeight: theme.typography.fontWeight700,
121
- color: theme.palette.text.black,
122
- }, unit: " ".concat(tokenSlug.toUpperCase()), value: estimateReceive })] }))] }) })] }))) : null;
97
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: !!isChargeFee && ((0, jsx_runtime_1.jsxs)(material_1.Accordion, __assign({ defaultExpanded: true }, rest, { disableGutters: true, sx: __assign(__assign({}, getStyled(feesStyle !== null && feesStyle !== void 0 ? feesStyle : FeesStyle.DEFAULT, theme)), sx), children: [(0, jsx_runtime_1.jsx)(material_1.AccordionSummary, { expandIcon: (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("arrow_down"), width: 8, height: 8 }), children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { width: "100%" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
98
+ fontSize: theme.typography.fontSize11,
99
+ fontWeight: theme.typography.fontWeight500,
100
+ color: theme.palette.text.black,
101
+ }, children: "Total fees" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
102
+ borderTop: "1px dashed",
103
+ borderColor: theme.palette.border.accent,
104
+ flex: 1,
105
+ height: "1px",
106
+ width: "100%",
107
+ ml: theme.mixins.gaps.g8,
108
+ mr: theme.mixins.gaps.g8,
109
+ } }), (0, jsx_runtime_1.jsx)(Formatter_1.default, { sx: {
110
+ fontSize: theme.typography.fontSize13,
111
+ fontWeight: theme.typography.fontWeight500,
112
+ color: theme.palette.text.black,
113
+ }, value: totalFeeInCurrency, unit: " ".concat(tokenSlug.toUpperCase()), disableTooltip: true }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { width: "0.5rem" }) })] }) }), (0, jsx_runtime_1.jsx)(material_1.AccordionDetails, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8, pt: theme.mixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { alignItems: "stretch" }), children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { flex: 1, gap: theme.mixins.gaps.g8 }), children: feeCheckedBalance === null || feeCheckedBalance === void 0 ? void 0 : feeCheckedBalance.map(function (item, index) {
114
+ var _a, _b, _c, _d;
115
+ return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [index !== 0 && ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
116
+ borderRight: "1px dashed ".concat(theme.palette.border.accent),
117
+ width: "1px",
118
+ height: "1rem",
119
+ pr: theme.mixins.gaps.g6,
120
+ } })), (0, jsx_runtime_1.jsx)(FeeDetails, { feeName: (_a = item.fee_type) === null || _a === void 0 ? void 0 : _a.name, fee_in_currency: item.fee_in_currency, fee_in_usd: item.fee_in_usd, currencyName: (_b = item.currency) === null || _b === void 0 ? void 0 : _b.name }, (_c = item.fee_type) === null || _c === void 0 ? void 0 : _c.name)] }, (_d = item.fee_type) === null || _d === void 0 ? void 0 : _d.name));
121
+ }) }) }), isNotEnoughBalanceToPayFee && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: "ⓘ Insufficient transaction fee!" })), (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
122
+ borderColor: theme.palette.border.black16,
123
+ my: theme.mixins.gaps.g4,
124
+ } }), estimateReceive !== undefined && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { justifyContent: "space-between" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
125
+ fontSize: theme.typography.fontSize11,
126
+ fontWeight: theme.typography.fontWeight500,
127
+ lineHeight: theme.typography.leading160,
128
+ }, children: "Receive amount estimated" }), (0, jsx_runtime_1.jsx)(Formatter_1.default, { sx: {
129
+ fontSize: theme.typography.fontSize16,
130
+ fontWeight: theme.typography.fontWeight700,
131
+ color: theme.palette.text.black,
132
+ }, unit: " ".concat(tokenSlug.toUpperCase()), value: estimateReceive })] }))] }) })] }))) }));
123
133
  }
124
134
  exports.default = Fees;
125
135
  var FeeDetails = function (_a) {
@@ -0,0 +1,10 @@
1
+ import { FeesProps } from "../Fees";
2
+ export declare enum FeesStyle {
3
+ DEFAULT = "default",
4
+ WITH_BACKGROUND = "withBackground"
5
+ }
6
+ export interface FeesAutoDebounceProps extends FeesProps {
7
+ setIsLoadingFee?: (isLoading: boolean) => void;
8
+ }
9
+ declare function Fees(props: FeesProps): import("react/jsx-runtime").JSX.Element;
10
+ export default Fees;
@@ -0,0 +1,223 @@
1
+ "use strict";
2
+ "use client";
3
+ var __assign = (this && this.__assign) || function () {
4
+ __assign = Object.assign || function(t) {
5
+ for (var s, i = 1, n = arguments.length; i < n; i++) {
6
+ s = arguments[i];
7
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
8
+ t[p] = s[p];
9
+ }
10
+ return t;
11
+ };
12
+ return __assign.apply(this, arguments);
13
+ };
14
+ var __rest = (this && this.__rest) || function (s, e) {
15
+ var t = {};
16
+ for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
17
+ t[p] = s[p];
18
+ if (s != null && typeof Object.getOwnPropertySymbols === "function")
19
+ for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
20
+ if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
21
+ t[p[i]] = s[p[i]];
22
+ }
23
+ return t;
24
+ };
25
+ var __importDefault = (this && this.__importDefault) || function (mod) {
26
+ return (mod && mod.__esModule) ? mod : { "default": mod };
27
+ };
28
+ Object.defineProperty(exports, "__esModule", { value: true });
29
+ exports.FeesStyle = void 0;
30
+ var jsx_runtime_1 = require("react/jsx-runtime");
31
+ var material_1 = require("@mui/material");
32
+ var ThemeProvider_1 = require("../../../providers/ThemeProvider");
33
+ var Icon_1 = __importDefault(require("../Icon"));
34
+ var Text_1 = __importDefault(require("../Text"));
35
+ var Formatter_1 = __importDefault(require("../Formatter"));
36
+ var useWalletData_1 = __importDefault(require("../../../hooks/useWalletData"));
37
+ var react_1 = require("react");
38
+ var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
39
+ var SvgPath_1 = require("../SvgPath");
40
+ var FeesStyle;
41
+ (function (FeesStyle) {
42
+ FeesStyle["DEFAULT"] = "default";
43
+ FeesStyle["WITH_BACKGROUND"] = "withBackground";
44
+ })(FeesStyle || (exports.FeesStyle = FeesStyle = {}));
45
+ function Fees(props) {
46
+ var sx = props.sx, amount = props.amount, feesData = props.feesData, isFeePaidByAmount = props.isFeePaidByAmount, tokenSlug = props.tokenSlug, setIsEnoughBalanceToPayFee = props.setIsEnoughBalanceToPayFee, feesStyle = props.feesStyle, estimateReceive = props.estimateReceive, rest = __rest(props, ["sx", "amount", "feesData", "isFeePaidByAmount", "tokenSlug", "setIsEnoughBalanceToPayFee", "feesStyle", "estimateReceive"]);
47
+ var theme = (0, ThemeProvider_1.useTheme)();
48
+ // const feesData = parsePropsData<FeesDataType>(feesDataString);
49
+ var tokens = (0, useWalletData_1.default)().tokens;
50
+ var getBalanceUseToPaidFee = (0, react_1.useCallback)(function (tokenSlugMustBePaidFee) {
51
+ var _a;
52
+ if (isFeePaidByAmount && tokenSlugMustBePaidFee === tokenSlug) {
53
+ return amount;
54
+ }
55
+ var tokenMustBePaidFee = tokens === null || tokens === void 0 ? void 0 : tokens.find(function (token) { return token.currency_slug === tokenSlugMustBePaidFee; });
56
+ return +((_a = tokenMustBePaidFee === null || tokenMustBePaidFee === void 0 ? void 0 : tokenMustBePaidFee.current_value) !== null && _a !== void 0 ? _a : 0);
57
+ }, [isFeePaidByAmount, amount, tokenSlug, tokens]);
58
+ var feeCheckedBalance = (0, react_1.useMemo)(function () {
59
+ var _a, _b;
60
+ var fee_detail = (_a = feesData === null || feesData === void 0 ? void 0 : feesData.fee_detail) !== null && _a !== void 0 ? _a : [];
61
+ return ((_b = fee_detail === null || fee_detail === void 0 ? void 0 : fee_detail.map(function (fee, index, array) {
62
+ var _a, _b;
63
+ var totalFeeInCurrency = array === null || array === void 0 ? void 0 : array.reduce(function (acc, fee_detail) {
64
+ var _a, _b;
65
+ if (((_a = fee_detail.currency) === null || _a === void 0 ? void 0 : _a.slug) === ((_b = fee === null || fee === void 0 ? void 0 : fee.currency) === null || _b === void 0 ? void 0 : _b.slug)) {
66
+ return acc + fee_detail.fee_in_currency;
67
+ }
68
+ return acc;
69
+ }, 0);
70
+ var balanceUseToPaidFee = getBalanceUseToPaidFee((_b = (_a = fee === null || fee === void 0 ? void 0 : fee.currency) === null || _a === void 0 ? void 0 : _a.slug) !== null && _b !== void 0 ? _b : "");
71
+ var payable = balanceUseToPaidFee >= totalFeeInCurrency;
72
+ return __assign(__assign({}, fee), { isEnoughBalanceToPay: payable });
73
+ })) !== null && _b !== void 0 ? _b : []);
74
+ }, [feesData === null || feesData === void 0 ? void 0 : feesData.fee_detail, getBalanceUseToPaidFee]);
75
+ var isNotEnoughBalanceToPayFee = (0, react_1.useMemo)(function () {
76
+ var isNotEnoughBalanceToPay = feeCheckedBalance === null || feeCheckedBalance === void 0 ? void 0 : feeCheckedBalance.some(function (fee) { return !fee.isEnoughBalanceToPay; });
77
+ return isNotEnoughBalanceToPay;
78
+ }, [feeCheckedBalance]);
79
+ (0, react_1.useEffect)(function () {
80
+ if (!isNotEnoughBalanceToPayFee) {
81
+ setIsEnoughBalanceToPayFee === null || setIsEnoughBalanceToPayFee === void 0 ? void 0 : setIsEnoughBalanceToPayFee(true);
82
+ return;
83
+ }
84
+ setIsEnoughBalanceToPayFee === null || setIsEnoughBalanceToPayFee === void 0 ? void 0 : setIsEnoughBalanceToPayFee(false);
85
+ });
86
+ var isChargeFee = (0, react_1.useMemo)(function () {
87
+ return (feesData === null || feesData === void 0 ? void 0 : feesData.fee_in_usd) && +(feesData === null || feesData === void 0 ? void 0 : feesData.fee_in_usd) === 0;
88
+ }, [feesData]);
89
+ (0, react_1.useEffect)(function () {
90
+ if (!isChargeFee) {
91
+ setIsEnoughBalanceToPayFee === null || setIsEnoughBalanceToPayFee === void 0 ? void 0 : setIsEnoughBalanceToPayFee(true);
92
+ }
93
+ });
94
+ var totalFeeInCurrency = (0, react_1.useMemo)(function () {
95
+ return feesData === null || feesData === void 0 ? void 0 : feesData.fee_in_currency;
96
+ }, [feesData]);
97
+ return ((0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: !!isChargeFee && ((0, jsx_runtime_1.jsxs)(material_1.Accordion, __assign({ defaultExpanded: true }, rest, { disableGutters: true, sx: __assign(__assign({}, getStyled(feesStyle !== null && feesStyle !== void 0 ? feesStyle : FeesStyle.DEFAULT, theme)), sx), children: [(0, jsx_runtime_1.jsx)(material_1.AccordionSummary, { expandIcon: (0, jsx_runtime_1.jsx)(Icon_1.default, { src: (0, getIcon_1.default)("arrow_down"), width: 8, height: 8 }), children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { width: "100%" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
98
+ fontSize: theme.typography.fontSize11,
99
+ fontWeight: theme.typography.fontWeight500,
100
+ color: theme.palette.text.black,
101
+ }, children: "Total fees" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
102
+ borderTop: "1px dashed",
103
+ borderColor: theme.palette.border.accent,
104
+ flex: 1,
105
+ height: "1px",
106
+ width: "100%",
107
+ ml: theme.mixins.gaps.g8,
108
+ mr: theme.mixins.gaps.g8,
109
+ } }), (0, jsx_runtime_1.jsx)(Formatter_1.default, { sx: {
110
+ fontSize: theme.typography.fontSize13,
111
+ fontWeight: theme.typography.fontWeight500,
112
+ color: theme.palette.text.black,
113
+ }, value: totalFeeInCurrency, unit: " ".concat(tokenSlug.toUpperCase()), disableTooltip: true }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { width: "0.5rem" }) })] }) }), (0, jsx_runtime_1.jsx)(material_1.AccordionDetails, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g8, pt: theme.mixins.gaps.g12 }), children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { alignItems: "stretch" }), children: (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { flex: 1, gap: theme.mixins.gaps.g8 }), children: feeCheckedBalance === null || feeCheckedBalance === void 0 ? void 0 : feeCheckedBalance.map(function (item, index) {
114
+ var _a, _b, _c, _d;
115
+ return ((0, jsx_runtime_1.jsxs)(react_1.Fragment, { children: [index !== 0 && ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
116
+ borderRight: "1px dashed ".concat(theme.palette.border.accent),
117
+ width: "1px",
118
+ height: "1rem",
119
+ pr: theme.mixins.gaps.g6,
120
+ } })), (0, jsx_runtime_1.jsx)(FeeDetails, { feeName: (_a = item.fee_type) === null || _a === void 0 ? void 0 : _a.name, fee_in_currency: item.fee_in_currency, fee_in_usd: item.fee_in_usd, currencyName: (_b = item.currency) === null || _b === void 0 ? void 0 : _b.name }, (_c = item.fee_type) === null || _c === void 0 ? void 0 : _c.name)] }, (_d = item.fee_type) === null || _d === void 0 ? void 0 : _d.name));
121
+ }) }) }), isNotEnoughBalanceToPayFee && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.validationError), children: "ⓘ Insufficient transaction fee!" })), (0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
122
+ borderColor: theme.palette.border.black16,
123
+ my: theme.mixins.gaps.g4,
124
+ } }), estimateReceive !== undefined && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { justifyContent: "space-between" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
125
+ fontSize: theme.typography.fontSize11,
126
+ fontWeight: theme.typography.fontWeight500,
127
+ lineHeight: theme.typography.leading160,
128
+ }, children: "Receive amount estimated" }), (0, jsx_runtime_1.jsx)(Formatter_1.default, { sx: {
129
+ fontSize: theme.typography.fontSize16,
130
+ fontWeight: theme.typography.fontWeight700,
131
+ color: theme.palette.text.black,
132
+ }, unit: " ".concat(tokenSlug.toUpperCase()), value: estimateReceive })] }))] }) })] }))) }));
133
+ }
134
+ exports.default = Fees;
135
+ var FeeDetails = function (_a) {
136
+ var feeName = _a.feeName, fee_in_currency = _a.fee_in_currency, fee_in_usd = _a.fee_in_usd, currencyName = _a.currencyName;
137
+ var theme = (0, ThemeProvider_1.useTheme)();
138
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4, alignItems: "center", justifyContent: "space-between" }), children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 14, height: 14 }, children: SvgPath_1.IC_TIMELINE_DOT }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
139
+ fontSize: theme.typography.fontSize11,
140
+ fontWeight: theme.typography.fontWeight500,
141
+ lineHeight: theme.typography.leading160,
142
+ color: theme.palette.text.accent,
143
+ pl: theme.mixins.gaps.g12,
144
+ whiteSpace: "nowrap",
145
+ flex: 1,
146
+ }, children: feeName }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { width: "fit-content", alignItems: "flex-end" }), children: [(0, jsx_runtime_1.jsx)(Formatter_1.default, { sx: {
147
+ fontSize: theme.typography.fontSize13,
148
+ fontWeight: theme.typography.fontWeight500,
149
+ color: theme.palette.text.black,
150
+ }, value: fee_in_currency, unit: " ".concat(currencyName), disableTooltip: true }), (0, jsx_runtime_1.jsx)(Formatter_1.default, { sx: {
151
+ fontSize: theme.typography.fontSize11,
152
+ fontWeight: theme.typography.fontWeight500,
153
+ color: theme.palette.text.black,
154
+ }, value: fee_in_usd, unit: " $" })] })] }));
155
+ };
156
+ var getStyled = function (style, theme) {
157
+ switch (style) {
158
+ case FeesStyle.DEFAULT:
159
+ return {
160
+ "&.MuiAccordion-root": {
161
+ backgroundColor: "transparent",
162
+ margin: 0,
163
+ padding: 0,
164
+ borderRadius: 0,
165
+ border: "none",
166
+ boxShadow: "none",
167
+ },
168
+ "&.MuiAccordion-root::before": {
169
+ display: "none",
170
+ },
171
+ "& .MuiAccordionSummary-root": {
172
+ margin: 0,
173
+ padding: 0,
174
+ minHeight: 0,
175
+ },
176
+ "& .MuiAccordionSummary-content": {
177
+ margin: 0,
178
+ padding: 0,
179
+ display: "inline-block",
180
+ width: "100%",
181
+ },
182
+ "& .MuiAccordionSummary-content.Mui-expanded": {
183
+ margin: 0,
184
+ },
185
+ "& .MuiAccordionDetails-root": {
186
+ margin: 0,
187
+ padding: 0,
188
+ },
189
+ };
190
+ case FeesStyle.WITH_BACKGROUND:
191
+ return {
192
+ "&.MuiAccordion-root": {
193
+ backgroundColor: theme.palette.background.tertiary,
194
+ margin: 0,
195
+ padding: theme.mixins.customPadding.p16,
196
+ borderRadius: theme.mixins.customRadius.r16,
197
+ border: "none",
198
+ boxShadow: "none",
199
+ },
200
+ "&.MuiAccordion-root::before": {
201
+ display: "none",
202
+ },
203
+ "& .MuiAccordionSummary-root": {
204
+ margin: 0,
205
+ padding: 0,
206
+ minHeight: 0,
207
+ },
208
+ "& .MuiAccordionSummary-content": {
209
+ margin: 0,
210
+ padding: 0,
211
+ display: "inline-block",
212
+ width: "100%",
213
+ },
214
+ "& .MuiAccordionSummary-content.Mui-expanded": {
215
+ margin: 0,
216
+ },
217
+ "& .MuiAccordionDetails-root": {
218
+ margin: 0,
219
+ padding: 0,
220
+ },
221
+ };
222
+ }
223
+ };
@@ -156,7 +156,7 @@ exports.default = (0, react_1.memo)(function ShareAction(_a) {
156
156
  display: "flex",
157
157
  color: "#fff",
158
158
  aspectRatio: "1 / 1",
159
- background: "#1E4841",
159
+ background: "#1C461D",
160
160
  }, children: (0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "21", height: "20", viewBox: "0 0 21 20", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M3.375 13.75V15.625C3.375 16.1223 3.57254 16.5992 3.92417 16.9508C4.27581 17.3025 4.75272 17.5 5.25 17.5H16.5C16.9973 17.5 17.4742 17.3025 17.8258 16.9508C18.1775 16.5992 18.375 16.1223 18.375 15.625V13.75M14.625 10L10.875 13.75M10.875 13.75L7.125 10M10.875 13.75V2.5", stroke: "white", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) }) }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, style_1.content02), color: (_b = palette_1.palette.positive) === null || _b === void 0 ? void 0 : _b.main, children: "Save photo" })] }), (0, jsx_runtime_1.jsxs)(material_1.Grid2, { display: "flex", flexDirection: "column", gap: "0.375rem", alignItems: "center", children: [(0, jsx_runtime_1.jsx)(material_1.Button, { color: "primary", onClick: handleCopyLink, sx: {
161
161
  borderRadius: "0.75rem",
162
162
  justifyContent: "center",
@@ -166,6 +166,6 @@ exports.default = (0, react_1.memo)(function ShareAction(_a) {
166
166
  display: "flex",
167
167
  color: "#fff",
168
168
  aspectRatio: "1 / 1",
169
- background: "#1E4841",
169
+ background: "#1C461D",
170
170
  }, children: copySuccess ? ((0, jsx_runtime_1.jsx)(exports.SuccessAnimation, {})) : ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "21", height: "20", viewBox: "0 0 21 20", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M11.6167 7.24002C12.1582 7.49857 12.6298 7.8833 12.9918 8.36189C13.3538 8.84048 13.5956 9.39895 13.697 9.9904C13.7985 10.5818 13.7564 11.189 13.5745 11.7608C13.3926 12.3327 13.0762 12.8525 12.6517 13.2767L8.90169 17.0267C8.19842 17.73 7.24459 18.125 6.25002 18.125C5.25546 18.125 4.30162 17.73 3.59836 17.0267C2.89509 16.3234 2.5 15.3696 2.5 14.375C2.5 13.3805 2.89509 12.4266 3.59836 11.7234L5.06252 10.2592M16.1875 9.74086L17.6517 8.27669C18.355 7.57342 18.75 6.61959 18.75 5.62502C18.75 4.63046 18.355 3.67662 17.6517 2.97336C16.9484 2.27009 15.9946 1.875 15 1.875C14.0055 1.875 13.0516 2.27009 12.3484 2.97336L8.59836 6.72336C8.17389 7.14752 7.85741 7.66736 7.67551 8.23921C7.49361 8.81105 7.45159 9.4182 7.553 10.0096C7.6544 10.6011 7.89626 11.1596 8.25827 11.6382C8.62027 12.1167 9.09183 12.5015 9.63336 12.76", stroke: "white", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) })) }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, style_1.content02), color: (_c = palette_1.palette.positive) === null || _c === void 0 ? void 0 : _c.main, children: copySuccess ? "Copied!" : "Copy link" })] })] }));
171
171
  });
@@ -46,7 +46,7 @@ function ShareImage(_a) {
46
46
  backgroundColor: "transparent",
47
47
  alignItems: "center",
48
48
  justifyContent: "center",
49
- }, children: (0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M16.0234 9.34794H21.0154L17.8344 6.16494C16.8103 5.14081 15.5346 4.40433 14.1356 4.02955C12.7366 3.65476 11.2636 3.65487 9.86464 4.02986C8.4657 4.40486 7.19014 5.14153 6.16617 6.16581C5.14221 7.19009 4.40594 8.46588 4.03138 9.86494M2.98537 19.6439V14.6519M2.98537 14.6519H7.97738M2.98537 14.6519L6.16537 17.8349C7.18949 18.8591 8.46517 19.5955 9.86416 19.9703C11.2632 20.3451 12.7362 20.345 14.1351 19.97C15.534 19.595 16.8096 18.8584 17.8336 17.8341C18.8575 16.8098 19.5938 15.534 19.9684 14.1349M21.0154 4.35594V9.34594", stroke: "#1E4841", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) }))] }), (0, jsx_runtime_1.jsxs)(Text_1.default, { component: "span", sx: {
49
+ }, children: (0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M16.0234 9.34794H21.0154L17.8344 6.16494C16.8103 5.14081 15.5346 4.40433 14.1356 4.02955C12.7366 3.65476 11.2636 3.65487 9.86464 4.02986C8.4657 4.40486 7.19014 5.14153 6.16617 6.16581C5.14221 7.19009 4.40594 8.46588 4.03138 9.86494M2.98537 19.6439V14.6519M2.98537 14.6519H7.97738M2.98537 14.6519L6.16537 17.8349C7.18949 18.8591 8.46517 19.5955 9.86416 19.9703C11.2632 20.3451 12.7362 20.345 14.1351 19.97C15.534 19.595 16.8096 18.8584 17.8336 17.8341C18.8575 16.8098 19.5938 15.534 19.9684 14.1349M21.0154 4.35594V9.34594", stroke: "#1C461D", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) }))] }), (0, jsx_runtime_1.jsxs)(Text_1.default, { component: "span", sx: {
50
50
  display: "flex",
51
51
  flexDirection: "column",
52
52
  fontSize: "0.813rem",
@@ -70,8 +70,8 @@ function ShareImage(_a) {
70
70
  left: "-1px",
71
71
  width: "16px",
72
72
  height: "16px",
73
- borderTop: "1px solid #1E4841",
74
- borderLeft: "1px solid #1E4841",
73
+ borderTop: "1px solid #1C461D",
74
+ borderLeft: "1px solid #1C461D",
75
75
  borderTopLeftRadius: "9px",
76
76
  } }), (0, jsx_runtime_1.jsx)("div", { style: {
77
77
  position: "absolute",
@@ -79,8 +79,8 @@ function ShareImage(_a) {
79
79
  right: "-1px",
80
80
  width: "16px",
81
81
  height: "16px",
82
- borderTop: "1px solid #1E4841",
83
- borderRight: "1px solid #1E4841",
82
+ borderTop: "1px solid #1C461D",
83
+ borderRight: "1px solid #1C461D",
84
84
  borderTopRightRadius: "9px",
85
85
  } }), (0, jsx_runtime_1.jsx)("div", { style: {
86
86
  position: "absolute",
@@ -88,8 +88,8 @@ function ShareImage(_a) {
88
88
  left: "-1px",
89
89
  width: "16px",
90
90
  height: "16px",
91
- borderBottom: "1px solid #1E4841",
92
- borderLeft: "1px solid #1E4841",
91
+ borderBottom: "1px solid #1C461D",
92
+ borderLeft: "1px solid #1C461D",
93
93
  borderBottomLeftRadius: "9px",
94
94
  } }), (0, jsx_runtime_1.jsx)("div", { style: {
95
95
  position: "absolute",
@@ -97,27 +97,27 @@ function ShareImage(_a) {
97
97
  right: "-1px",
98
98
  width: "16px",
99
99
  height: "16px",
100
- borderBottom: "1px solid #1E4841",
101
- borderRight: "1px solid #1E4841",
100
+ borderBottom: "1px solid #1C461D",
101
+ borderRight: "1px solid #1C461D",
102
102
  borderBottomRightRadius: "9px",
103
103
  } }), (0, jsx_runtime_1.jsx)("div", { style: {
104
104
  position: "absolute",
105
105
  top: "-1px",
106
106
  width: "16px",
107
107
  height: "16px",
108
- borderTop: "1px solid #1E4841",
108
+ borderTop: "1px solid #1C461D",
109
109
  } }), (0, jsx_runtime_1.jsx)("div", { style: {
110
110
  position: "absolute",
111
111
  bottom: "-1px",
112
112
  width: "16px",
113
113
  height: "16px",
114
- borderBottom: "1px solid #1E4841",
114
+ borderBottom: "1px solid #1C461D",
115
115
  } }), (0, jsx_runtime_1.jsx)("div", { style: {
116
116
  position: "absolute",
117
117
  left: "-1px",
118
118
  width: "16px",
119
119
  height: "16px",
120
- borderLeft: "1px solid #1E4841",
120
+ borderLeft: "1px solid #1C461D",
121
121
  top: "50%",
122
122
  transform: "translateY(-50%)",
123
123
  } }), (0, jsx_runtime_1.jsx)("div", { style: {
@@ -125,7 +125,7 @@ function ShareImage(_a) {
125
125
  right: "-1px",
126
126
  width: "16px",
127
127
  height: "16px",
128
- borderRight: "1px solid #1E4841",
128
+ borderRight: "1px solid #1C461D",
129
129
  top: "50%",
130
130
  transform: "translateY(-50%)",
131
131
  } })] })] }) }));
@@ -70,6 +70,7 @@ var Button_1 = __importDefault(require("../Button"));
70
70
  var Text_1 = __importDefault(require("../Text"));
71
71
  var style_1 = require("./style");
72
72
  var palette_1 = require("../../../theme/mui/deposit-fiat-theme/palette");
73
+ var type_1 = require("../../../services/axios/get-activities-service/type");
73
74
  // Because PageHeader component don't work
74
75
  var BackArrow = function (props) {
75
76
  return ((0, jsx_runtime_1.jsxs)("svg", __assign({ xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none" }, props, { children: [(0, jsx_runtime_1.jsx)("mask", { id: "mask0_6061_2295", style: { maskType: "alpha" }, maskUnits: "userSpaceOnUse", x: "0", y: "0", width: "24", height: "24", children: (0, jsx_runtime_1.jsx)("rect", { width: "24", height: "24", fill: "#D9D9D9" }) }), (0, jsx_runtime_1.jsx)("g", { mask: "url(#mask0_6061_2295)", children: (0, jsx_runtime_1.jsx)("path", { d: "M14 17.6538L8.34619 12L14 6.34619L15.0538 7.40002L10.4538 12L15.0538 16.6L14 17.6538Z", fill: "#121212" }) })] })));
@@ -84,7 +85,7 @@ var Header = function (_a) {
84
85
  }, children: [(0, jsx_runtime_1.jsx)(material_1.Grid2, { children: (0, jsx_runtime_1.jsx)(BackArrow, { onClick: handleBack }) }), (0, jsx_runtime_1.jsx)(material_1.Grid2, { display: "flex", children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, style_1.title01), { width: "100%", textAlign: "center" }), children: "Top up" }) }), (0, jsx_runtime_1.jsx)(material_1.Grid2, { children: (0, jsx_runtime_1.jsxs)(material_1.Box, { display: "flex", alignItems: "center", justifyContent: "end", gap: ".5rem", children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 20, height: 20 }, children: SvgPath_1.IC_HELP }), (0, jsx_runtime_1.jsx)(material_1.Divider, { flexItem: true, sx: { width: "1px" } }), (0, jsx_runtime_1.jsx)(DrawerComponent_1.default, { ref: historyRef, trigger: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 20, height: 20, display: "block" }, children: SvgPath_1.IC_HISTORY }), direction: DrawerComponent_1.DRAWER_DIRECTION.RIGHT, children: (0, jsx_runtime_1.jsx)(ReceiveHistory_1.default, { onClose: function () { var _a; return (_a = historyRef.current) === null || _a === void 0 ? void 0 : _a.close(); } }) })] }) })] }));
85
86
  };
86
87
  var CopyIcon = function () {
87
- return ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "17", height: "16", viewBox: "0 0 17 16", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M11 11.5V13.75C11 14.164 10.664 14.5 10.25 14.5H3.75C3.55109 14.5 3.36032 14.421 3.21967 14.2803C3.07902 14.1397 3 13.9489 3 13.75V5.25C3 4.836 3.336 4.5 3.75 4.5H5C5.33505 4.49977 5.66954 4.52742 6 4.58267M11 11.5H13.25C13.664 11.5 14 11.164 14 10.75V7.5C14 4.52667 11.838 2.05933 9 1.58267C8.66954 1.52742 8.33505 1.49977 8 1.5H6.75C6.336 1.5 6 1.836 6 2.25V4.58267M11 11.5H6.75C6.55109 11.5 6.36032 11.421 6.21967 11.2803C6.07902 11.1397 6 10.9489 6 10.75V4.58267M14 9V7.75C14 7.15326 13.7629 6.58097 13.341 6.15901C12.919 5.73705 12.3467 5.5 11.75 5.5H10.75C10.5511 5.5 10.3603 5.42098 10.2197 5.28033C10.079 5.13968 10 4.94891 10 4.75V3.75C10 3.45453 9.9418 3.16195 9.82873 2.88896C9.71566 2.61598 9.54992 2.36794 9.34099 2.15901C9.13206 1.95008 8.88402 1.78435 8.61104 1.67127C8.33806 1.5582 8.04547 1.5 7.75 1.5H7", stroke: "#1E4841", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) }));
88
+ return ((0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "17", height: "16", viewBox: "0 0 17 16", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M11 11.5V13.75C11 14.164 10.664 14.5 10.25 14.5H3.75C3.55109 14.5 3.36032 14.421 3.21967 14.2803C3.07902 14.1397 3 13.9489 3 13.75V5.25C3 4.836 3.336 4.5 3.75 4.5H5C5.33505 4.49977 5.66954 4.52742 6 4.58267M11 11.5H13.25C13.664 11.5 14 11.164 14 10.75V7.5C14 4.52667 11.838 2.05933 9 1.58267C8.66954 1.52742 8.33505 1.49977 8 1.5H6.75C6.336 1.5 6 1.836 6 2.25V4.58267M11 11.5H6.75C6.55109 11.5 6.36032 11.421 6.21967 11.2803C6.07902 11.1397 6 10.9489 6 10.75V4.58267M14 9V7.75C14 7.15326 13.7629 6.58097 13.341 6.15901C12.919 5.73705 12.3467 5.5 11.75 5.5H10.75C10.5511 5.5 10.3603 5.42098 10.2197 5.28033C10.079 5.13968 10 4.94891 10 4.75V3.75C10 3.45453 9.9418 3.16195 9.82873 2.88896C9.71566 2.61598 9.54992 2.36794 9.34099 2.15901C9.13206 1.95008 8.88402 1.78435 8.61104 1.67127C8.33806 1.5582 8.04547 1.5 7.75 1.5H7", stroke: "#1C461D", strokeWidth: "1.25", strokeLinecap: "round", strokeLinejoin: "round" }) }));
88
89
  };
89
90
  exports.CopyIcon = CopyIcon;
90
91
  function FiatDeposit(_a) {
@@ -174,7 +175,8 @@ function FiatDeposit(_a) {
174
175
  });
175
176
  };
176
177
  (0, react_1.useEffect)(function () {
177
- if ((transaction === null || transaction === void 0 ? void 0 : transaction.transaction_status) === "success") {
178
+ if ((transaction === null || transaction === void 0 ? void 0 : transaction.transaction_status) === "success" &&
179
+ (transaction === null || transaction === void 0 ? void 0 : transaction.transaction_type) === type_1.TransactionSlug.DEPOSIT) {
178
180
  updateActivities();
179
181
  setOpen(false);
180
182
  setOpenQR(false);
@@ -235,7 +237,7 @@ function FiatDeposit(_a) {
235
237
  }, style: { filter: count === 0 ? "blur(6px)" : "none" } }), count === 0 && ((0, jsx_runtime_1.jsx)(material_1.Stack, { direction: "row", position: "absolute", alignItems: "center", justifyContent: "center", sx: {
236
238
  background: "transparent",
237
239
  inset: 0,
238
- }, onClick: handleClick, children: (0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M16.0234 9.34794H21.0154L17.8344 6.16494C16.8103 5.14081 15.5346 4.40433 14.1356 4.02955C12.7366 3.65476 11.2636 3.65487 9.86464 4.02986C8.4657 4.40486 7.19014 5.14153 6.16617 6.16581C5.14221 7.19009 4.40594 8.46588 4.03138 9.86494M2.98537 19.6439V14.6519M2.98537 14.6519H7.97738M2.98537 14.6519L6.16537 17.8349C7.18949 18.8591 8.46517 19.5955 9.86416 19.9703C11.2632 20.3451 12.7362 20.345 14.1351 19.97C15.534 19.595 16.8096 18.8584 17.8336 17.8341C18.8575 16.8098 19.5938 15.534 19.9684 14.1349M21.0154 4.35594V9.34594", stroke: "#1E4841", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) }))] }), (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: {
240
+ }, onClick: handleClick, children: (0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "24", height: "24", viewBox: "0 0 24 24", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M16.0234 9.34794H21.0154L17.8344 6.16494C16.8103 5.14081 15.5346 4.40433 14.1356 4.02955C12.7366 3.65476 11.2636 3.65487 9.86464 4.02986C8.4657 4.40486 7.19014 5.14153 6.16617 6.16581C5.14221 7.19009 4.40594 8.46588 4.03138 9.86494M2.98537 19.6439V14.6519M2.98537 14.6519H7.97738M2.98537 14.6519L6.16537 17.8349C7.18949 18.8591 8.46517 19.5955 9.86416 19.9703C11.2632 20.3451 12.7362 20.345 14.1351 19.97C15.534 19.595 16.8096 18.8584 17.8336 17.8341C18.8575 16.8098 19.5938 15.534 19.9684 14.1349M21.0154 4.35594V9.34594", stroke: "#1C461D", strokeWidth: "1.5", strokeLinecap: "round", strokeLinejoin: "round" }) }) }))] }), (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: {
239
241
  fontSize: "1.5rem",
240
242
  fontWeight: 600,
241
243
  lineHeight: "140%",
@@ -246,7 +248,7 @@ function FiatDeposit(_a) {
246
248
  fontSize: "0.938rem",
247
249
  fontWeight: 500,
248
250
  lineHeight: "140%",
249
- }, color: (_h = palette_1.palette.accent2) === null || _h === void 0 ? void 0 : _h.main, children: "VND" })] }), (0, jsx_runtime_1.jsxs)(Text_1.default, { display: "flex", alignItems: "center", gap: "0.375rem", sx: __assign({}, style_1.title03), color: (_j = palette_1.palette.accent2) === null || _j === void 0 ? void 0 : _j.main, children: ["Top up time left", (0, jsx_runtime_1.jsx)(TimeText_1.default, { seconds: count }), (0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M7 5V7.5M13 7C13 7.78793 12.8448 8.56815 12.5433 9.2961C12.2417 10.0241 11.7998 10.6855 11.2426 11.2426C10.6855 11.7998 10.0241 12.2417 9.2961 12.5433C8.56815 12.8448 7.78793 13 7 13C6.21207 13 5.43185 12.8448 4.7039 12.5433C3.97595 12.2417 3.31451 11.7998 2.75736 11.2426C2.20021 10.6855 1.75825 10.0241 1.45672 9.2961C1.15519 8.56815 1 7.78793 1 7C1 5.4087 1.63214 3.88258 2.75736 2.75736C3.88258 1.63214 5.4087 1 7 1C8.5913 1 10.1174 1.63214 11.2426 2.75736C12.3679 3.88258 13 5.4087 13 7ZM7 9.5H7.00533V9.50533H7V9.5Z", stroke: "#1E4841", strokeLinecap: "round", strokeLinejoin: "round" }) })] }), (0, jsx_runtime_1.jsx)(material_1.Divider, { flexItem: true }), (0, jsx_runtime_1.jsxs)(Text_1.default, { display: "flex", flexDirection: "column", alignItems: "center", gap: "0.375rem", sx: __assign({}, style_1.title01), children: [depositData === null || depositData === void 0 ? void 0 : depositData.metadata.bank_account.account_name, (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, style_1.content02), color: (_k = palette_1.palette.accent2) === null || _k === void 0 ? void 0 : _k.main, children: depositData === null || depositData === void 0 ? void 0 : depositData.metadata.bank_account.bank_name }), (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, style_1.title02), display: "flex", alignItems: "center", gap: "0.25rem", children: [copySuccess ? "Copied!" : depositData === null || depositData === void 0 ? void 0 : depositData.metadata.bank_account.account_number, (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: function () { var _a; return handleCopyLink((_a = depositData === null || depositData === void 0 ? void 0 : depositData.metadata.bank_account.account_number) !== null && _a !== void 0 ? _a : ""); }, children: (0, jsx_runtime_1.jsx)(exports.CopyIcon, {}) })] }), (0, jsx_runtime_1.jsx)(link_1.default, { href: (_l = depositData === null || depositData === void 0 ? void 0 : depositData._link.payment_link.href) !== null && _l !== void 0 ? _l : "#", target: "_blank", rel: "noopener noreferrer", style: {
251
+ }, color: (_h = palette_1.palette.accent2) === null || _h === void 0 ? void 0 : _h.main, children: "VND" })] }), (0, jsx_runtime_1.jsxs)(Text_1.default, { display: "flex", alignItems: "center", gap: "0.375rem", sx: __assign({}, style_1.title03), color: (_j = palette_1.palette.accent2) === null || _j === void 0 ? void 0 : _j.main, children: ["Top up time left", (0, jsx_runtime_1.jsx)(TimeText_1.default, { seconds: count }), (0, jsx_runtime_1.jsx)("svg", { xmlns: "http://www.w3.org/2000/svg", width: "14", height: "14", viewBox: "0 0 14 14", fill: "none", children: (0, jsx_runtime_1.jsx)("path", { d: "M7 5V7.5M13 7C13 7.78793 12.8448 8.56815 12.5433 9.2961C12.2417 10.0241 11.7998 10.6855 11.2426 11.2426C10.6855 11.7998 10.0241 12.2417 9.2961 12.5433C8.56815 12.8448 7.78793 13 7 13C6.21207 13 5.43185 12.8448 4.7039 12.5433C3.97595 12.2417 3.31451 11.7998 2.75736 11.2426C2.20021 10.6855 1.75825 10.0241 1.45672 9.2961C1.15519 8.56815 1 7.78793 1 7C1 5.4087 1.63214 3.88258 2.75736 2.75736C3.88258 1.63214 5.4087 1 7 1C8.5913 1 10.1174 1.63214 11.2426 2.75736C12.3679 3.88258 13 5.4087 13 7ZM7 9.5H7.00533V9.50533H7V9.5Z", stroke: "#1C461D", strokeLinecap: "round", strokeLinejoin: "round" }) })] }), (0, jsx_runtime_1.jsx)(material_1.Divider, { flexItem: true }), (0, jsx_runtime_1.jsxs)(Text_1.default, { display: "flex", flexDirection: "column", alignItems: "center", gap: "0.375rem", sx: __assign({}, style_1.title01), children: [depositData === null || depositData === void 0 ? void 0 : depositData.metadata.bank_account.account_name, (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, style_1.content02), color: (_k = palette_1.palette.accent2) === null || _k === void 0 ? void 0 : _k.main, children: depositData === null || depositData === void 0 ? void 0 : depositData.metadata.bank_account.bank_name }), (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign({}, style_1.title02), display: "flex", alignItems: "center", gap: "0.25rem", children: [copySuccess ? "Copied!" : depositData === null || depositData === void 0 ? void 0 : depositData.metadata.bank_account.account_number, (0, jsx_runtime_1.jsx)("button", { type: "button", onClick: function () { var _a; return handleCopyLink((_a = depositData === null || depositData === void 0 ? void 0 : depositData.metadata.bank_account.account_number) !== null && _a !== void 0 ? _a : ""); }, children: (0, jsx_runtime_1.jsx)(exports.CopyIcon, {}) })] }), (0, jsx_runtime_1.jsx)(link_1.default, { href: (_l = depositData === null || depositData === void 0 ? void 0 : depositData._link.payment_link.href) !== null && _l !== void 0 ? _l : "#", target: "_blank", rel: "noopener noreferrer", style: {
250
252
  marginTop: "-0.5rem",
251
253
  }, children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, style_1.content02), { textDecoration: "underline", fontStyle: "italic" }), children: "Transfer" }) })] })] }) }), (0, jsx_runtime_1.jsx)(material_1.Box, { pt: "0.75rem", pb: "1rem", width: "100%", children: (0, jsx_runtime_1.jsx)(Button_1.default.Primary, { disabled: loading, loading: loading, onClick: function () {
252
254
  if (count === 0) {
@@ -11,6 +11,7 @@ export interface FormatterProps extends BoxProps {
11
11
  disableTooltip?: boolean;
12
12
  showLessThan?: boolean;
13
13
  isNotCurrency?: boolean;
14
+ hideUnitOutSide?: boolean;
14
15
  className?: string;
15
16
  }
16
17
  export declare const Formatter: React.FC<FormatterProps>;