tek-wallet 0.0.806 → 0.0.808

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 (190) hide show
  1. package/README.md +118 -8
  2. package/dist/components/TekWallet/components/index.d.ts +2 -1
  3. package/dist/components/TekWallet/components/index.js +2 -1
  4. package/dist/components/TekWallet/components/layouts/ChildPageLayout/index.js +3 -3
  5. package/dist/components/TekWallet/components/layouts/DefaultPageLayout/index.js +3 -3
  6. package/dist/components/TekWallet/components/ui/ActivitiesTypeSlice/index.js +12 -8
  7. package/dist/components/TekWallet/components/ui/ActivityDetail/index.js +17 -19
  8. package/dist/components/TekWallet/components/ui/ActivityItem/index.js +13 -13
  9. package/dist/components/TekWallet/components/ui/AmountGroupAndChart/index.js +3 -3
  10. package/dist/components/TekWallet/components/ui/AnalyticGroup/index.js +20 -20
  11. package/dist/components/TekWallet/components/ui/AnalyticGroupCenter/index.js +9 -8
  12. package/dist/components/TekWallet/components/ui/AppBackDrop/index.js +3 -3
  13. package/dist/components/TekWallet/components/ui/AppDialog/index.js +3 -3
  14. package/dist/components/TekWallet/components/ui/AssetViewHeader/index.js +9 -8
  15. package/dist/components/TekWallet/components/ui/BackHeader/index.js +6 -6
  16. package/dist/components/TekWallet/components/ui/BottomActionLayout/index.js +3 -3
  17. package/dist/components/TekWallet/components/ui/Button/index.js +4 -4
  18. package/dist/components/TekWallet/components/ui/CardToken/index.js +8 -8
  19. package/dist/components/TekWallet/components/ui/Column/index.js +3 -3
  20. package/dist/components/TekWallet/components/ui/ConfirmByPasscode/index.js +6 -4
  21. package/dist/components/TekWallet/components/ui/ConfirmLayout/index.js +3 -3
  22. package/dist/components/TekWallet/components/ui/ConfirmSwapToken/Result.js +17 -17
  23. package/dist/components/TekWallet/components/ui/ConfirmTransfer/index.js +3 -3
  24. package/dist/components/TekWallet/components/ui/CopyTextComponent/index.js +6 -6
  25. package/dist/components/TekWallet/components/ui/CustomTooltip/index.js +4 -2
  26. package/dist/components/TekWallet/components/ui/DetailSwap/index.js +9 -9
  27. package/dist/components/TekWallet/components/ui/DialogContentLayout/index.js +6 -6
  28. package/dist/components/TekWallet/components/ui/DrawerDrag/index.js +3 -3
  29. package/dist/components/TekWallet/components/ui/EmptyData/index.js +3 -3
  30. package/dist/components/TekWallet/components/ui/Fees/index.js +25 -25
  31. package/dist/components/TekWallet/components/ui/FeesAutoDebounce/index.js +24 -25
  32. package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareAction.js +4 -6
  33. package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareDrawer.js +2 -5
  34. package/dist/components/TekWallet/components/ui/FiatDeposit/components/shareImage.js +1 -2
  35. package/dist/components/TekWallet/components/ui/FiatDeposit/index.js +28 -26
  36. package/dist/components/TekWallet/components/ui/Formatter/index.js +3 -0
  37. package/dist/components/TekWallet/components/ui/FunctionItem/index.js +4 -5
  38. package/dist/components/TekWallet/components/ui/Icon/index.js +1 -1
  39. package/dist/components/TekWallet/components/ui/IconText/index.js +3 -3
  40. package/dist/components/TekWallet/components/ui/IncomeWallet/components/AnalyticGroup.js +19 -20
  41. package/dist/components/TekWallet/components/ui/IncomeWallet/components/BalanceChart.js +5 -5
  42. package/dist/components/TekWallet/components/ui/IncomeWallet/components/FunctionItem.js +3 -3
  43. package/dist/components/TekWallet/components/ui/IncomeWallet/components/HistoryItem.js +3 -3
  44. package/dist/components/TekWallet/components/ui/IncomeWallet/components/WealthDeposit.js +3 -1
  45. package/dist/components/TekWallet/components/ui/IncomeWallet/components/WealthWithdraw.js +3 -1
  46. package/dist/components/TekWallet/components/ui/IncomeWallet/components/history/index.js +3 -3
  47. package/dist/components/TekWallet/components/ui/IncomeWallet/index.js +10 -10
  48. package/dist/components/TekWallet/components/ui/InlineTitleValue/index.js +3 -3
  49. package/dist/components/TekWallet/components/ui/Input/index.js +5 -5
  50. package/dist/components/TekWallet/components/ui/LineValue/index.js +3 -3
  51. package/dist/components/TekWallet/components/ui/ListItemCustom/index.js +8 -6
  52. package/dist/components/TekWallet/components/ui/LoadingLayout/index.js +3 -3
  53. package/dist/components/TekWallet/components/ui/LockToken/index.js +4 -4
  54. package/dist/components/TekWallet/components/ui/ModalCheckboxToken/index.js +22 -22
  55. package/dist/components/TekWallet/components/ui/ModalDateFilter/index.js +11 -11
  56. package/dist/components/TekWallet/components/ui/ModalLayout/index.js +3 -3
  57. package/dist/components/TekWallet/components/ui/ModalSelectToken/index.js +12 -12
  58. package/dist/components/TekWallet/components/ui/ModalStatusFilter/index.js +16 -16
  59. package/dist/components/TekWallet/components/ui/ModalTitle/index.js +3 -3
  60. package/dist/components/TekWallet/components/ui/NeonLineChart/index.js +4 -4
  61. package/dist/components/TekWallet/components/ui/NetworkSelection/index.js +5 -5
  62. package/dist/components/TekWallet/components/ui/OTP/index.js +24 -18
  63. package/dist/components/TekWallet/components/ui/PageHeader/index.js +3 -3
  64. package/dist/components/TekWallet/components/ui/QRCode/index.js +3 -1
  65. package/dist/components/TekWallet/components/ui/QrCodeReader/index.js +2 -3
  66. package/dist/components/TekWallet/components/ui/ReceiveDirectly/index.d.ts +26 -0
  67. package/dist/components/TekWallet/components/ui/ReceiveDirectly/index.js +365 -0
  68. package/dist/components/TekWallet/components/ui/ReceiveFunction/components/HelpView.js +4 -4
  69. package/dist/components/TekWallet/components/ui/ReceiveFunction/components/SortGroup.js +4 -4
  70. package/dist/components/TekWallet/components/ui/ReceiveFunction/components/SortTool.js +7 -12
  71. package/dist/components/TekWallet/components/ui/ReceiveFunction/index.js +39 -56
  72. package/dist/components/TekWallet/components/ui/ReceiveHistory/ReceiveCardHistory.js +13 -13
  73. package/dist/components/TekWallet/components/ui/ReceiveHistory/ReceiveHistoryDetails.js +22 -29
  74. package/dist/components/TekWallet/components/ui/ReceiveHistory/index.js +19 -19
  75. package/dist/components/TekWallet/components/ui/Row/index.js +3 -3
  76. package/dist/components/TekWallet/components/ui/ScanQRToSend/index.js +7 -7
  77. package/dist/components/TekWallet/components/ui/SearchBar.d.ts +10 -0
  78. package/dist/components/TekWallet/components/ui/SearchBar.js +42 -0
  79. package/dist/components/TekWallet/components/ui/SendExternalToken/index.js +7 -7
  80. package/dist/components/TekWallet/components/ui/SendInternalToken/index.js +5 -5
  81. package/dist/components/TekWallet/components/ui/SmartList/index.js +3 -3
  82. package/dist/components/TekWallet/components/ui/StatusDisplay/index.js +7 -7
  83. package/dist/components/TekWallet/components/ui/SvgPath/index.js +27 -27
  84. package/dist/components/TekWallet/components/ui/SwiperControlled/index.js +1 -3
  85. package/dist/components/TekWallet/components/ui/TimeFilter/index.js +9 -8
  86. package/dist/components/TekWallet/components/ui/TimeText/index.js +1 -1
  87. package/dist/components/TekWallet/components/ui/TokenItem/index.js +7 -15
  88. package/dist/components/TekWallet/components/ui/TokenSelection/index.js +5 -5
  89. package/dist/components/TekWallet/components/ui/TokensBoard/index.js +12 -12
  90. package/dist/components/TekWallet/components/ui/TransferConfirmation/index.js +3 -3
  91. package/dist/components/TekWallet/components/ui/TransferInternal/index.js +3 -3
  92. package/dist/components/TekWallet/components/ui/UpdateLockToken/index.js +4 -4
  93. package/dist/components/TekWallet/components/ui/UserInfo/index.js +4 -4
  94. package/dist/components/TekWallet/components/ui/WaitingData/index.js +13 -12
  95. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/selectToken.js +11 -11
  96. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/sendForm.js +30 -30
  97. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/sortByBalance.js +3 -3
  98. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/sortByToken.js +3 -3
  99. package/dist/components/TekWallet/components/ui/WithdrawFunction/components/summary/infoSummary.js +8 -8
  100. package/dist/components/TekWallet/components/ui/WithdrawFunction/index.js +9 -9
  101. package/dist/components/TekWallet/components/views/ActivityView/index.js +4 -4
  102. package/dist/components/TekWallet/components/views/AssetView/Menu.js +3 -3
  103. package/dist/components/TekWallet/components/views/AssetView/index.js +12 -12
  104. package/dist/components/TekWallet/components/views/AuthView/index.js +4 -4
  105. package/dist/components/TekWallet/components/views/AuthViewSignIn/index.js +4 -4
  106. package/dist/components/TekWallet/components/views/ChangePasscodeView/index.js +8 -6
  107. package/dist/components/TekWallet/components/views/CreateWalletView/index.js +4 -4
  108. package/dist/components/TekWallet/components/views/DetailActivityView/LoadingView.js +4 -4
  109. package/dist/components/TekWallet/components/views/GetSeedPhraseWalletView/index.js +7 -7
  110. package/dist/components/TekWallet/components/views/ImportWalletView/index.js +4 -7
  111. package/dist/components/TekWallet/components/views/SendExternalView/components/Form.js +32 -37
  112. package/dist/components/TekWallet/components/views/SendExternalView/components/Result.js +16 -16
  113. package/dist/components/TekWallet/components/views/SendExternalView/components/SelectNetwork.js +3 -3
  114. package/dist/components/TekWallet/components/views/SendExternalView/components/SelectToken.js +7 -32
  115. package/dist/components/TekWallet/components/views/SendExternalView/components/Summary.js +12 -12
  116. package/dist/components/TekWallet/components/views/SendExternalView/index.js +3 -3
  117. package/dist/components/TekWallet/components/views/SendInternalView/components/AmountForm.js +26 -24
  118. package/dist/components/TekWallet/components/views/SendInternalView/components/Form.js +27 -33
  119. package/dist/components/TekWallet/components/views/SendInternalView/components/Result.js +14 -14
  120. package/dist/components/TekWallet/components/views/SendInternalView/components/SelectToken.js +7 -32
  121. package/dist/components/TekWallet/components/views/SendInternalView/components/Summary.js +10 -10
  122. package/dist/components/TekWallet/components/views/SendInternalView/index.js +3 -3
  123. package/dist/components/TekWallet/components/views/SettingView/index.js +4 -13
  124. package/dist/components/TekWallet/components/views/SwapView/components/FromCard/FromCardSkeleton.js +7 -8
  125. package/dist/components/TekWallet/components/views/SwapView/components/FromCard/index.js +20 -25
  126. package/dist/components/TekWallet/components/views/SwapView/components/SelectToken.js +7 -32
  127. package/dist/components/TekWallet/components/views/SwapView/components/Summary.js +36 -39
  128. package/dist/components/TekWallet/components/views/SwapView/components/ToCard/index.js +7 -7
  129. package/dist/components/TekWallet/components/views/SwapView/index.js +12 -10
  130. package/dist/components/TekWallet/hooks/useValidateAmount.js +3 -3
  131. package/dist/components/TekWallet/hooks/useWarningWrongPasscode.js +5 -5
  132. package/dist/components/TekWallet/index.d.ts +2 -0
  133. package/dist/components/TekWallet/index.js +2 -12
  134. package/dist/components/TekWallet/layouts/ChildPageLayout/index.js +3 -3
  135. package/dist/components/TekWallet/providers/RealtimeProvider/index.js +15 -13
  136. package/dist/components/TekWallet/providers/TekWalletProvider/index.d.ts +9 -1
  137. package/dist/components/TekWallet/providers/TekWalletProvider/index.js +11 -4
  138. package/dist/components/TekWallet/providers/index.d.ts +0 -1
  139. package/dist/components/TekWallet/providers/index.js +0 -1
  140. package/dist/components/TekWallet/theme/mui/components/index.d.ts +133 -0
  141. package/dist/components/TekWallet/theme/mui/components/index.js +14 -0
  142. package/dist/components/TekWallet/theme/mui/components/overrides/Button.d.ts +142 -0
  143. package/dist/components/TekWallet/theme/mui/components/overrides/Button.js +84 -0
  144. package/dist/components/TekWallet/theme/mui/components/overrides/Drawer.d.ts +4 -0
  145. package/dist/components/TekWallet/theme/mui/components/overrides/Drawer.js +9 -0
  146. package/dist/components/TekWallet/theme/mui/components/overrides/Paper.d.ts +3 -0
  147. package/dist/components/TekWallet/theme/mui/components/overrides/Paper.js +15 -0
  148. package/dist/components/TekWallet/theme/mui/components/overrides/SnackBar.d.ts +3 -0
  149. package/dist/components/TekWallet/theme/mui/components/overrides/SnackBar.js +32 -0
  150. package/dist/components/TekWallet/theme/mui/fixed-mixins.d.ts +2 -0
  151. package/dist/components/TekWallet/theme/mui/fixed-mixins.js +218 -0
  152. package/dist/components/TekWallet/theme/mui/index.d.ts +3 -3
  153. package/dist/components/TekWallet/theme/mui/index.js +16 -32
  154. package/dist/components/TekWallet/theme/mui/palette.d.ts +34 -0
  155. package/dist/components/TekWallet/theme/mui/palette.js +133 -0
  156. package/dist/components/TekWallet/theme/mui/shadows/index.d.ts +3 -0
  157. package/dist/components/TekWallet/theme/mui/shadows/index.js +64 -0
  158. package/dist/components/TekWallet/theme/mui/spacing.d.ts +1 -0
  159. package/dist/components/TekWallet/theme/mui/spacing.js +5 -0
  160. package/dist/components/TekWallet/theme/mui/theme.d.ts +9 -442
  161. package/dist/components/TekWallet/theme/mui/theme.js +38 -415
  162. package/dist/components/TekWallet/theme/mui/type.d.ts +5 -0
  163. package/dist/components/TekWallet/theme/mui/type.js +9 -0
  164. package/dist/components/TekWallet/theme/mui/typography.d.ts +27 -0
  165. package/dist/components/TekWallet/theme/mui/typography.js +30 -0
  166. package/dist/components/TekWallet/theme/mui/utils/deepMergeTheme.d.ts +2 -0
  167. package/dist/components/TekWallet/theme/mui/utils/deepMergeTheme.js +7 -0
  168. package/dist/components/TekWallet/utils/getContractColor.d.ts +1 -0
  169. package/dist/components/TekWallet/utils/getContractColor.js +30 -0
  170. package/package.json +1 -1
  171. package/dist/components/TekWallet/components/ui/CardHistorySwap/index.d.ts +0 -12
  172. package/dist/components/TekWallet/components/ui/CardHistorySwap/index.js +0 -75
  173. package/dist/components/TekWallet/components/ui/DetailSwapResult/index.d.ts +0 -8
  174. package/dist/components/TekWallet/components/ui/DetailSwapResult/index.js +0 -122
  175. package/dist/components/TekWallet/components/ui/HistorySwap/index.d.ts +0 -16
  176. package/dist/components/TekWallet/components/ui/HistorySwap/index.js +0 -434
  177. package/dist/components/TekWallet/components/ui/SwapFunction/index.d.ts +0 -16
  178. package/dist/components/TekWallet/components/ui/SwapFunction/index.js +0 -271
  179. package/dist/components/TekWallet/components/ui/SwapToken/index.d.ts +0 -31
  180. package/dist/components/TekWallet/components/ui/SwapToken/index.js +0 -293
  181. package/dist/components/TekWallet/providers/ThemeProvider/index.d.ts +0 -8
  182. package/dist/components/TekWallet/providers/ThemeProvider/index.js +0 -43
  183. package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/components.d.ts +0 -3
  184. package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/components.js +0 -158
  185. package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/palette.d.ts +0 -55
  186. package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/palette.js +0 -45
  187. package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/theme.d.ts +0 -2
  188. package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/theme.js +0 -13
  189. package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/typography.d.ts +0 -39
  190. package/dist/components/TekWallet/theme/mui/deposit-fiat-theme/typography.js +0 -65
package/README.md CHANGED
@@ -63,14 +63,15 @@ const { tokens } = useWallet();
63
63
 
64
64
  ### Các Components Chính
65
65
 
66
- | Component | Mô tả |
67
- | --------------------- | ----------------------------------------- |
68
- | **LockToken** | Cho phép người dùng khóa token trong ví |
69
- | **SwapToken** | Hỗ trợ chức năng hoán đổi token |
70
- | **UpdateLockedToken** | Cho phép cập nhật thông tin token đã khóa |
71
- | **ReceiveFunction** | Xử lý chức năng nhận token |
72
- | **AssetView** | Hiển thị tài sản trong |
73
- | **WithdrawFunction** | Xử chức năng rút token |
66
+ | Component | Mô tả |
67
+ | --------------------- | ------------------------------------------ |
68
+ | **LockToken** | Cho phép người dùng khóa token trong ví |
69
+ | **SwapToken** | Hỗ trợ chức năng hoán đổi token |
70
+ | **UpdateLockedToken** | Cho phép cập nhật thông tin token đã khóa |
71
+ | **ReceiveFunction** | Xử lý chức năng nhận token |
72
+ | **ReceiveDirectly** | Component nhận token trực tiếp qua QR code |
73
+ | **AssetView** | Hiển thị tài sản trong |
74
+ | **WithdrawFunction** | Xử lý chức năng rút token |
74
75
 
75
76
  ### Components Xác nhận (Confirm)
76
77
 
@@ -125,6 +126,115 @@ Nếu phía trước có path: `<path>/tek-wallet/[[...pathname]]/page.tsx` thì
125
126
  </TekWalletProvider>
126
127
  ```
127
128
 
129
+ ### ReceiveDirectly
130
+
131
+ Component cho phép hiển thị QR code và địa chỉ nhận token trực tiếp, hỗ trợ cả nhận nội bộ và nhận từ blockchain.
132
+
133
+ **Props:**
134
+
135
+ | Prop | Type | Required | Mô tả |
136
+ | ------------- | ----------------------- | -------- | ------------------------------------------------------------ |
137
+ | `tokenSlug` | `string` | ✅ | Slug của token muốn nhận |
138
+ | `method` | `ReceiveDirectlyMethod` | ✅ | Phương thức nhận: `RECEIVE_INTERNAL` hoặc `RECEIVE_EXTERNAL` |
139
+ | `networkSlug` | `string` | ❌ | Slug của network (bỏ qua nếu muốn cho user chọn network) |
140
+ | `amount` | `string \| number` | ❌ | Số lượng token muốn nhận (hiển thị trong QR code) |
141
+ | `userInfo` | `object` | ❌ | Thông tin người nhận để hiển thị |
142
+
143
+ **Ref Methods:**
144
+
145
+ | Method | Mô tả |
146
+ | ------- | ---------- |
147
+ | `open` | Mở modal |
148
+ | `close` | Đóng modal |
149
+
150
+ **Enum ReceiveDirectlyMethod:**
151
+
152
+ ```typescript
153
+ enum ReceiveDirectlyMethod {
154
+ RECEIVE_INTERNAL = "Internal Transfer", // Nhận token nội bộ
155
+ RECEIVE_EXTERNAL = "Blockchain Deposit", // Nhận token từ blockchain
156
+ }
157
+ ```
158
+
159
+ **Ví dụ 1: Nhận token nội bộ (Internal Transfer)**
160
+
161
+ ```jsx
162
+ import { ReceiveDirectly, ReceiveDirectlyMethod } from "tek-wallet";
163
+ import { useRef } from "react";
164
+
165
+ function MyComponent() {
166
+ const receiveRef = useRef(null);
167
+
168
+ return (
169
+ <>
170
+ <Button onClick={() => receiveRef.current?.open()}>Nhận USDT nội bộ</Button>
171
+
172
+ <ReceiveDirectly
173
+ ref={receiveRef}
174
+ tokenSlug="usdt"
175
+ method={ReceiveDirectlyMethod.RECEIVE_INTERNAL}
176
+ amount={100}
177
+ userInfo={{
178
+ nickname: "John Doe",
179
+ username: "@johndoe",
180
+ avatar: "https://example.com/avatar.jpg",
181
+ }}
182
+ />
183
+ </>
184
+ );
185
+ }
186
+ ```
187
+
188
+ **Ví dụ 2: Nhận token từ blockchain (Blockchain Deposit)**
189
+
190
+ ```jsx
191
+ import { ReceiveDirectly, ReceiveDirectlyMethod } from "tek-wallet";
192
+ import { useRef } from "react";
193
+
194
+ function MyComponent() {
195
+ const receiveRef = useRef(null);
196
+
197
+ return (
198
+ <>
199
+ <Button onClick={() => receiveRef.current?.open()}>Nhận USDT từ blockchain</Button>
200
+
201
+ {/* Cách 1: Chỉ định network cụ thể */}
202
+ <ReceiveDirectly
203
+ ref={receiveRef}
204
+ tokenSlug="usdt"
205
+ method={ReceiveDirectlyMethod.RECEIVE_EXTERNAL}
206
+ networkSlug="trc20"
207
+ />
208
+
209
+ {/* Cách 2: Cho phép user chọn network */}
210
+ <ReceiveDirectly
211
+ ref={receiveRef}
212
+ tokenSlug="usdt"
213
+ method={ReceiveDirectlyMethod.RECEIVE_EXTERNAL}
214
+ // Không truyền networkSlug - user sẽ chọn network
215
+ />
216
+ </>
217
+ );
218
+ }
219
+ ```
220
+
221
+ **Ví dụ 3: Sử dụng với trigger children**
222
+
223
+ ```jsx
224
+ <ReceiveDirectly tokenSlug="usdt" method={ReceiveDirectlyMethod.RECEIVE_INTERNAL}>
225
+ <Button>Click để nhận USDT</Button>
226
+ </ReceiveDirectly>
227
+ ```
228
+
229
+ **Lưu ý:**
230
+
231
+ - 🔸 Khi sử dụng `RECEIVE_INTERNAL`, không cần truyền `networkSlug`
232
+ - 🔸 Khi sử dụng `RECEIVE_EXTERNAL` mà không truyền `networkSlug`, user sẽ được yêu cầu chọn network
233
+ - 🔸 Component tự động validate token và network, hiển thị lỗi nếu không hợp lệ
234
+ - 🔸 QR code được tạo tự động dựa trên method và các thông tin được truyền vào
235
+ - 🔸 Với Internal Transfer, QR code chứa thông tin JSON để xử lý chuyển khoản nội bộ
236
+ - 🔸 Với Blockchain Deposit, QR code chứa địa chỉ blockchain wallet
237
+
128
238
  ---
129
239
 
130
240
  ## 📊 States
@@ -7,7 +7,6 @@ export * from "./views/GetSeedPhraseWalletView";
7
7
  export * from "./views/ImportWalletView";
8
8
  export * from "./ui/Fees";
9
9
  export * from "./ui/ConfirmTransaction";
10
- export * from "./ui/SwapFunction";
11
10
  export * from "./ui/IncomeWallet";
12
11
  export * from "./ui/TransferConfirmation";
13
12
  export * from "./ui/Formatter";
@@ -24,3 +23,5 @@ export * from "./views/SwapView";
24
23
  export * from "./views/ActivityView";
25
24
  export * from "./views/DetailActivityView";
26
25
  export * from "./views/SettingView";
26
+ export * from "./ui/ReceiveFunction";
27
+ export * from "./ui/ReceiveDirectly";
@@ -23,7 +23,6 @@ __exportStar(require("./views/GetSeedPhraseWalletView"), exports);
23
23
  __exportStar(require("./views/ImportWalletView"), exports);
24
24
  __exportStar(require("./ui/Fees"), exports);
25
25
  __exportStar(require("./ui/ConfirmTransaction"), exports);
26
- __exportStar(require("./ui/SwapFunction"), exports);
27
26
  __exportStar(require("./ui/IncomeWallet"), exports);
28
27
  __exportStar(require("./ui/TransferConfirmation"), exports);
29
28
  __exportStar(require("./ui/Formatter"), exports);
@@ -40,3 +39,5 @@ __exportStar(require("./views/SwapView"), exports);
40
39
  __exportStar(require("./views/ActivityView"), exports);
41
40
  __exportStar(require("./views/DetailActivityView"), exports);
42
41
  __exportStar(require("./views/SettingView"), exports);
42
+ __exportStar(require("./ui/ReceiveFunction"), exports);
43
+ __exportStar(require("./ui/ReceiveDirectly"), exports);
@@ -66,14 +66,14 @@ var react_1 = require("react");
66
66
  var StatusDisplay_1 = require("../../ui/StatusDisplay");
67
67
  var StatusDisplay_2 = __importDefault(require("../../ui/StatusDisplay"));
68
68
  var material_1 = require("@mui/material");
69
- var ThemeProvider_1 = require("../../../providers/ThemeProvider");
69
+ var mui_1 = require("../../../theme/mui");
70
70
  var AppBackDrop_1 = __importDefault(require("../../ui/AppBackDrop"));
71
71
  var react_simple_pull_to_refresh_1 = __importDefault(require("react-simple-pull-to-refresh"));
72
72
  var Refresh_1 = __importDefault(require("../../ui/Atoms/Refresh"));
73
73
  var ChildPageLayout = (0, react_1.forwardRef)(function (props, ref) {
74
74
  var header = props.header, footer = props.footer, children = props.children, sx = props.sx, className = props.className, classNames = props.classNames, statusMessage = props.statusMessage, sxs = props.sxs, pullToRefreshProps = props.pullToRefreshProps, rest = __rest(props, ["header", "footer", "children", "sx", "className", "classNames", "statusMessage", "sxs", "pullToRefreshProps"]);
75
75
  var _a = (0, react_1.useState)(StatusDisplay_1.StatusDisplayType.Normal), status = _a[0], setStatus = _a[1];
76
- var theme = (0, ThemeProvider_1.useTheme)();
76
+ var theme = (0, mui_1.useTheme)();
77
77
  var _b = pullToRefreshProps || {}, onRefresh = _b.onRefresh, isPullable = _b.isPullable, restPullToRefreshProps = __rest(_b, ["onRefresh", "isPullable"]);
78
78
  (0, react_1.useImperativeHandle)(ref, function () {
79
79
  return {
@@ -96,7 +96,7 @@ var ChildPageLayout = (0, react_1.forwardRef)(function (props, ref) {
96
96
  return [2 /*return*/, Promise.all([new Promise(function (resolve) { return setTimeout(resolve, 1000); }), onRefresh === null || onRefresh === void 0 ? void 0 : onRefresh()])]; // for user feel data is loading
97
97
  });
98
98
  }); };
99
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, __assign({ ref: ref, sx: __assign({ height: "100%", width: "100%", display: "grid", gridTemplateRows: "auto 1fr auto", position: "relative", overflow: "hidden", backgroundColor: theme.palette.background.white }, sx), className: className }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ width: "100%" }, sxs === null || sxs === void 0 ? void 0 : sxs.header), className: classNames === null || classNames === void 0 ? void 0 : classNames.header, children: header }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ height: "100%", width: "100%", overflowX: "hidden", overflowY: "auto" }, sxs === null || sxs === void 0 ? void 0 : sxs.body), className: classNames === null || classNames === void 0 ? void 0 : classNames.body, children: [!!isPullable && ((0, jsx_runtime_1.jsx)(react_simple_pull_to_refresh_1.default, __assign({ pullingContent: null, refreshingContent: ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { display: "flex", alignItems: "center", justifyContent: "center", pt: 3 }, children: (0, jsx_runtime_1.jsx)(Refresh_1.default, {}) })) }, restPullToRefreshProps, { onRefresh: handleRefresh, children: children }))), !isPullable && (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ width: "100%" }, sxs === null || sxs === void 0 ? void 0 : sxs.footer), className: classNames === null || classNames === void 0 ? void 0 : classNames.footer, children: footer }), status !== StatusDisplay_1.StatusDisplayType.Normal && ((0, jsx_runtime_1.jsx)(AppBackDrop_1.default, { open: true, hideProgress: true, message: (0, jsx_runtime_1.jsx)(StatusDisplay_2.default, { status: status, statusMessage: statusMessage === null || statusMessage === void 0 ? void 0 : statusMessage[status] }) }))] })));
99
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, __assign({ ref: ref, sx: __assign({ height: "100%", width: "100%", display: "grid", gridTemplateRows: "auto 1fr auto", position: "relative", overflow: "hidden", backgroundColor: theme.palette.background.default }, sx), className: className }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ width: "100%" }, sxs === null || sxs === void 0 ? void 0 : sxs.header), className: classNames === null || classNames === void 0 ? void 0 : classNames.header, children: header }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ height: "100%", width: "100%", overflowX: "hidden", overflowY: "auto" }, sxs === null || sxs === void 0 ? void 0 : sxs.body), className: classNames === null || classNames === void 0 ? void 0 : classNames.body, children: [!!isPullable && ((0, jsx_runtime_1.jsx)(react_simple_pull_to_refresh_1.default, __assign({ pullingContent: null, refreshingContent: ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: { display: "flex", alignItems: "center", justifyContent: "center", pt: 3 }, children: (0, jsx_runtime_1.jsx)(Refresh_1.default, {}) })) }, restPullToRefreshProps, { onRefresh: handleRefresh, children: children }))), !isPullable && (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: children })] }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({ width: "100%" }, sxs === null || sxs === void 0 ? void 0 : sxs.footer), className: classNames === null || classNames === void 0 ? void 0 : classNames.footer, children: footer }), status !== StatusDisplay_1.StatusDisplayType.Normal && ((0, jsx_runtime_1.jsx)(AppBackDrop_1.default, { open: true, hideProgress: true, message: (0, jsx_runtime_1.jsx)(StatusDisplay_2.default, { status: status, statusMessage: statusMessage === null || statusMessage === void 0 ? void 0 : statusMessage[status] }) }))] })));
100
100
  });
101
101
  ChildPageLayout.displayName = "ChildPageLayout";
102
102
  exports.default = ChildPageLayout;
@@ -14,9 +14,9 @@ var __assign = (this && this.__assign) || function () {
14
14
  Object.defineProperty(exports, "__esModule", { value: true });
15
15
  var jsx_runtime_1 = require("react/jsx-runtime");
16
16
  var material_1 = require("@mui/material");
17
- var ThemeProvider_1 = require("../../../providers/ThemeProvider");
17
+ var mui_1 = require("../../../theme/mui");
18
18
  var DefaultPageLayout = function (props) {
19
- var theme = (0, ThemeProvider_1.useTheme)();
20
- return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.pagePadding), { minHeight: "100%", width: "100%" }), props.sx), children: props.children }));
19
+ var theme = (0, mui_1.useTheme)();
20
+ return ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.styleMixins.pagePadding), { minHeight: "100%", width: "100%" }), props.sx), children: props.children }));
21
21
  };
22
22
  exports.default = DefaultPageLayout;
@@ -54,7 +54,7 @@ exports.Status = void 0;
54
54
  var jsx_runtime_1 = require("react/jsx-runtime");
55
55
  var material_1 = require("@mui/material");
56
56
  var link_1 = __importDefault(require("next/link"));
57
- var ThemeProvider_1 = require("../../../providers/ThemeProvider");
57
+ var mui_1 = require("../../../theme/mui");
58
58
  var getIcon_1 = __importDefault(require("../../../utils/getIcon"));
59
59
  var EmptyData_1 = __importDefault(require("../EmptyData"));
60
60
  var ActivityItem_1 = __importDefault(require("../ActivityItem"));
@@ -76,7 +76,7 @@ var prefix = "activities_";
76
76
  function ActivitiesTypeSlice(props) {
77
77
  var _this = this;
78
78
  var _a, _b;
79
- var theme = (0, ThemeProvider_1.useTheme)();
79
+ var theme = (0, mui_1.useTheme)();
80
80
  var router = (0, useCustomRouter_1.default)();
81
81
  var _c = (0, useActivities_1.default)(), activities = _c.activities, loadActivities = _c.loadActivities, loadOutActivityType = _c.loadOutActivityType, refreshActivities = _c.refreshActivities;
82
82
  var type = props.type, isActive = props.isActive, limitItems = props.limitItems, sx = props.sx, smartListProps = props.smartListProps, useAction = props.useAction;
@@ -110,20 +110,24 @@ function ActivitiesTypeSlice(props) {
110
110
  };
111
111
  return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign({ width: "100%", height: "100%" }, sx), children: [status === Status.Loading && ((0, jsx_runtime_1.jsx)(WaitingData_1.default, { sx: {
112
112
  marginBottom: "auto",
113
- p: theme.mixins.customPadding.p16,
114
- }, numberOfSkeleton: 8 })), (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(SmartList_1.default, { loadMoreData: loadMore, sx: __assign({ px: theme.mixins.customPadding.p16 }, smartListProps === null || smartListProps === void 0 ? void 0 : smartListProps.sx), hasMore: !loadOutActivityType[type.slug] &&
113
+ p: theme.styleMixins.customPadding.p16,
114
+ }, numberOfSkeleton: 8 })), (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsxs)(SmartList_1.default, { loadMoreData: loadMore, sx: __assign({ px: theme.styleMixins.customPadding.p16 }, smartListProps === null || smartListProps === void 0 ? void 0 : smartListProps.sx), hasMore: !loadOutActivityType[type.slug] &&
115
115
  ((activitiesByType === null || activitiesByType === void 0 ? void 0 : activitiesByType.length) || 0) < (limitItems || Infinity), loadingComponent: status === Status.Filled && ((0, jsx_runtime_1.jsx)(WaitingData_1.default, { numberOfSkeleton: 4, sx: {
116
- marginTop: theme.mixins.customMargin.m12,
117
- } })), bodySx: __assign({ pb: theme.mixins.customPadding.p32, pt: theme.mixins.customPadding.p16 }, smartListProps === null || smartListProps === void 0 ? void 0 : smartListProps.bodySx), pullToRefreshProps: {
116
+ marginTop: theme.styleMixins.customMargin.m12,
117
+ } })), bodySx: __assign({ pb: theme.styleMixins.customPadding.p32, pt: theme.styleMixins.customPadding.p16 }, smartListProps === null || smartListProps === void 0 ? void 0 : smartListProps.bodySx), pullToRefreshProps: {
118
118
  isPullable: true,
119
119
  onRefresh: function () { return __awaiter(_this, void 0, void 0, function () {
120
120
  return __generator(this, function (_a) {
121
121
  return [2 /*return*/, refreshActivities(type.slug)];
122
122
  });
123
123
  }); },
124
- }, children: [status === Status.Empty && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { action: useAction && type.slug === const_1.ACTIVITIES_TYPE_ALL.slug ? gotoHome : undefined, actionText: "Start your journey", sx: { marginBottom: "auto", marginTop: "6rem", px: theme.mixins.customPadding.p16 }, icon: (0, getIcon_1.default)(prefix + "empty_" + type.slug), description: type.slug === const_1.ACTIVITIES_TYPE_ALL.slug
124
+ }, children: [status === Status.Empty && ((0, jsx_runtime_1.jsx)(EmptyData_1.default, { action: useAction && type.slug === const_1.ACTIVITIES_TYPE_ALL.slug ? gotoHome : undefined, actionText: "Start your journey", sx: {
125
+ marginBottom: "auto",
126
+ marginTop: "6rem",
127
+ px: theme.styleMixins.customPadding.p16,
128
+ }, icon: (0, getIcon_1.default)(prefix + "empty_" + type.slug), description: type.slug === const_1.ACTIVITIES_TYPE_ALL.slug
125
129
  ? "You haven't any activity yet"
126
- : "No ".concat((_a = type.name) === null || _a === void 0 ? void 0 : _a.toLowerCase(), " activity") })), status === Status.Filled && ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g12 }), children: (_b = activitiesByType === null || activitiesByType === void 0 ? void 0 : activitiesByType.slice(0, limitItems)) === null || _b === void 0 ? void 0 : _b.map(function (activity, index) {
130
+ : "No ".concat((_a = type.name) === null || _a === void 0 ? void 0 : _a.toLowerCase(), " activity") })), status === Status.Filled && ((0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g12 }), children: (_b = activitiesByType === null || activitiesByType === void 0 ? void 0 : activitiesByType.slice(0, limitItems)) === null || _b === void 0 ? void 0 : _b.map(function (activity, index) {
127
131
  if (!activity)
128
132
  return null;
129
133
  var dataAsJson = JSON.stringify(activity);
@@ -16,7 +16,6 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
16
16
  Object.defineProperty(exports, "__esModule", { value: true });
17
17
  var jsx_runtime_1 = require("react/jsx-runtime");
18
18
  var material_1 = require("@mui/material");
19
- var ThemeProvider_1 = require("../../../providers/ThemeProvider");
20
19
  var type_1 = require("../../../services/axios/get-activities-service/type");
21
20
  var Icon_1 = __importDefault(require("../Icon"));
22
21
  var react_1 = require("react");
@@ -27,8 +26,9 @@ var formatDate_1 = __importDefault(require("../../../utils/formatDate"));
27
26
  var CopyTextComponent_1 = __importDefault(require("../CopyTextComponent"));
28
27
  var useWalletData_1 = __importDefault(require("../../../hooks/useWalletData"));
29
28
  var SvgPath_1 = require("../SvgPath");
29
+ var mui_1 = require("../../../theme/mui");
30
30
  function ActivityDetail(props) {
31
- var theme = (0, ThemeProvider_1.useTheme)();
31
+ var theme = (0, mui_1.useTheme)();
32
32
  var activityData = props.activityData;
33
33
  var masterWallet = (0, useWalletData_1.default)().masterWallet;
34
34
  var status = activityData === null || activityData === void 0 ? void 0 : activityData.transaction_status;
@@ -64,37 +64,35 @@ function ActivityDetail(props) {
64
64
  var getStatusColor = (0, react_1.useCallback)(function () {
65
65
  switch (status) {
66
66
  case type_1.TransactionStatus.Processing:
67
- return theme.palette.text.loadingStatus;
67
+ return theme.palette.text.primary;
68
68
  case type_1.TransactionStatus.Success:
69
- return theme.palette.text.successStatus;
69
+ return theme.palette.success.main;
70
70
  case type_1.TransactionStatus.Failed:
71
- return theme.palette.text.warningStatus;
71
+ return theme.palette.error.main;
72
72
  default:
73
73
  return theme.palette.text.primary;
74
74
  }
75
75
  }, [status, theme]);
76
76
  var getAmountColor = (0, react_1.useCallback)(function () {
77
77
  if (isIncrease)
78
- return theme.palette.text.successStatus;
79
- return theme.palette.text.black;
78
+ return theme.palette.success.main;
79
+ return theme.palette.text.primary;
80
80
  }, [isIncrease, theme]);
81
81
  if (!activityData)
82
82
  return null;
83
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g16, alignItems: "center" }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { filter: "drop-shadow(0 0 0.5rem #00000016)" }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: currency === null || currency === void 0 ? void 0 : currency.link, width: 64, sx: {
84
- borderRadius: theme.mixins.customRadius.full,
85
- border: isSwap ? "0.25rem white solid" : "none",
86
- // boxShadow: "0 0 20px 2px #00000029",
87
- // ml: "-0.5rem",
83
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g16, alignItems: "center" }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { filter: "drop-shadow(0 0 0.5rem ".concat((0, material_1.alpha)(theme.palette.background.reverse, 0.5)) }), children: [(0, jsx_runtime_1.jsx)(Icon_1.default, { src: currency === null || currency === void 0 ? void 0 : currency.link, width: 64, sx: {
84
+ borderRadius: theme.styleMixins.customRadius.full,
85
+ border: isSwap ? "0.25rem ".concat(theme.palette.background.default, " solid") : "none",
88
86
  } }), (swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.link) && ((0, jsx_runtime_1.jsx)(Icon_1.default, { src: swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.link, width: 64, sx: {
89
- borderRadius: theme.mixins.customRadius.full,
90
- border: isSwap ? "0.25rem white solid" : "none",
87
+ borderRadius: theme.styleMixins.customRadius.full,
88
+ border: isSwap ? "0.25rem ".concat(theme.palette.background.default, " solid") : "none",
91
89
  ml: "-1rem",
92
- } }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { width: "fit-content", gap: theme.mixins.gaps.g4, alignItems: "center" }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { width: "fit-content" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontWeight: theme.typography.fontWeight700, fontSize: theme.typography.fontSize24, color: getAmountColor() }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: isIncrease ? "+" : "-", value: activityData.amount, unit: " ".concat(currency === null || currency === void 0 ? void 0 : currency.name) }) }), isSwap && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontWeight: theme.typography.fontWeight700, fontSize: theme.typography.fontSize24, color: theme.palette.text.successStatus }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: "+", value: swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.swap_total_amount, unit: " ".concat(swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.name) }) }))] }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: (0, formatDate_1.default)(activityData.date_created, true) }), status !== type_1.TransactionStatus.Success && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [status === type_1.TransactionStatus.Processing && ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, { sx: {
93
- color: theme.palette.text.loadingStatus,
94
- }, size: 16 })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
90
+ } }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { width: "fit-content", gap: theme.styleMixins.gaps.g4, alignItems: "center" }), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { width: "fit-content" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.value), { fontWeight: theme.typography.fontWeight700, fontSize: theme.typography.fontSize24, color: getAmountColor() }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: isIncrease ? "+" : "-", value: activityData.amount, unit: " ".concat(currency === null || currency === void 0 ? void 0 : currency.name) }) }), isSwap && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.value), { fontWeight: theme.typography.fontWeight700, fontSize: theme.typography.fontSize24, color: theme.palette.success.main }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: "+", value: swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.swap_total_amount, unit: " ".concat(swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.name) }) }))] }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.valueDescription), children: (0, formatDate_1.default)(activityData.date_created, true) }), status !== type_1.TransactionStatus.Success && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g4, color: getStatusColor() }), children: [status === type_1.TransactionStatus.Processing && ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, { sx: {
91
+ color: "inherit",
92
+ }, size: "1rem" })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
95
93
  fontSize: theme.typography.fontSize12,
96
94
  textTransform: "capitalize",
97
- color: getStatusColor(),
98
- }, children: status })] }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.paper), { p: 0, width: "100%" }), children: [isReceive && ((0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: activityData === null || activityData === void 0 ? void 0 : activityData.from_address, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "From" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g24, alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { wordBreak: "break-all", textAlign: "left" }), children: activityData === null || activityData === void 0 ? void 0 : activityData.from_address }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 16, height: 16, ml: "auto" }, children: SvgPath_1.IC_COPY })] })] }) })), !!toAddress && ((0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: toAddress, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "Recipient address" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g24, alignItems: "center" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { wordBreak: "break-all", textAlign: "left" }), children: toAddress }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: 16, height: 16, ml: "auto" }, children: SvgPath_1.IC_COPY })] })] }) })), !!message && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.mixins.valueDescription), children: "Message" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g24, alignItems: "center" }), children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { textAlign: "left" }), children: message }) })] }))] })] }));
95
+ color: "inherit",
96
+ }, children: status })] }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.paper), { p: 0, bgcolor: "transparent", width: "100%" }), children: [isReceive && ((0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: activityData === null || activityData === void 0 ? void 0 : activityData.from_address, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.valueDescription), children: "From" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g24, alignItems: "center", color: "text.primary" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.value), { wordBreak: "break-all", textAlign: "left" }), children: activityData === null || activityData === void 0 ? void 0 : activityData.from_address }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "1rem", height: "1rem", ml: "auto" }, children: SvgPath_1.IC_COPY })] })] }) })), !!toAddress && ((0, jsx_runtime_1.jsx)(CopyTextComponent_1.default, { value: toAddress, children: (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.valueDescription), children: "Recipient address" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g24, alignItems: "center", color: "text.primary" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.value), { wordBreak: "break-all", textAlign: "left" }), children: toAddress }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { width: "1rem", height: "1rem", ml: "auto" }, children: SvgPath_1.IC_COPY })] })] }) })), !!message && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign({}, theme.styleMixins.valueDescription), children: "Message" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g24, alignItems: "center" }), children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.value), { textAlign: "left" }), children: message }) })] }))] })] }));
99
97
  }
100
98
  exports.default = ActivityDetail;
@@ -35,10 +35,10 @@ var Text_1 = __importDefault(require("../Text"));
35
35
  var Formatter_1 = __importDefault(require("../Formatter"));
36
36
  var formatDate_1 = __importDefault(require("../../../utils/formatDate"));
37
37
  var compactWalletAddress_1 = __importDefault(require("../../../utils/compactWalletAddress"));
38
- var providers_1 = require("../../../providers");
38
+ var mui_1 = require("../../../theme/mui");
39
39
  function ActivityItem(props) {
40
40
  var sx = props.sx, data = props.data, rest = __rest(props, ["sx", "data"]);
41
- var theme = (0, providers_1.useTheme)();
41
+ var theme = (0, mui_1.useTheme)();
42
42
  var activityData = (0, react_1.useMemo)(function () {
43
43
  if (!data)
44
44
  return undefined;
@@ -76,36 +76,36 @@ function ActivityItem(props) {
76
76
  var getStatusColor = (0, react_1.useCallback)(function () {
77
77
  switch (status) {
78
78
  case type_1.TransactionStatus.Processing:
79
- return theme.palette.text.loadingStatus;
79
+ return theme.palette.text.primary;
80
80
  case type_1.TransactionStatus.Success:
81
- return theme.palette.text.successStatus;
81
+ return theme.palette.success.main;
82
82
  case type_1.TransactionStatus.Failed:
83
- return theme.palette.text.warningStatus;
83
+ return theme.palette.error.main;
84
84
  default:
85
85
  return theme.palette.text.primary;
86
86
  }
87
87
  }, [status, theme]);
88
88
  var getAmountColor = (0, react_1.useCallback)(function () {
89
89
  if (isIncrease)
90
- return theme.palette.text.successStatus;
91
- return theme.palette.text.black;
90
+ return theme.palette.success.main;
91
+ return theme.palette.text.primary;
92
92
  }, [isIncrease, theme]);
93
93
  if (!activityData)
94
94
  return null;
95
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, __assign({ sx: __assign(__assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g8, backgroundColor: theme.palette.background.tertiary, borderRadius: theme.mixins.customRadius.r16, backdropFilter: "blur(12px)", p: theme.mixins.customPadding.p16, flexGrow: "unset" }), sx) }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
95
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, __assign({ sx: __assign(__assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g8, backgroundColor: theme.palette.background.tertiary, borderRadius: theme.styleMixins.customRadius.r16, backdropFilter: "blur(12px)", p: theme.styleMixins.customPadding.p16, flexGrow: "unset" }), sx) }, rest, { children: [(0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
96
96
  width: "fit-content",
97
97
  height: "fit-content",
98
- }, children: (0, jsx_runtime_1.jsx)(Icon_1.default, { src: type === null || type === void 0 ? void 0 : type.link, width: 28, sx: { borderRadius: theme.mixins.customRadius.full } }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { width: "fit-content", gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.activityTitle, children: type === null || type === void 0 ? void 0 : type.name }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.mixins.activityDescription, children: descriptionElement }), status !== type_1.TransactionStatus.Success && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [status === type_1.TransactionStatus.Processing && ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 12, sx: {
99
- color: theme.palette.text.loadingStatus,
98
+ }, children: (0, jsx_runtime_1.jsx)(Icon_1.default, { src: type === null || type === void 0 ? void 0 : type.link, width: 28, sx: { borderRadius: theme.styleMixins.customRadius.full } }) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { width: "fit-content", gap: theme.styleMixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.styleMixins.activityTitle, children: type === null || type === void 0 ? void 0 : type.name }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: theme.styleMixins.activityDescription, children: descriptionElement }), status !== type_1.TransactionStatus.Success && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g4, color: getStatusColor() }), children: [status === type_1.TransactionStatus.Processing && ((0, jsx_runtime_1.jsx)(material_1.CircularProgress, { size: 12, sx: {
99
+ color: "inherit",
100
100
  } })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
101
101
  fontSize: theme.typography.fontSize12,
102
102
  textTransform: "capitalize",
103
- color: getStatusColor(),
104
- }, children: status })] }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.column), { gap: theme.mixins.gaps.g2, width: "fit-content", alignItems: "flex-end", pointerEvents: "none", ml: "auto" }), children: [slug === type_1.TransactionSlug.SWAP && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { fontWeight: theme.typography.fontWeight700, fontSize: theme.typography.fontSize13, color: theme.palette.text.successStatus, textAlign: "right" }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: "+", value: swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.swap_total_amount, unit: " ".concat(swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.name) }) })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
103
+ color: "inherit",
104
+ }, children: status })] }))] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.column), { gap: theme.styleMixins.gaps.g2, width: "fit-content", alignItems: "flex-end", pointerEvents: "none", ml: "auto" }), children: [slug === type_1.TransactionSlug.SWAP && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.value), { fontWeight: theme.typography.fontWeight700, fontSize: theme.typography.fontSize13, color: theme.palette.success.main, textAlign: "right" }), children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: "+", value: swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.swap_total_amount, unit: " ".concat(swapToCurrency === null || swapToCurrency === void 0 ? void 0 : swapToCurrency.name) }) })), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
105
105
  fontSize: theme.typography.fontSize13,
106
106
  fontWeight: theme.typography.fontWeight700,
107
107
  color: getAmountColor(),
108
108
  textAlign: "right",
109
- }, children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: isIncrease ? "+" : "-", value: activityData.amount, unit: " ".concat(currency === null || currency === void 0 ? void 0 : currency.name) }) }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.valueDescription), { textAlign: "right" }), children: (0, formatDate_1.default)(activityData.date_created) })] })] })));
109
+ }, children: (0, jsx_runtime_1.jsx)(Formatter_1.default, { start: isIncrease ? "+" : "-", value: activityData.amount, unit: " ".concat(currency === null || currency === void 0 ? void 0 : currency.name) }) }), (0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.valueDescription), { textAlign: "right" }), children: (0, formatDate_1.default)(activityData.date_created) })] })] })));
110
110
  }
111
111
  exports.default = ActivityItem;
@@ -20,7 +20,7 @@ var AnalyticGroup_1 = __importDefault(require("../AnalyticGroup"));
20
20
  var TimeFilter_1 = __importDefault(require("../TimeFilter"));
21
21
  var DelayMounted_1 = __importDefault(require("../DelayMounted"));
22
22
  var material_1 = require("@mui/material");
23
- var ThemeProvider_1 = require("../../../providers/ThemeProvider");
23
+ var mui_1 = require("../../../theme/mui");
24
24
  var NeonLineChart_1 = __importDefault(require("../NeonLineChart"));
25
25
  var SvgPath_1 = require("../SvgPath");
26
26
  var user_1 = __importDefault(require("../../../store/user"));
@@ -73,7 +73,7 @@ var AmountGroupAndChart = function (props) {
73
73
  var defaultTimeRange = (0, user_1.default)(function (state) { return state.settings.balance.timeRangeTracking; });
74
74
  var _a = (0, react_1.useState)(false), expandAreaChart = _a[0], setExpandAreaChart = _a[1];
75
75
  var _b = (0, react_1.useState)(), timeRangeData = _b[0], setTimeRangeData = _b[1];
76
- var theme = (0, ThemeProvider_1.useTheme)();
76
+ var theme = (0, mui_1.useTheme)();
77
77
  var isShowBalance = (0, user_1.default)(function (state) { return state.settings.balance.isShowBalance; });
78
78
  var analytic = (0, balance_1.default)(function (state) { return state.analytic; });
79
79
  var setTimeRangeTracking = (0, user_1.default)(function (state) { return state.setTimeRangeTracking; });
@@ -112,7 +112,7 @@ var AmountGroupAndChart = function (props) {
112
112
  width: "100%",
113
113
  height: "fit-content",
114
114
  transition: "all 500ms ease-in-out",
115
- my: theme.mixins.customMargin.m3,
115
+ my: theme.styleMixins.customMargin.m3,
116
116
  }, children: (0, jsx_runtime_1.jsx)(DelayMounted_1.default, { delay: 800, children: (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { onClick: toggleExpand, sx: {
117
117
  position: "absolute",
118
118
  right: 0,
@@ -18,24 +18,25 @@ var jsx_runtime_1 = require("react/jsx-runtime");
18
18
  var Text_1 = __importDefault(require("../Text"));
19
19
  var Formatter_1 = __importDefault(require("../Formatter"));
20
20
  var material_1 = require("@mui/material");
21
- var providers_1 = require("../../../providers");
21
+ var mui_1 = require("../../../theme/mui");
22
22
  var SvgPath_1 = require("../SvgPath");
23
23
  var TimeFilter_1 = require("../TimeFilter");
24
24
  var user_1 = __importDefault(require("../../../store/user"));
25
25
  var balance_1 = __importDefault(require("../../../store/balance"));
26
26
  var AnalyticGroup = function (props) {
27
27
  var sx = props.sx, timeRange = props.timeRange;
28
- var theme = (0, providers_1.useTheme)();
28
+ var theme = (0, mui_1.useTheme)();
29
29
  var isShowBalance = (0, user_1.default)(function (state) { return state.settings.balance.isShowBalance; });
30
30
  var toggleShowBalance = (0, user_1.default)(function (state) { return state.toggleShowBalance; });
31
31
  var totalBalanceInUSD = (0, balance_1.default)(function (state) { return state.totalBalanceInUSD; });
32
32
  var analytic = (0, balance_1.default)(function (state) { return state.analytic; });
33
- return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.mixins.row), { justifyContent: "space-between", alignItems: "flex-start" }), sx), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g6, position: "relative" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
33
+ return ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign(__assign({}, theme.styleMixins.row), { justifyContent: "space-between", alignItems: "flex-start" }), sx), children: [(0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g6, position: "relative" }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
34
34
  fontSize: theme.typography.fontSize15,
35
35
  fontWeight: theme.typography.fontWeight500,
36
- color: theme.palette.text.accent2,
36
+ color: theme.palette.text.secondary,
37
37
  }, children: "Total Amount" }), (0, jsx_runtime_1.jsxs)(material_1.Box, { onClick: toggleShowBalance, sx: {
38
38
  position: "relative",
39
+ color: theme.palette.text.secondary,
39
40
  }, children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { cursor: "pointer", width: 20, height: 20 }, children: SvgPath_1.IC_NO_SEE }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: {
40
41
  position: "absolute",
41
42
  left: "50%",
@@ -43,52 +44,51 @@ var AnalyticGroup = function (props) {
43
44
  top: "50%",
44
45
  height: !isShowBalance ? "80%" : "0px",
45
46
  transition: "height 0.2s ease-in-out",
46
- backgroundColor: theme.palette.text.accent2,
47
+ backgroundColor: "currentColor",
47
48
  transform: "translate(calc(-50% + 1px), calc(-50% + 1px)) rotate(45deg)",
48
49
  transformOrigin: "center center",
49
50
  } })] })] }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: {
50
51
  display: "flex",
51
52
  flexDirection: "column",
52
53
  alignItems: "flex-end",
53
- gap: theme.mixins.gaps.g6,
54
+ gap: theme.styleMixins.gaps.g6,
54
55
  fontSize: theme.typography.fontSize12,
55
- }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign(__assign({}, theme.mixins.row), theme.mixins.value), { alignItems: "baseline", fontSize: theme.typography.fontSize20, gap: theme.mixins.gaps.g2 }), children: isShowBalance ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Formatter_1.default, { sx: { fontWeight: theme.typography.fontWeight700 }, value: totalBalanceInUSD, unit: "USD", hideUnitOutSide: true }), !!totalBalanceInUSD && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g2 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
56
+ }, children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: __assign(__assign(__assign({}, theme.styleMixins.row), theme.styleMixins.value), { alignItems: "baseline", fontSize: theme.typography.fontSize20, gap: theme.styleMixins.gaps.g2 }), children: isShowBalance ? ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(Formatter_1.default, { sx: { fontWeight: theme.typography.fontWeight700 }, value: totalBalanceInUSD, unit: "USD", hideUnitOutSide: true }), !!totalBalanceInUSD && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g2 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
56
57
  fontWeight: theme.typography.fontWeight400,
57
58
  fontSize: "0.8em",
58
59
  }, children: "$" }), false && ((0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { cursor: "pointer", width: 8, height: 8 }, children: SvgPath_1.ARROW_DROP_DOWN }))] }))] })) : ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
59
60
  fontSize: theme.typography.fontSize24,
60
61
  fontWeight: theme.typography.fontWeight700,
61
- color: theme.palette.text.black,
62
- }, children: "******" })) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [!!timeRange && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
62
+ color: theme.palette.text.primary,
63
+ }, children: "******" })) }), (0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g4 }), children: [!!timeRange && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
63
64
  fontWeight: theme.typography.fontWeight600,
64
65
  leading: theme.typography.leading140,
65
66
  fontSize: theme.typography.fontSize12,
66
67
  textTransform: "capitalize",
67
- color: theme.palette.text.accent,
68
- }, children: TimeFilter_1.TIME_FILTER_LABEL[timeRange] })), !!(analytic === null || analytic === void 0 ? void 0 : analytic.pnl) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isShowBalance && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { cursor: "pointer", width: 8, height: 8 }, children: SvgPath_1.ARROW_DROP_UP }), (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign(__assign({}, theme.mixins.value), { color: theme.palette.text.alertStatus, fontSize: theme.typography.fontSize12, fontWeight: theme.typography.fontWeight600, borderBottom: "1px dashed currentColor" }), children: [(0, jsx_runtime_1.jsx)("span", { children: (analytic === null || analytic === void 0 ? void 0 : analytic.pnl) > 0 ? "+" : "" }), " ", (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: analytic === null || analytic === void 0 ? void 0 : analytic.pnl }), " ", "(", (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: analytic === null || analytic === void 0 ? void 0 : analytic.pnl_percent, unit: "%" }), ")"] })] })), !isShowBalance && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
68
+ color: theme.palette.text.secondary,
69
+ }, children: TimeFilter_1.TIME_FILTER_LABEL[timeRange] })), !!(analytic === null || analytic === void 0 ? void 0 : analytic.pnl) && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [isShowBalance && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { cursor: "pointer", width: 8, height: 8 }, children: SvgPath_1.ARROW_DROP_UP }), (0, jsx_runtime_1.jsxs)(Text_1.default, { sx: __assign(__assign({}, theme.styleMixins.value), { fontSize: theme.typography.fontSize12, fontWeight: theme.typography.fontWeight600, borderBottom: "1px dashed currentColor" }), children: [(0, jsx_runtime_1.jsx)("span", { children: (analytic === null || analytic === void 0 ? void 0 : analytic.pnl) > 0 ? "+" : "" }), " ", (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: analytic === null || analytic === void 0 ? void 0 : analytic.pnl }), " ", "(", (0, jsx_runtime_1.jsx)(Formatter_1.default, { value: analytic === null || analytic === void 0 ? void 0 : analytic.pnl_percent, unit: "%" }), ")"] })] })), !isShowBalance && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
69
70
  fontSize: theme.typography.fontSize12,
70
71
  fontWeight: theme.typography.fontWeight600,
71
- color: theme.palette.text.accent2,
72
- display: theme.mixins.row,
72
+ color: theme.palette.text.secondary,
73
+ display: theme.styleMixins.row,
73
74
  }, children: "******" }))] }))] }), false && ((0, jsx_runtime_1.jsxs)(jsx_runtime_1.Fragment, { children: [(0, jsx_runtime_1.jsx)(material_1.Divider, { sx: {
74
75
  width: "110%",
75
- borderColor: "".concat(theme.palette.border.accent),
76
76
  opacity: 0.2,
77
- marginTop: theme.mixins.customMargin.m4,
78
- } }), isShowBalance && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.mixins.row), { gap: theme.mixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
77
+ marginTop: theme.styleMixins.customMargin.m4,
78
+ } }), isShowBalance && ((0, jsx_runtime_1.jsxs)(material_1.Box, { sx: __assign(__assign({}, theme.styleMixins.row), { gap: theme.styleMixins.gaps.g4 }), children: [(0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
79
79
  fontWeight: theme.typography.fontWeight500,
80
80
  leading: theme.typography.leading140,
81
81
  fontSize: theme.typography.fontSize12,
82
82
  textTransform: "capitalize",
83
- color: theme.palette.text.accent,
84
- }, children: "Profit" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.mixins.row), children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
83
+ color: theme.palette.text.secondary,
84
+ }, children: "Profit" }), (0, jsx_runtime_1.jsx)(material_1.Box, { sx: __assign({}, theme.styleMixins.row), children: (0, jsx_runtime_1.jsx)(jsx_runtime_1.Fragment, { children: (0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
85
85
  fontSize: theme.typography.fontSize12,
86
86
  fontWeight: theme.typography.fontWeight600,
87
- color: theme.palette.text.accent2,
87
+ color: theme.palette.text.secondary,
88
88
  }, children: "\u2248 250k XP" }) }) }), (0, jsx_runtime_1.jsx)(material_1.SvgIcon, { sx: { cursor: "pointer", width: 14, height: 14 }, children: SvgPath_1.IC_INFORMATION })] })), !isShowBalance && ((0, jsx_runtime_1.jsx)(Text_1.default, { sx: {
89
89
  fontSize: theme.typography.fontSize12,
90
90
  fontWeight: theme.typography.fontWeight600,
91
- color: theme.palette.text.accent2,
91
+ color: theme.palette.text.secondary,
92
92
  }, children: "******" }))] }))] })] }));
93
93
  };
94
94
  exports.default = AnalyticGroup;