@matchain/matchid-sdk-react 0.1.46-alpha.9 → 0.1.46

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 (85) hide show
  1. package/dist/assets/icon/index.d.mts +2 -4
  2. package/dist/assets/icon/index.d.ts +2 -4
  3. package/dist/assets/icon/index.js +0 -27
  4. package/dist/assets/icon/index.js.map +1 -1
  5. package/dist/assets/icon/index.mjs +1 -3
  6. package/dist/chunk-A3XSTHEE.mjs +93 -0
  7. package/dist/chunk-A3XSTHEE.mjs.map +1 -0
  8. package/dist/{chunk-A5D3NKTK.mjs → chunk-DPXMCLYK.mjs} +3 -29
  9. package/dist/chunk-DPXMCLYK.mjs.map +1 -0
  10. package/dist/{chunk-UA6XHZHX.mjs → chunk-SQIJR7RA.mjs} +14 -2
  11. package/dist/chunk-SQIJR7RA.mjs.map +1 -0
  12. package/dist/{chunk-OBHKOOCD.mjs → chunk-TOUC33US.mjs} +4618 -142
  13. package/dist/chunk-TOUC33US.mjs.map +1 -0
  14. package/dist/components/index.d.mts +3 -3
  15. package/dist/components/index.d.ts +3 -3
  16. package/dist/components/index.js +812 -387
  17. package/dist/components/index.js.map +1 -1
  18. package/dist/components/index.mjs +12 -12
  19. package/dist/hooks/api/index.d.mts +2 -2
  20. package/dist/hooks/api/index.d.ts +2 -2
  21. package/dist/hooks/api/index.js +239 -342
  22. package/dist/hooks/api/index.js.map +1 -1
  23. package/dist/hooks/api/index.mjs +6 -12
  24. package/dist/hooks/index.d.mts +2 -2
  25. package/dist/hooks/index.d.ts +2 -2
  26. package/dist/hooks/index.js +498 -398
  27. package/dist/hooks/index.js.map +1 -1
  28. package/dist/hooks/index.mjs +4 -6
  29. package/dist/{index-DYb6srm9.d.ts → index-B0VpxAI2.d.mts} +33 -5
  30. package/dist/{index-C9EBucNb.d.ts → index-CFWR1boZ.d.ts} +24 -2
  31. package/dist/{index-BQ4znGiW.d.ts → index-CTSg5TRS.d.ts} +2 -9
  32. package/dist/index-CWYElOA2.d.mts +65 -0
  33. package/dist/index-CoTirILQ.d.ts +65 -0
  34. package/dist/{index-DrzL-Ogw.d.mts → index-D2pNP7Bz.d.mts} +24 -2
  35. package/dist/{index-DuBywj_6.d.mts → index-DR2JTaoi.d.mts} +2 -9
  36. package/dist/{index-BD6sPfI_.d.mts → index-DVlCrOjr.d.ts} +33 -5
  37. package/dist/index.css +1 -106
  38. package/dist/index.d.mts +6 -8
  39. package/dist/index.d.ts +6 -8
  40. package/dist/index.js +2333 -2208
  41. package/dist/index.js.map +1 -1
  42. package/dist/index.mjs +6 -12
  43. package/dist/types/index.d.mts +1 -1
  44. package/dist/types/index.d.ts +1 -1
  45. package/dist/types/index.mjs +1 -2
  46. package/dist/{types-BvsN5jj9.d.mts → types-CRumDe2M.d.mts} +1 -109
  47. package/dist/{types-BvsN5jj9.d.ts → types-CRumDe2M.d.ts} +1 -109
  48. package/example/src/App.tsx +0 -7
  49. package/example/src/config/chains/matchMain.ts +3 -2
  50. package/example/src/pages/User/components/BindListModal.tsx +1 -1
  51. package/example/src/pages/User/components/PohListModal.tsx +1 -1
  52. package/example/src/pages/User/index.tsx +13 -1
  53. package/example/src/pages/{Wallet/index.tsx → Wallet.tsx} +1 -27
  54. package/package.json +1 -5
  55. package/dist/chunk-A5D3NKTK.mjs.map +0 -1
  56. package/dist/chunk-E4GTBGEE.mjs +0 -4241
  57. package/dist/chunk-E4GTBGEE.mjs.map +0 -1
  58. package/dist/chunk-FFTS42UP.mjs +0 -112
  59. package/dist/chunk-FFTS42UP.mjs.map +0 -1
  60. package/dist/chunk-HBOS3RBL.mjs +0 -19
  61. package/dist/chunk-HBOS3RBL.mjs.map +0 -1
  62. package/dist/chunk-OBHKOOCD.mjs.map +0 -1
  63. package/dist/chunk-UA6XHZHX.mjs.map +0 -1
  64. package/dist/chunk-XKPX224V.mjs +0 -168
  65. package/dist/chunk-XKPX224V.mjs.map +0 -1
  66. package/dist/index-BEANfTWl.d.mts +0 -57
  67. package/dist/index-BhavUO9H.d.ts +0 -26
  68. package/dist/index-CgwBZE9m.d.ts +0 -119
  69. package/dist/index-DdqWjOlR.d.ts +0 -57
  70. package/dist/index-IXJvjOKV.d.mts +0 -119
  71. package/dist/index-sdb-MpAt.d.mts +0 -26
  72. package/dist/ui/index.d.mts +0 -6
  73. package/dist/ui/index.d.ts +0 -6
  74. package/dist/ui/index.js +0 -724
  75. package/dist/ui/index.js.map +0 -1
  76. package/dist/ui/index.mjs +0 -35
  77. package/dist/ui/index.mjs.map +0 -1
  78. package/example/src/pages/UI/components/AlphaAvatar.tsx +0 -11
  79. package/example/src/pages/UI/components/Radio.tsx +0 -15
  80. package/example/src/pages/UI/components/Switch.tsx +0 -13
  81. package/example/src/pages/UI/index.tsx +0 -11
  82. package/example/src/pages/Wallet/components/AssetListModal.tsx +0 -15
  83. package/example/src/pages/Wallet/components/ChainListModal.tsx +0 -11
  84. package/example/src/pages/Wallet/components/ImportTokenListModal.tsx +0 -15
  85. /package/example/src/{components → pages/User/components}/QueryDisplay.tsx +0 -0
package/dist/index.mjs CHANGED
@@ -1,24 +1,19 @@
1
- import {
2
- types_exports
3
- } from "./chunk-HBOS3RBL.mjs";
4
- import {
5
- ui_exports
6
- } from "./chunk-FFTS42UP.mjs";
7
1
  import {
8
2
  chains_exports
9
3
  } from "./chunk-HYQ3T6WW.mjs";
10
4
  import {
11
5
  api_exports
12
- } from "./chunk-XKPX224V.mjs";
6
+ } from "./chunk-A3XSTHEE.mjs";
13
7
  import {
14
8
  MatchProvider,
15
9
  components_exports,
16
10
  hooks_exports,
17
11
  useMatch
18
- } from "./chunk-E4GTBGEE.mjs";
19
- import "./chunk-UA6XHZHX.mjs";
20
- import "./chunk-OBHKOOCD.mjs";
21
- import "./chunk-A5D3NKTK.mjs";
12
+ } from "./chunk-TOUC33US.mjs";
13
+ import {
14
+ types_exports
15
+ } from "./chunk-SQIJR7RA.mjs";
16
+ import "./chunk-DPXMCLYK.mjs";
22
17
  import "./chunk-J5LGTIGS.mjs";
23
18
  export {
24
19
  api_exports as Api,
@@ -27,7 +22,6 @@ export {
27
22
  hooks_exports as Hooks,
28
23
  MatchProvider,
29
24
  types_exports as Types,
30
- ui_exports as UI,
31
25
  useMatch
32
26
  };
33
27
  //# sourceMappingURL=index.mjs.map
@@ -1,3 +1,3 @@
1
1
  export { A as AuthParams, C as ChainType, E as EmbeddedWalletsParams, R as RecoveryType } from '../mpc-CTbBWHld.mjs';
2
- export { A as AnyObject, j as AppConfigType, k as BindInfoType, l as BindItemType, m as BindWalletParam, B as ButtonProps, C as CEXType, D as DeepPartial, n as DrawerProps, E as EmailModalProps, a as IEnvConfigType, o as IEnvName, p as ILoginWalletReq, I as IMatchEvents, g as ISocialLoginMethod, q as IconProps, r as InputProps, L as LocaleType, b as LoginBoxProps, i as LoginMethodType, f as LoginModalProps, e as LoginPanelProps, s as MessageType, t as MetaPageType, u as ModalProps, M as ModalWithHeaderProps, O as OtherLoginMethodType, h as OverviewInfo, v as PohItemType, w as PohZkpassParams, P as PopoverPositionType, x as PopoverProps, d as PopoverTypeType, R as RecommendLoginMethodType, T as ThemeType, U as UIProps, y as UserAssetToken, z as UserChainType, F as UserImportTokenType, G as UserPopoverProps, H as UserTransactionType, J as WalletAssetType, W as WalletConfigType, K as WalletPanelProps, N as WalletReceiveMessageType, c as WalletType } from '../types-BvsN5jj9.mjs';
2
+ export { A as AnyObject, m as AppConfigType, n as BindInfoType, o as BindItemType, p as BindWalletParam, B as ButtonProps, C as CEXType, D as DeepPartial, q as DrawerProps, E as EmailModalProps, a as IEnvConfigType, r as IEnvName, s as ILoginWalletReq, I as IMatchEvents, j as ISocialLoginMethod, t as IconProps, b as InputProps, L as LocaleType, d as LoginBoxProps, l as LoginMethodType, i as LoginModalProps, h as LoginPanelProps, u as MessageType, M as ModalProps, c as ModalWithHeaderProps, O as OtherLoginMethodType, k as OverviewInfo, v as PohItemType, w as PohZkpassParams, f as PopoverPositionType, P as PopoverProps, g as PopoverTypeType, R as RecommendLoginMethodType, T as ThemeType, U as UserPopoverProps, W as WalletConfigType, x as WalletPanelProps, y as WalletReceiveMessageType, e as WalletType } from '../types-CRumDe2M.mjs';
3
3
  import 'react';
@@ -1,3 +1,3 @@
1
1
  export { A as AuthParams, C as ChainType, E as EmbeddedWalletsParams, R as RecoveryType } from '../mpc-CTbBWHld.js';
2
- export { A as AnyObject, j as AppConfigType, k as BindInfoType, l as BindItemType, m as BindWalletParam, B as ButtonProps, C as CEXType, D as DeepPartial, n as DrawerProps, E as EmailModalProps, a as IEnvConfigType, o as IEnvName, p as ILoginWalletReq, I as IMatchEvents, g as ISocialLoginMethod, q as IconProps, r as InputProps, L as LocaleType, b as LoginBoxProps, i as LoginMethodType, f as LoginModalProps, e as LoginPanelProps, s as MessageType, t as MetaPageType, u as ModalProps, M as ModalWithHeaderProps, O as OtherLoginMethodType, h as OverviewInfo, v as PohItemType, w as PohZkpassParams, P as PopoverPositionType, x as PopoverProps, d as PopoverTypeType, R as RecommendLoginMethodType, T as ThemeType, U as UIProps, y as UserAssetToken, z as UserChainType, F as UserImportTokenType, G as UserPopoverProps, H as UserTransactionType, J as WalletAssetType, W as WalletConfigType, K as WalletPanelProps, N as WalletReceiveMessageType, c as WalletType } from '../types-BvsN5jj9.js';
2
+ export { A as AnyObject, m as AppConfigType, n as BindInfoType, o as BindItemType, p as BindWalletParam, B as ButtonProps, C as CEXType, D as DeepPartial, q as DrawerProps, E as EmailModalProps, a as IEnvConfigType, r as IEnvName, s as ILoginWalletReq, I as IMatchEvents, j as ISocialLoginMethod, t as IconProps, b as InputProps, L as LocaleType, d as LoginBoxProps, l as LoginMethodType, i as LoginModalProps, h as LoginPanelProps, u as MessageType, M as ModalProps, c as ModalWithHeaderProps, O as OtherLoginMethodType, k as OverviewInfo, v as PohItemType, w as PohZkpassParams, f as PopoverPositionType, P as PopoverProps, g as PopoverTypeType, R as RecommendLoginMethodType, T as ThemeType, U as UserPopoverProps, W as WalletConfigType, x as WalletPanelProps, y as WalletReceiveMessageType, e as WalletType } from '../types-CRumDe2M.js';
3
3
  import 'react';
@@ -1,8 +1,7 @@
1
- import "../chunk-HBOS3RBL.mjs";
2
1
  import {
3
2
  ChainType,
4
3
  RecoveryType
5
- } from "../chunk-UA6XHZHX.mjs";
4
+ } from "../chunk-SQIJR7RA.mjs";
6
5
  import "../chunk-J5LGTIGS.mjs";
7
6
  export {
8
7
  ChainType,
@@ -236,12 +236,9 @@ type DrawerProps = PropsWithChildren & {
236
236
  showClose?: boolean;
237
237
  onClose?: () => void;
238
238
  isOpen: boolean;
239
- title?: React.ReactNode;
240
- zIndex?: number;
241
239
  };
242
240
  type WalletPanelProps = DrawerProps & {
243
241
  title?: React.ReactNode;
244
- drawerTitleVisible?: boolean;
245
242
  };
246
243
  type AppConfigType = {
247
244
  appid: string;
@@ -249,110 +246,5 @@ type AppConfigType = {
249
246
  app_icon?: string;
250
247
  platform: LoginMethodType[];
251
248
  };
252
- type UIProps = {
253
- style?: CSSProperties;
254
- className?: string;
255
- onClick?: (e?: any) => void;
256
- };
257
- type UserChainType = {
258
- id: number;
259
- name: string;
260
- nativeCurrency: {
261
- name: string;
262
- symbol: string;
263
- decimals: number;
264
- icon: string;
265
- };
266
- rpcUrls: {
267
- default: {
268
- http: string[];
269
- };
270
- };
271
- blockExplorers: {
272
- default: {
273
- name: string;
274
- url: string;
275
- apiUrl: string;
276
- };
277
- };
278
- iconUrl: string;
279
- contracts: {
280
- multicall3: {
281
- address: string;
282
- };
283
- };
284
- };
285
- interface UserTransactionAssetType {
286
- id: number;
287
- name: string;
288
- symbol: string;
289
- nativeChainId: string;
290
- price: number;
291
- liquidity: number;
292
- priceChange24hPercent: number;
293
- marketCapUSD: number;
294
- circulatingSupply: number;
295
- totalSupply: number;
296
- logo: string;
297
- contract: string;
298
- }
299
- interface UserTransactionType {
300
- id: string;
301
- timestamp: number;
302
- from: string;
303
- to: string;
304
- contract: any;
305
- hash: string;
306
- amount_usd: number;
307
- amount: number;
308
- block_number: number;
309
- type: string;
310
- blockchain: string;
311
- tx_cost: number;
312
- transaction: {
313
- hash: string;
314
- chainId: string;
315
- fees: string;
316
- feesUSD: number;
317
- date: string;
318
- };
319
- asset: UserTransactionAssetType;
320
- }
321
- type UserAssetToken = {
322
- symbol: string;
323
- name: string;
324
- balance: number;
325
- price: number;
326
- chain_id: string;
327
- address: string;
328
- decimals: string;
329
- icon: string;
330
- };
331
- type UserImportTokenType = {
332
- chain_id: string;
333
- symbol: string;
334
- address: string;
335
- decimals: number;
336
- };
337
- type WalletAssetType = {
338
- chain_id: string;
339
- chain_name: string;
340
- symbol: string;
341
- name: string;
342
- balance: number;
343
- price: number;
344
- price_change_24h: number;
345
- address: string;
346
- decimals: string;
347
- icon: string;
348
- };
349
- type MetaPageType<T> = {
350
- meta: {
351
- page_num: number;
352
- page_size: number;
353
- total: number;
354
- };
355
- items: T;
356
- };
357
249
 
358
- export type { AnyObject as A, ButtonProps as B, CEXType as C, DeepPartial as D, EmailModalProps as E, UserImportTokenType as F, UserPopoverProps as G, UserTransactionType as H, IMatchEvents as I, WalletAssetType as J, WalletPanelProps as K, LocaleType as L, ModalWithHeaderProps as M, WalletReceiveMessageType as N, OtherLoginMethodType as O, PopoverPositionType as P, RecommendLoginMethodType as R, ThemeType as T, UIProps as U, WalletConfigType as W, IEnvConfigType as a, LoginBoxProps as b, WalletType as c, PopoverTypeType as d, LoginPanelProps as e, LoginModalProps as f, ISocialLoginMethod as g, OverviewInfo as h, LoginMethodType as i, AppConfigType as j, BindInfoType as k, BindItemType as l, BindWalletParam as m, DrawerProps as n, IEnvName as o, ILoginWalletReq as p, IconProps as q, InputProps as r, MessageType as s, MetaPageType as t, ModalProps as u, PohItemType as v, PohZkpassParams as w, PopoverProps as x, UserAssetToken as y, UserChainType as z };
250
+ export type { AnyObject as A, ButtonProps as B, CEXType as C, DeepPartial as D, EmailModalProps as E, IMatchEvents as I, LocaleType as L, ModalProps as M, OtherLoginMethodType as O, PopoverProps as P, RecommendLoginMethodType as R, ThemeType as T, UserPopoverProps as U, WalletConfigType as W, IEnvConfigType as a, InputProps as b, ModalWithHeaderProps as c, LoginBoxProps as d, WalletType as e, PopoverPositionType as f, PopoverTypeType as g, LoginPanelProps as h, LoginModalProps as i, ISocialLoginMethod as j, OverviewInfo as k, LoginMethodType as l, AppConfigType as m, BindInfoType as n, BindItemType as o, BindWalletParam as p, DrawerProps as q, IEnvName as r, ILoginWalletReq as s, IconProps as t, MessageType as u, PohItemType as v, PohZkpassParams as w, WalletPanelProps as x, WalletReceiveMessageType as y };
@@ -236,12 +236,9 @@ type DrawerProps = PropsWithChildren & {
236
236
  showClose?: boolean;
237
237
  onClose?: () => void;
238
238
  isOpen: boolean;
239
- title?: React.ReactNode;
240
- zIndex?: number;
241
239
  };
242
240
  type WalletPanelProps = DrawerProps & {
243
241
  title?: React.ReactNode;
244
- drawerTitleVisible?: boolean;
245
242
  };
246
243
  type AppConfigType = {
247
244
  appid: string;
@@ -249,110 +246,5 @@ type AppConfigType = {
249
246
  app_icon?: string;
250
247
  platform: LoginMethodType[];
251
248
  };
252
- type UIProps = {
253
- style?: CSSProperties;
254
- className?: string;
255
- onClick?: (e?: any) => void;
256
- };
257
- type UserChainType = {
258
- id: number;
259
- name: string;
260
- nativeCurrency: {
261
- name: string;
262
- symbol: string;
263
- decimals: number;
264
- icon: string;
265
- };
266
- rpcUrls: {
267
- default: {
268
- http: string[];
269
- };
270
- };
271
- blockExplorers: {
272
- default: {
273
- name: string;
274
- url: string;
275
- apiUrl: string;
276
- };
277
- };
278
- iconUrl: string;
279
- contracts: {
280
- multicall3: {
281
- address: string;
282
- };
283
- };
284
- };
285
- interface UserTransactionAssetType {
286
- id: number;
287
- name: string;
288
- symbol: string;
289
- nativeChainId: string;
290
- price: number;
291
- liquidity: number;
292
- priceChange24hPercent: number;
293
- marketCapUSD: number;
294
- circulatingSupply: number;
295
- totalSupply: number;
296
- logo: string;
297
- contract: string;
298
- }
299
- interface UserTransactionType {
300
- id: string;
301
- timestamp: number;
302
- from: string;
303
- to: string;
304
- contract: any;
305
- hash: string;
306
- amount_usd: number;
307
- amount: number;
308
- block_number: number;
309
- type: string;
310
- blockchain: string;
311
- tx_cost: number;
312
- transaction: {
313
- hash: string;
314
- chainId: string;
315
- fees: string;
316
- feesUSD: number;
317
- date: string;
318
- };
319
- asset: UserTransactionAssetType;
320
- }
321
- type UserAssetToken = {
322
- symbol: string;
323
- name: string;
324
- balance: number;
325
- price: number;
326
- chain_id: string;
327
- address: string;
328
- decimals: string;
329
- icon: string;
330
- };
331
- type UserImportTokenType = {
332
- chain_id: string;
333
- symbol: string;
334
- address: string;
335
- decimals: number;
336
- };
337
- type WalletAssetType = {
338
- chain_id: string;
339
- chain_name: string;
340
- symbol: string;
341
- name: string;
342
- balance: number;
343
- price: number;
344
- price_change_24h: number;
345
- address: string;
346
- decimals: string;
347
- icon: string;
348
- };
349
- type MetaPageType<T> = {
350
- meta: {
351
- page_num: number;
352
- page_size: number;
353
- total: number;
354
- };
355
- items: T;
356
- };
357
249
 
358
- export type { AnyObject as A, ButtonProps as B, CEXType as C, DeepPartial as D, EmailModalProps as E, UserImportTokenType as F, UserPopoverProps as G, UserTransactionType as H, IMatchEvents as I, WalletAssetType as J, WalletPanelProps as K, LocaleType as L, ModalWithHeaderProps as M, WalletReceiveMessageType as N, OtherLoginMethodType as O, PopoverPositionType as P, RecommendLoginMethodType as R, ThemeType as T, UIProps as U, WalletConfigType as W, IEnvConfigType as a, LoginBoxProps as b, WalletType as c, PopoverTypeType as d, LoginPanelProps as e, LoginModalProps as f, ISocialLoginMethod as g, OverviewInfo as h, LoginMethodType as i, AppConfigType as j, BindInfoType as k, BindItemType as l, BindWalletParam as m, DrawerProps as n, IEnvName as o, ILoginWalletReq as p, IconProps as q, InputProps as r, MessageType as s, MetaPageType as t, ModalProps as u, PohItemType as v, PohZkpassParams as w, PopoverProps as x, UserAssetToken as y, UserChainType as z };
250
+ export type { AnyObject as A, ButtonProps as B, CEXType as C, DeepPartial as D, EmailModalProps as E, IMatchEvents as I, LocaleType as L, ModalProps as M, OtherLoginMethodType as O, PopoverProps as P, RecommendLoginMethodType as R, ThemeType as T, UserPopoverProps as U, WalletConfigType as W, IEnvConfigType as a, InputProps as b, ModalWithHeaderProps as c, LoginBoxProps as d, WalletType as e, PopoverPositionType as f, PopoverTypeType as g, LoginPanelProps as h, LoginModalProps as i, ISocialLoginMethod as j, OverviewInfo as k, LoginMethodType as l, AppConfigType as m, BindInfoType as n, BindItemType as o, BindWalletParam as p, DrawerProps as q, IEnvName as r, ILoginWalletReq as s, IconProps as t, MessageType as u, PohItemType as v, PohZkpassParams as w, WalletPanelProps as x, WalletReceiveMessageType as y };
@@ -12,7 +12,6 @@ import {useUserInfo} from "@matchain/matchid-sdk-react/hooks";
12
12
  import RoutePrivate from "@/components/RoutePrivate";
13
13
  import useLocalStore from "@/store/useLocalStore";
14
14
  import {LoginButton} from "@matchain/matchid-sdk-react/components";
15
- import UI from "@/pages/UI";
16
15
 
17
16
 
18
17
  function Nav() {
@@ -30,11 +29,6 @@ function Nav() {
30
29
  url: '/',
31
30
  onActive: location.pathname === '/'
32
31
  },
33
- {
34
- name: 'UI',
35
- url: '/ui',
36
- onActive: location.pathname === '/ui'
37
- },
38
32
  {
39
33
  name: 'User',
40
34
  url: '/user',
@@ -95,7 +89,6 @@ function RouterApp() {
95
89
  <div className={`p-4`}>
96
90
  <Routes>
97
91
  <Route path="/" element={<Home/>}/>
98
- <Route path="/ui" element={<UI/>}/>
99
92
  <Route element={<RoutePrivate/>}>
100
93
  <Route path="/user" element={<User/>}/>
101
94
  <Route path="/wallet" element={<Wallet/>}/>
@@ -3,7 +3,7 @@ import {defineChain} from "viem";
3
3
  export const matchMain = /*#__PURE__*/ defineChain({
4
4
  id: 698,
5
5
  name: "Matchain",
6
- nativeCurrency: { name: "Match Coin", symbol: "BNB", decimals: 18,icon:"https://cdn.matchid.ai/mid/token/bnb.png" },
6
+ nativeCurrency: { name: "Match Coin", symbol: "BNB", decimals: 18 },
7
7
  rpcUrls: {
8
8
  default: {
9
9
  http: ["https://rpc.matchain.io"],
@@ -16,11 +16,12 @@ export const matchMain = /*#__PURE__*/ defineChain({
16
16
  apiUrl: "https://matchscan.io/api",
17
17
  },
18
18
  },
19
- iconUrl: "https://cdn.matchid.ai/tgapp/logo_black.png",
19
+ iconUrl: "https://match-website-cdn.s3.ap-northeast-1.amazonaws.com/tgapp/logo_black.png",
20
20
  contracts: {
21
21
  multicall3: {
22
22
  address: "0xca11bde05977b3631167028862be2a173976ca11",
23
23
  }
24
24
  },
25
+ // testnet: true,
25
26
  });
26
27
 
@@ -1,6 +1,6 @@
1
1
  import { ModalWithHeader } from '@matchain/matchid-sdk-react/components';
2
2
  import React from "react";
3
- import QueryDisplay from "@/components/QueryDisplay";
3
+ import QueryDisplay from "@/pages/User/components/QueryDisplay";
4
4
  import {Api} from "@matchain/matchid-sdk-react";
5
5
  export default function BindListModal({isOpen, onClose}: {isOpen: boolean, onClose: () => void}) {
6
6
  const bindListQuery = Api.bind.useBindList()
@@ -1,6 +1,6 @@
1
1
  import { ModalWithHeader } from '@matchain/matchid-sdk-react/components';
2
2
  import React from "react";
3
- import QueryDisplay from "@/components/QueryDisplay";
3
+ import QueryDisplay from "@/pages/User/components/QueryDisplay";
4
4
  import {Api} from "@matchain/matchid-sdk-react";
5
5
  export default function PohListModal({isOpen, onClose}: {isOpen: boolean, onClose: () => void}) {
6
6
  const pohListQuery = Api.poh.usePohList()
@@ -5,10 +5,10 @@ import {useMatchEvents, useUserInfo, useWallet} from "@matchain/matchid-sdk-reac
5
5
  import {
6
6
  LoginButton,
7
7
  UsernameModal,
8
+ PasswordModal,
8
9
  } from "@matchain/matchid-sdk-react/components";
9
10
  import BindListModal from "@/pages/User/components/BindListModal";
10
11
  import PohListModal from "@/pages/User/components/PohListModal";
11
- import ChainListModal from "@/pages/Wallet/components/ChainListModal";
12
12
  import ButtonGroup from "@/components/ButtonGroup";
13
13
 
14
14
 
@@ -26,6 +26,7 @@ function LoginContent() {
26
26
  getAuthInfo
27
27
  } = useUserInfo();
28
28
  const [usernameOpen, setUsernameOpen] = useState(false)
29
+ const [passwordOpen, setPasswordOpen] = useState(false)
29
30
  const [modal, setModal] = useState<'bindList' | 'pohList' | ''>('')
30
31
  const refreshOv = async () => {
31
32
  await refreshOverview()
@@ -52,6 +53,10 @@ function LoginContent() {
52
53
  <button className={`bg-gray-300 p-1 rounded`}
53
54
  onClick={() => setUsernameOpen(true)}>Set username
54
55
  </button>
56
+
57
+ <button className={`bg-gray-300 p-1 rounded mr-5`}
58
+ onClick={() => setPasswordOpen(true)}>Set Password
59
+ </button>
55
60
  <button className={`bg-gray-300 p-1 rounded`}
56
61
  onClick={onAuth}>Third party auth
57
62
  </button>
@@ -68,6 +73,13 @@ function LoginContent() {
68
73
  alert('set username success')
69
74
  setUsernameOpen(false)
70
75
  }}/>
76
+ <PasswordModal isOpen={passwordOpen} onClose={() => setPasswordOpen(false)} onBack={() => {
77
+ console.log('set password modal back event')
78
+ setPasswordOpen(false)
79
+ }} onSuccess={() => {
80
+ alert('set password success')
81
+ setPasswordOpen(false)
82
+ }}/>
71
83
  </ButtonGroup>
72
84
  <ButtonGroup title={"Bind"}>
73
85
  {
@@ -1,4 +1,4 @@
1
- import {useUserInfo, useWallet} from "@matchain/matchid-sdk-react/hooks"
1
+ import {useWallet} from "@matchain/matchid-sdk-react/hooks"
2
2
  import {Input, Button} from "@matchain/matchid-sdk-react/components"
3
3
  import React, {useEffect, useMemo, useState} from "react";
4
4
  import {
@@ -38,9 +38,6 @@ import useLocalStore from "@/store/useLocalStore";
38
38
  import ButtonGroup from "@/components/ButtonGroup";
39
39
  import Erc20Abi from "@/abi/erc20.json";
40
40
  import type {Abi} from "abitype";
41
- import ChainListModal from "@/pages/Wallet/components/ChainListModal";
42
- import AssetListModal from "@/pages/Wallet/components/AssetListModal";
43
- import ImportTokenListModal from "@/pages/Wallet/components/ImportTokenListModal";
44
41
 
45
42
  const chainList = [
46
43
  mainnet,
@@ -68,10 +65,8 @@ const chainList = [
68
65
  ]
69
66
 
70
67
  export default function Wallet() {
71
- const [modal, setModal] = useState<'chainList' | 'assetList' | 'importTokenList' | '' >('')
72
68
 
73
69
  const {initChainId, setInitChainId} = useLocalStore()
74
- const {overview} = useUserInfo()
75
70
 
76
71
  const [message, setMessage] = useState('hello')
77
72
  const [toAddress, setToAddress] = useState('')
@@ -169,19 +164,6 @@ export default function Wallet() {
169
164
  <ButtonGroup title={"Wallet Ready"}>
170
165
  {walletReady ? 'Ready' : 'Not Ready'}
171
166
  </ButtonGroup>
172
-
173
- <ButtonGroup title={"QueryList"}>
174
- <button className={`bg-gray-300 p-1 rounded`}
175
- onClick={() => setModal('chainList')}>ChainList
176
- </button>
177
- <button className={`bg-gray-300 p-1 rounded`}
178
- onClick={() => setModal('assetList')}>AssetList
179
- </button>
180
- <button className={`bg-gray-300 p-1 rounded`}
181
- onClick={() => setModal('importTokenList')}>ImportTokenList
182
- </button>
183
-
184
- </ButtonGroup>
185
167
  <ButtonGroup title={"CreateWalletClient Chain"}>
186
168
  <select value={initChainId} onChange={(e) => setInitChainId(parseInt(e.target.value))}>
187
169
  {chainList.map((chain, index) => {
@@ -189,9 +171,6 @@ export default function Wallet() {
189
171
  })}
190
172
  </select>
191
173
  </ButtonGroup>
192
- <ButtonGroup title={"DID"}>
193
- <div className={`flex-1 flex-wrap break-all`}>{overview?.did}</div>
194
- </ButtonGroup>
195
174
  <ButtonGroup title={"Ethereum address"}>
196
175
  <div className={`flex-1 flex-wrap break-all`}>{address}</div>
197
176
  </ButtonGroup>
@@ -235,11 +214,6 @@ export default function Wallet() {
235
214
  <ButtonGroup title={"TxHash"}>
236
215
  <div className={`flex-1 flex-wrap break-all`}>{hash || '-'}</div>
237
216
  </ButtonGroup>
238
-
239
- {modal == 'chainList' && <ChainListModal isOpen onClose={() => setModal('')}/>}
240
- {modal == 'assetList' && <AssetListModal isOpen onClose={() => setModal('')}/>}
241
- {modal == 'importTokenList' && <ImportTokenListModal isOpen onClose={() => setModal('')}/>}
242
-
243
217
  <ERC20/>
244
218
  </div>
245
219
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@matchain/matchid-sdk-react",
3
- "version": "0.1.46-alpha.9",
3
+ "version": "0.1.46",
4
4
  "main": "dist/index.js",
5
5
  "types": "dist/index.d.ts",
6
6
  "exports": {
@@ -12,10 +12,6 @@
12
12
  "import": "./dist/components/index.mjs",
13
13
  "require": "./dist/components/index.js"
14
14
  },
15
- "./ui": {
16
- "import": "./dist/ui/index.mjs",
17
- "require": "./dist/ui/index.js"
18
- },
19
15
  "./hooks": {
20
16
  "import": "./dist/hooks/index.mjs",
21
17
  "require": "./dist/hooks/index.js"