@dodoex/wallet-web3-react 0.0.1-beta.0

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 (78) hide show
  1. package/babel.config.js +9 -0
  2. package/dist/index.js +72 -0
  3. package/dist/types/ClientProvider.d.ts +2 -0
  4. package/dist/types/LangProvider.d.ts +11 -0
  5. package/dist/types/WalletConnect/AccountPage.d.ts +11 -0
  6. package/dist/types/WalletConnect/ActivityList.d.ts +20 -0
  7. package/dist/types/WalletConnect/ConnectAlchemy/index.d.ts +6 -0
  8. package/dist/types/WalletConnect/ConnectAlchemy/useConnectAlchemy.d.ts +12 -0
  9. package/dist/types/WalletConnect/ConnectLedger/ErrorDialog.d.ts +4 -0
  10. package/dist/types/WalletConnect/ConnectLedger/LoadingDialog.d.ts +3 -0
  11. package/dist/types/WalletConnect/ConnectLedger/LockedDialog.d.ts +4 -0
  12. package/dist/types/WalletConnect/ConnectLedger/ProtocolDialog.d.ts +6 -0
  13. package/dist/types/WalletConnect/ConnectLedger/SelectAddressDialog.d.ts +8 -0
  14. package/dist/types/WalletConnect/ConnectLedger/SelectPathDialog.d.ts +5 -0
  15. package/dist/types/WalletConnect/ConnectLedger/helper.d.ts +2 -0
  16. package/dist/types/WalletConnect/ConnectLedger/index.d.ts +6 -0
  17. package/dist/types/WalletConnect/ConnectPage.d.ts +9 -0
  18. package/dist/types/WalletConnect/HasBalanceTokenList.d.ts +4 -0
  19. package/dist/types/WalletConnect/ReceiveTokenPage.d.ts +4 -0
  20. package/dist/types/WalletConnect/SendTokenPage.d.ts +5 -0
  21. package/dist/types/WalletConnect/WalletDialog.d.ts +6 -0
  22. package/dist/types/WalletConnectProvider.d.ts +72 -0
  23. package/dist/types/components/AddressWithLinkAndCopy.d.ts +28 -0
  24. package/dist/types/components/Dialog.d.ts +15 -0
  25. package/dist/types/components/TokenLogo.d.ts +26 -0
  26. package/dist/types/components/WalletTag.d.ts +7 -0
  27. package/dist/types/constants/localstorage.d.ts +6 -0
  28. package/dist/types/hooks/useConnectWalet.d.ts +30 -0
  29. package/dist/types/hooks/useFetchFiatPrice.d.ts +3 -0
  30. package/dist/types/hooks/useFetchTokensBalance.d.ts +14 -0
  31. package/dist/types/hooks/useHasBalanceTokenList.d.ts +21 -0
  32. package/dist/types/hooks/useTransactionList.d.ts +272 -0
  33. package/dist/types/index.d.ts +4 -0
  34. package/dist/types/utils/formatter.d.ts +20 -0
  35. package/dist/types/utils/time.d.ts +3 -0
  36. package/dist/types/utils/utils.d.ts +2 -0
  37. package/lingui.config.ts +13 -0
  38. package/locales/en.po +251 -0
  39. package/locales/en.ts +1 -0
  40. package/locales/zh.po +249 -0
  41. package/locales/zh.ts +1 -0
  42. package/package.json +68 -0
  43. package/rollup.config.mjs +64 -0
  44. package/src/ClientProvider.tsx +15 -0
  45. package/src/LangProvider.tsx +32 -0
  46. package/src/WalletConnect/AccountPage.tsx +535 -0
  47. package/src/WalletConnect/ActivityList.tsx +597 -0
  48. package/src/WalletConnect/ConnectAlchemy/index.tsx +246 -0
  49. package/src/WalletConnect/ConnectAlchemy/useConnectAlchemy.ts +101 -0
  50. package/src/WalletConnect/ConnectLedger/ErrorDialog.tsx +61 -0
  51. package/src/WalletConnect/ConnectLedger/LoadingDialog.tsx +106 -0
  52. package/src/WalletConnect/ConnectLedger/LockedDialog.tsx +54 -0
  53. package/src/WalletConnect/ConnectLedger/ProtocolDialog.tsx +61 -0
  54. package/src/WalletConnect/ConnectLedger/SelectAddressDialog.tsx +326 -0
  55. package/src/WalletConnect/ConnectLedger/SelectPathDialog.tsx +68 -0
  56. package/src/WalletConnect/ConnectLedger/helper.ts +14 -0
  57. package/src/WalletConnect/ConnectLedger/index.tsx +89 -0
  58. package/src/WalletConnect/ConnectPage.tsx +459 -0
  59. package/src/WalletConnect/HasBalanceTokenList.tsx +201 -0
  60. package/src/WalletConnect/ReceiveTokenPage.tsx +143 -0
  61. package/src/WalletConnect/SendTokenPage.tsx +249 -0
  62. package/src/WalletConnect/WalletDialog.tsx +72 -0
  63. package/src/WalletConnectProvider.tsx +54 -0
  64. package/src/components/AddressWithLinkAndCopy.tsx +200 -0
  65. package/src/components/Dialog.tsx +155 -0
  66. package/src/components/TokenLogo.tsx +165 -0
  67. package/src/components/WalletTag.tsx +113 -0
  68. package/src/constants/localstorage.ts +22 -0
  69. package/src/hooks/useConnectWalet.ts +144 -0
  70. package/src/hooks/useFetchFiatPrice.ts +51 -0
  71. package/src/hooks/useFetchTokensBalance.ts +52 -0
  72. package/src/hooks/useHasBalanceTokenList.ts +157 -0
  73. package/src/hooks/useTransactionList.ts +87 -0
  74. package/src/index.tsx +4 -0
  75. package/src/utils/formatter.ts +102 -0
  76. package/src/utils/time.ts +21 -0
  77. package/src/utils/utils.ts +8 -0
  78. package/tsconfig.json +22 -0
@@ -0,0 +1,272 @@
1
+ import { SystemApi } from '@dodoex/api';
2
+ export declare enum StateText {
3
+ Running = "pending",
4
+ Success = "success",
5
+ Failed = "failed",
6
+ Warning = "reset"
7
+ }
8
+ export type NoticeTransactionList = NonNullable<NonNullable<ReturnType<NonNullable<typeof SystemApi.graphql.fetchNoticeCenterTransactionList['__apiType']>>['notice_center_transactionList']>['list']>;
9
+ export declare function useTransactionList({ account, chainId, }: {
10
+ account: string | undefined;
11
+ chainId?: number;
12
+ }): {
13
+ list: ({
14
+ chainId?: number | null | undefined;
15
+ createTime?: string | null | undefined;
16
+ extend?: any;
17
+ from?: string | null | undefined;
18
+ id?: number | null | undefined;
19
+ key?: string | null | undefined;
20
+ type?: string | null | undefined;
21
+ } | null)[];
22
+ pendingList: ({
23
+ chainId?: number | null | undefined;
24
+ createTime?: string | null | undefined;
25
+ extend?: any;
26
+ from?: string | null | undefined;
27
+ id?: number | null | undefined;
28
+ key?: string | null | undefined;
29
+ type?: string | null | undefined;
30
+ } | null)[];
31
+ data: import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").a0<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>;
32
+ error: Error;
33
+ isError: true;
34
+ isPending: false;
35
+ isLoading: false;
36
+ isLoadingError: false;
37
+ isRefetchError: true;
38
+ isSuccess: false;
39
+ status: "error";
40
+ fetchNextPage: (options?: import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").ao | undefined) => Promise<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").aH<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").a0<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
41
+ fetchPreviousPage: (options?: import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").ap | undefined) => Promise<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").aH<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").a0<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
42
+ hasNextPage: boolean;
43
+ hasPreviousPage: boolean;
44
+ isFetchNextPageError: boolean;
45
+ isFetchingNextPage: boolean;
46
+ isFetchPreviousPageError: boolean;
47
+ isFetchingPreviousPage: boolean;
48
+ dataUpdatedAt: number;
49
+ errorUpdatedAt: number;
50
+ failureCount: number;
51
+ failureReason: Error | null;
52
+ errorUpdateCount: number;
53
+ isFetched: boolean;
54
+ isFetchedAfterMount: boolean;
55
+ isFetching: boolean;
56
+ isInitialLoading: boolean;
57
+ isPaused: boolean;
58
+ isPlaceholderData: boolean;
59
+ isRefetching: boolean;
60
+ isStale: boolean;
61
+ refetch: (options?: import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").aj | undefined) => Promise<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").az<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").a0<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
62
+ fetchStatus: import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").ar;
63
+ promise: Promise<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").a0<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>>;
64
+ } | {
65
+ list: ({
66
+ chainId?: number | null | undefined;
67
+ createTime?: string | null | undefined;
68
+ extend?: any;
69
+ from?: string | null | undefined;
70
+ id?: number | null | undefined;
71
+ key?: string | null | undefined;
72
+ type?: string | null | undefined;
73
+ } | null)[];
74
+ pendingList: ({
75
+ chainId?: number | null | undefined;
76
+ createTime?: string | null | undefined;
77
+ extend?: any;
78
+ from?: string | null | undefined;
79
+ id?: number | null | undefined;
80
+ key?: string | null | undefined;
81
+ type?: string | null | undefined;
82
+ } | null)[];
83
+ data: import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").a0<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>;
84
+ error: null;
85
+ isError: false;
86
+ isPending: false;
87
+ isLoading: false;
88
+ isLoadingError: false;
89
+ isRefetchError: false;
90
+ isFetchNextPageError: false;
91
+ isFetchPreviousPageError: false;
92
+ isSuccess: true;
93
+ status: "success";
94
+ fetchNextPage: (options?: import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").ao | undefined) => Promise<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").aH<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").a0<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
95
+ fetchPreviousPage: (options?: import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").ap | undefined) => Promise<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").aH<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").a0<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
96
+ hasNextPage: boolean;
97
+ hasPreviousPage: boolean;
98
+ isFetchingNextPage: boolean;
99
+ isFetchingPreviousPage: boolean;
100
+ dataUpdatedAt: number;
101
+ errorUpdatedAt: number;
102
+ failureCount: number;
103
+ failureReason: Error | null;
104
+ errorUpdateCount: number;
105
+ isFetched: boolean;
106
+ isFetchedAfterMount: boolean;
107
+ isFetching: boolean;
108
+ isInitialLoading: boolean;
109
+ isPaused: boolean;
110
+ isPlaceholderData: boolean;
111
+ isRefetching: boolean;
112
+ isStale: boolean;
113
+ refetch: (options?: import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").aj | undefined) => Promise<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").az<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").a0<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
114
+ fetchStatus: import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").ar;
115
+ promise: Promise<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").a0<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>>;
116
+ } | {
117
+ list: ({
118
+ chainId?: number | null | undefined;
119
+ createTime?: string | null | undefined;
120
+ extend?: any;
121
+ from?: string | null | undefined;
122
+ id?: number | null | undefined;
123
+ key?: string | null | undefined;
124
+ type?: string | null | undefined;
125
+ } | null)[];
126
+ pendingList: ({
127
+ chainId?: number | null | undefined;
128
+ createTime?: string | null | undefined;
129
+ extend?: any;
130
+ from?: string | null | undefined;
131
+ id?: number | null | undefined;
132
+ key?: string | null | undefined;
133
+ type?: string | null | undefined;
134
+ } | null)[];
135
+ data: undefined;
136
+ error: Error;
137
+ isError: true;
138
+ isPending: false;
139
+ isLoading: false;
140
+ isLoadingError: true;
141
+ isRefetchError: false;
142
+ isFetchNextPageError: false;
143
+ isFetchPreviousPageError: false;
144
+ isSuccess: false;
145
+ status: "error";
146
+ fetchNextPage: (options?: import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").ao | undefined) => Promise<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").aH<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").a0<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
147
+ fetchPreviousPage: (options?: import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").ap | undefined) => Promise<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").aH<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").a0<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
148
+ hasNextPage: boolean;
149
+ hasPreviousPage: boolean;
150
+ isFetchingNextPage: boolean;
151
+ isFetchingPreviousPage: boolean;
152
+ dataUpdatedAt: number;
153
+ errorUpdatedAt: number;
154
+ failureCount: number;
155
+ failureReason: Error | null;
156
+ errorUpdateCount: number;
157
+ isFetched: boolean;
158
+ isFetchedAfterMount: boolean;
159
+ isFetching: boolean;
160
+ isInitialLoading: boolean;
161
+ isPaused: boolean;
162
+ isPlaceholderData: boolean;
163
+ isRefetching: boolean;
164
+ isStale: boolean;
165
+ refetch: (options?: import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").aj | undefined) => Promise<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").az<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").a0<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
166
+ fetchStatus: import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").ar;
167
+ promise: Promise<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").a0<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>>;
168
+ } | {
169
+ list: ({
170
+ chainId?: number | null | undefined;
171
+ createTime?: string | null | undefined;
172
+ extend?: any;
173
+ from?: string | null | undefined;
174
+ id?: number | null | undefined;
175
+ key?: string | null | undefined;
176
+ type?: string | null | undefined;
177
+ } | null)[];
178
+ pendingList: ({
179
+ chainId?: number | null | undefined;
180
+ createTime?: string | null | undefined;
181
+ extend?: any;
182
+ from?: string | null | undefined;
183
+ id?: number | null | undefined;
184
+ key?: string | null | undefined;
185
+ type?: string | null | undefined;
186
+ } | null)[];
187
+ data: undefined;
188
+ error: null;
189
+ isError: false;
190
+ isPending: true;
191
+ isLoading: true;
192
+ isLoadingError: false;
193
+ isRefetchError: false;
194
+ isFetchNextPageError: false;
195
+ isFetchPreviousPageError: false;
196
+ isSuccess: false;
197
+ status: "pending";
198
+ fetchNextPage: (options?: import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").ao | undefined) => Promise<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").aH<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").a0<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
199
+ fetchPreviousPage: (options?: import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").ap | undefined) => Promise<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").aH<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").a0<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
200
+ hasNextPage: boolean;
201
+ hasPreviousPage: boolean;
202
+ isFetchingNextPage: boolean;
203
+ isFetchingPreviousPage: boolean;
204
+ dataUpdatedAt: number;
205
+ errorUpdatedAt: number;
206
+ failureCount: number;
207
+ failureReason: Error | null;
208
+ errorUpdateCount: number;
209
+ isFetched: boolean;
210
+ isFetchedAfterMount: boolean;
211
+ isFetching: boolean;
212
+ isInitialLoading: boolean;
213
+ isPaused: boolean;
214
+ isPlaceholderData: boolean;
215
+ isRefetching: boolean;
216
+ isStale: boolean;
217
+ refetch: (options?: import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").aj | undefined) => Promise<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").az<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").a0<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
218
+ fetchStatus: import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").ar;
219
+ promise: Promise<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").a0<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>>;
220
+ } | {
221
+ list: ({
222
+ chainId?: number | null | undefined;
223
+ createTime?: string | null | undefined;
224
+ extend?: any;
225
+ from?: string | null | undefined;
226
+ id?: number | null | undefined;
227
+ key?: string | null | undefined;
228
+ type?: string | null | undefined;
229
+ } | null)[];
230
+ pendingList: ({
231
+ chainId?: number | null | undefined;
232
+ createTime?: string | null | undefined;
233
+ extend?: any;
234
+ from?: string | null | undefined;
235
+ id?: number | null | undefined;
236
+ key?: string | null | undefined;
237
+ type?: string | null | undefined;
238
+ } | null)[];
239
+ data: undefined;
240
+ error: null;
241
+ isError: false;
242
+ isPending: true;
243
+ isLoadingError: false;
244
+ isRefetchError: false;
245
+ isFetchNextPageError: false;
246
+ isFetchPreviousPageError: false;
247
+ isSuccess: false;
248
+ status: "pending";
249
+ fetchNextPage: (options?: import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").ao | undefined) => Promise<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").aH<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").a0<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
250
+ fetchPreviousPage: (options?: import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").ap | undefined) => Promise<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").aH<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").a0<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
251
+ hasNextPage: boolean;
252
+ hasPreviousPage: boolean;
253
+ isFetchingNextPage: boolean;
254
+ isFetchingPreviousPage: boolean;
255
+ dataUpdatedAt: number;
256
+ errorUpdatedAt: number;
257
+ failureCount: number;
258
+ failureReason: Error | null;
259
+ errorUpdateCount: number;
260
+ isFetched: boolean;
261
+ isFetchedAfterMount: boolean;
262
+ isFetching: boolean;
263
+ isLoading: boolean;
264
+ isInitialLoading: boolean;
265
+ isPaused: boolean;
266
+ isPlaceholderData: boolean;
267
+ isRefetching: boolean;
268
+ isStale: boolean;
269
+ refetch: (options?: import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").aj | undefined) => Promise<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").az<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").a0<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>, Error>>;
270
+ fetchStatus: import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").ar;
271
+ promise: Promise<import("@tanstack/query-core/build/legacy/hydration-DiTAi-4H").a0<import("@dodoex/api/dist/types/gql/graphql").FetchNoticeCenterTransactionListQuery, unknown>>;
272
+ };
@@ -0,0 +1,4 @@
1
+ export { default as WalletDialog } from './WalletConnect/WalletDialog';
2
+ export { WalletConnectProvider } from './WalletConnectProvider';
3
+ export { default as ClientProvider } from './ClientProvider';
4
+ export { default as LangProvider } from './LangProvider';
@@ -0,0 +1,20 @@
1
+ import BigNumber from 'bignumber.js';
2
+ /**
3
+ * format to short number, like: -0.12 -> 0, 0.0000123->0.000012, 123.234 -> 123.23, 1234.12 -> 1.23K, 1000000.123->1.00M
4
+ * @param n
5
+ */
6
+ export declare function formatShortNumber(n?: BigNumber, showDecimals?: number): string;
7
+ /**
8
+ * format to readable number, like: 0.00 -> 0, 1.00 -> 1, 1.235 -> 1.23, 1.230 -> 1.23
9
+ * @param input
10
+ */
11
+ export declare function formatReadableNumber({ input, showDecimals, showPrecisionDecimals, exponentialDecimalsAmount, showIntegerOnly, showDecimalsOnly, noGroupSeparator, roundingMode, }: {
12
+ input: BigNumber | number | string;
13
+ showDecimals?: number;
14
+ showIntegerOnly?: boolean;
15
+ showDecimalsOnly?: boolean;
16
+ showPrecisionDecimals?: number;
17
+ exponentialDecimalsAmount?: number;
18
+ noGroupSeparator?: boolean;
19
+ roundingMode?: BigNumber.RoundingMode;
20
+ }): string;
@@ -0,0 +1,3 @@
1
+ export declare function formatReadableTimeAgo({ time }: {
2
+ time: number;
3
+ }): string;
@@ -0,0 +1,2 @@
1
+ export declare const increaseArray: (len: number) => string[];
2
+ export declare const validateEmail: (email: string) => boolean;
@@ -0,0 +1,13 @@
1
+ const config = {
2
+ locales: ['en', 'zh'],
3
+ sourceLocale: 'en',
4
+ catalogs: [
5
+ {
6
+ path: 'locales/{locale}',
7
+ include: ['src'],
8
+ },
9
+ ],
10
+ format: 'po',
11
+ };
12
+
13
+ export default config;
package/locales/en.po ADDED
@@ -0,0 +1,251 @@
1
+ msgid ""
2
+ msgstr ""
3
+ "POT-Creation-Date: 2024-12-24 19:12+0800\n"
4
+ "MIME-Version: 1.0\n"
5
+ "Content-Type: text/plain; charset=utf-8\n"
6
+ "Content-Transfer-Encoding: 8bit\n"
7
+ "X-Generator: @lingui/cli\n"
8
+ "Language: en\n"
9
+ "Project-Id-Version: \n"
10
+ "Report-Msgid-Bugs-To: \n"
11
+ "PO-Revision-Date: \n"
12
+ "Last-Translator: \n"
13
+ "Language-Team: \n"
14
+ "Plural-Forms: \n"
15
+
16
+ #: src/WalletConnect/ConnectLedger/ProtocolDialog.tsx:46
17
+ msgid "1、Ledger Live APP is closed{BR}2、The device plugged in via USB,NOT Bluetooth{BR}3、The device is unlocked and in the {ledgerAppName} app{BR}4、”Blind Signing” is enabled in {ledgerAppName} app"
18
+ msgstr "1、Ledger Live APP is closed{BR}2、The device plugged in via USB,NOT Bluetooth{BR}3、The device is unlocked and in the {ledgerAppName} app{BR}4、”Blind Signing” is enabled in {ledgerAppName} app"
19
+
20
+ #: src/WalletConnect/ConnectLedger/LoadingDialog.tsx:84
21
+ msgid "Account"
22
+ msgstr "Account"
23
+
24
+ #: src/WalletConnect/AccountPage.tsx:313
25
+ msgid "Activity"
26
+ msgstr "Activity"
27
+
28
+ #: src/WalletConnect/ActivityList.tsx:381
29
+ msgid "Add Liquidity"
30
+ msgstr "Add Liquidity"
31
+
32
+ #: src/WalletConnect/ConnectLedger/SelectAddressDialog.tsx:202
33
+ msgid "Address"
34
+ msgstr "Address"
35
+
36
+ #: src/WalletConnect/ActivityList.tsx:362
37
+ msgid "Approve"
38
+ msgstr "Approve"
39
+
40
+ #: src/WalletConnect/ConnectLedger/LoadingDialog.tsx:92
41
+ #: src/WalletConnect/ConnectLedger/SelectPathDialog.tsx:25
42
+ msgid "Available Ledger Account"
43
+ msgstr "Available Ledger Account"
44
+
45
+ #: src/WalletConnect/AccountPage.tsx:172
46
+ #: src/WalletConnect/ConnectLedger/SelectAddressDialog.tsx:206
47
+ msgid "Balance"
48
+ msgstr "Balance"
49
+
50
+ #: src/WalletConnect/ConnectLedger/ProtocolDialog.tsx:36
51
+ #: src/WalletConnect/ConnectLedger/SelectAddressDialog.tsx:155
52
+ msgid "Before proceeding make sure"
53
+ msgstr "Before proceeding make sure"
54
+
55
+ #: src/WalletConnect/ConnectAlchemy/index.tsx:85
56
+ msgid "Check your email and click the link to complete login"
57
+ msgstr "Check your email and click the link to complete login"
58
+
59
+ #: src/WalletConnect/ConnectAlchemy/index.tsx:232
60
+ msgid "Choose existing passkey"
61
+ msgstr "Choose existing passkey"
62
+
63
+ #: src/WalletConnect/ActivityList.tsx:396
64
+ msgid "Claim Rewards"
65
+ msgstr "Claim Rewards"
66
+
67
+ #: src/WalletConnect/ConnectAlchemy/index.tsx:46
68
+ msgid "Connect Alchemy"
69
+ msgstr "Connect Alchemy"
70
+
71
+ #: src/WalletConnect/ConnectPage.tsx:234
72
+ msgid "Connect Wallet"
73
+ msgstr "Connect Wallet"
74
+
75
+ #: src/components/WalletTag.tsx:58
76
+ msgid "Connected"
77
+ msgstr "Connected"
78
+
79
+ #: src/components/WalletTag.tsx:42
80
+ msgid "Connecting"
81
+ msgstr "Connecting"
82
+
83
+ #: src/WalletConnect/ConnectLedger/ProtocolDialog.tsx:57
84
+ #: src/WalletConnect/ConnectLedger/SelectAddressDialog.tsx:321
85
+ #: src/WalletConnect/ConnectLedger/SelectPathDialog.tsx:63
86
+ msgid "Continue"
87
+ msgstr "Continue"
88
+
89
+ #: src/WalletConnect/AccountPage.tsx:399
90
+ #: src/WalletConnect/HasBalanceTokenList.tsx:118
91
+ #: src/WalletConnect/ReceiveTokenPage.tsx:99
92
+ msgid "Copied"
93
+ msgstr "Copied"
94
+
95
+ #: src/WalletConnect/ReceiveTokenPage.tsx:136
96
+ msgid "Copy wallet address"
97
+ msgstr "Copy wallet address"
98
+
99
+ #: src/WalletConnect/ActivityList.tsx:398
100
+ msgid "Create Liquidity Mining"
101
+ msgstr "Create Liquidity Mining"
102
+
103
+ #: src/WalletConnect/ConnectAlchemy/index.tsx:207
104
+ msgid "Create new passkey"
105
+ msgstr "Create new passkey"
106
+
107
+ #: src/WalletConnect/ActivityList.tsx:393
108
+ msgid "End mining\\n"
109
+ msgstr "End mining\\n"
110
+
111
+ #: src/WalletConnect/ConnectAlchemy/index.tsx:129
112
+ msgid "Enter email"
113
+ msgstr "Enter email"
114
+
115
+ #: src/WalletConnect/ActivityList.tsx:349
116
+ msgid "Failed"
117
+ msgstr "Failed"
118
+
119
+ #: src/WalletConnect/ConnectAlchemy/index.tsx:105
120
+ msgid "Go Back"
121
+ msgstr "Go Back"
122
+
123
+ #: src/WalletConnect/ConnectLedger/SelectAddressDialog.tsx:194
124
+ msgid "ID"
125
+ msgstr "ID"
126
+
127
+ #: src/components/WalletTag.tsx:107
128
+ msgid "Installed Wallet"
129
+ msgstr "Installed Wallet"
130
+
131
+ #: src/WalletConnect/ConnectAlchemy/index.tsx:132
132
+ msgid "Invalid email"
133
+ msgstr "Invalid email"
134
+
135
+ #: src/WalletConnect/SendTokenPage.tsx:186
136
+ msgid "Invalid wallet address"
137
+ msgstr "Invalid wallet address"
138
+
139
+ #: src/components/WalletTag.tsx:74
140
+ msgid "Last connection"
141
+ msgstr "Last connection"
142
+
143
+ #: src/WalletConnect/ActivityList.tsx:264
144
+ msgid "Loading more"
145
+ msgstr "Loading more"
146
+
147
+ #: src/WalletConnect/ConnectLedger/LoadingDialog.tsx:101
148
+ msgid "Loading..."
149
+ msgstr "Loading..."
150
+
151
+ #: src/WalletConnect/ConnectAlchemy/index.tsx:73
152
+ msgid "Log in with your email"
153
+ msgstr "Log in with your email"
154
+
155
+ #: src/WalletConnect/ConnectAlchemy/index.tsx:126
156
+ msgid "Log in with your email or a passkey"
157
+ msgstr "Log in with your email or a passkey"
158
+
159
+ #: src/WalletConnect/ConnectPage.tsx:342
160
+ msgid "More Wallets"
161
+ msgstr "More Wallets"
162
+
163
+ #: src/WalletConnect/HasBalanceTokenList.tsx:51
164
+ msgid "No tokens"
165
+ msgstr "No tokens"
166
+
167
+ #: src/WalletConnect/ConnectLedger/ErrorDialog.tsx:56
168
+ #: src/WalletConnect/ConnectLedger/LockedDialog.tsx:49
169
+ msgid "OK"
170
+ msgstr "OK"
171
+
172
+ #: src/WalletConnect/AccountPage.tsx:305
173
+ msgid "On-chain transaction records"
174
+ msgstr "On-chain transaction records"
175
+
176
+ #: src/WalletConnect/ConnectAlchemy/index.tsx:187
177
+ msgid "or"
178
+ msgstr "or"
179
+
180
+ #: src/WalletConnect/ActivityList.tsx:350
181
+ msgid "Pending"
182
+ msgstr "Pending"
183
+
184
+ #: src/WalletConnect/ActivityList.tsx:389
185
+ msgid "Pool Creation"
186
+ msgstr "Pool Creation"
187
+
188
+ #: src/WalletConnect/AccountPage.tsx:253
189
+ #: src/WalletConnect/ReceiveTokenPage.tsx:50
190
+ msgid "Receive"
191
+ msgstr "Receive"
192
+
193
+ #: src/WalletConnect/SendTokenPage.tsx:144
194
+ msgid "Receiver address"
195
+ msgstr "Receiver address"
196
+
197
+ #: src/WalletConnect/ActivityList.tsx:385
198
+ msgid "Remove Liquidity"
199
+ msgstr "Remove Liquidity"
200
+
201
+ #: src/WalletConnect/ActivityList.tsx:351
202
+ #: src/WalletConnect/ActivityList.tsx:361
203
+ msgid "Reset"
204
+ msgstr "Reset"
205
+
206
+ #: src/WalletConnect/AccountPage.tsx:224
207
+ #: src/WalletConnect/ActivityList.tsx:401
208
+ #: src/WalletConnect/SendTokenPage.tsx:116
209
+ #: src/WalletConnect/SendTokenPage.tsx:244
210
+ msgid "Send"
211
+ msgstr "Send"
212
+
213
+ #: src/WalletConnect/ActivityList.tsx:391
214
+ msgid "Stake"
215
+ msgstr "Stake"
216
+
217
+ #: src/WalletConnect/ConnectAlchemy/index.tsx:156
218
+ msgid "Submit"
219
+ msgstr "Submit"
220
+
221
+ #: src/WalletConnect/ActivityList.tsx:348
222
+ msgid "Succeeded"
223
+ msgstr "Succeeded"
224
+
225
+ #: src/WalletConnect/ActivityList.tsx:375
226
+ msgid "Swap"
227
+ msgstr "Swap"
228
+
229
+ #: src/WalletConnect/ConnectLedger/LockedDialog.tsx:37
230
+ msgid ""
231
+ "The Ledger Device is locked\n"
232
+ "Please unlock from the device"
233
+ msgstr ""
234
+ "The Ledger Device is locked\n"
235
+ "Please unlock from the device"
236
+
237
+ #: src/WalletConnect/ActivityList.tsx:129
238
+ msgid "This is empty"
239
+ msgstr "This is empty"
240
+
241
+ #: src/WalletConnect/AccountPage.tsx:301
242
+ msgid "Token"
243
+ msgstr "Token"
244
+
245
+ #: src/WalletConnect/ActivityList.tsx:377
246
+ msgid "Transfer"
247
+ msgstr "Transfer"
248
+
249
+ #: src/WalletConnect/ConnectLedger/ErrorDialog.tsx:36
250
+ msgid "Unknown Error"
251
+ msgstr "Unknown Error"
package/locales/en.ts ADDED
@@ -0,0 +1 @@
1
+ /*eslint-disable*/import type{Messages}from"@lingui/core";export const messages=JSON.parse("{\"Sz0SkD\":[\"1、Ledger Live APP is closed\",[\"BR\"],\"2、The device plugged in via USB,NOT Bluetooth\",[\"BR\"],\"3、The device is unlocked and in the \",[\"ledgerAppName\"],\" app\",[\"BR\"],\"4、”Blind Signing” is enabled in \",[\"ledgerAppName\"],\" app\"],\"AeXO77\":\"Account\",\"XJOV1Y\":\"Activity\",\"OBdohg\":\"Add Liquidity\",\"Du6bPw\":\"Address\",\"Z7ZXbT\":\"Approve\",\"vN+hAq\":\"Available Ledger Account\",\"fsBGk0\":\"Balance\",\"E/yE9x\":\"Before proceeding make sure\",\"3UCJ3e\":\"Check your email and click the link to complete login\",\"Mlg3Ds\":\"Choose existing passkey\",\"zXCpR0\":\"Claim Rewards\",\"RETKSh\":\"Connect Alchemy\",\"CtByM7\":\"Connect Wallet\",\"QHcLEN\":\"Connected\",\"9zb2WA\":\"Connecting\",\"xGVfLh\":\"Continue\",\"6V3Ea3\":\"Copied\",\"gCNLBV\":\"Copy wallet address\",\"14s9LL\":\"Create Liquidity Mining\",\"OzjK0A\":\"Create new passkey\",\"WZRsOg\":\"End mining\\\\n\",\"6KnyG0\":\"Enter email\",\"7Bj3x9\":\"Failed\",\"sr0UJD\":\"Go Back\",\"S0kLOH\":\"ID\",\"9ow2PX\":\"Installed Wallet\",\"B2Tpo0\":\"Invalid email\",\"rwC96V\":\"Invalid wallet address\",\"xHr8Pp\":\"Last connection\",\"EYDfo2\":\"Loading more\",\"Z3FXyt\":\"Loading...\",\"6Ui8nZ\":\"Log in with your email\",\"3y6FjD\":\"Log in with your email or a passkey\",\"yN5k0R\":\"More Wallets\",\"JE8mMQ\":\"No tokens\",\"zga9sT\":\"OK\",\"U8oDGg\":\"On-chain transaction records\",\"BzEFor\":\"or\",\"UbRKMZ\":\"Pending\",\"8OiU8L\":\"Pool Creation\",\"lDgVWA\":\"Receive\",\"pkRuyd\":\"Receiver address\",\"3XBvkd\":\"Remove Liquidity\",\"OfhWJH\":\"Reset\",\"JlFcis\":\"Send\",\"JYKRJS\":\"Stake\",\"hQRttt\":\"Submit\",\"KAbcm2\":\"Succeeded\",\"vH2C/2\":\"Swap\",\"kdetxi\":\"The Ledger Device is locked\\nPlease unlock from the device\",\"FzJ11V\":\"This is empty\",\"TP9/K5\":\"Token\",\"zPGNJm\":\"Transfer\",\"LobdAW\":\"Unknown Error\"}")as Messages;