@matchain/matchid-sdk-react 0.1.55-alpha.9 → 0.1.56-alpha.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 (64) hide show
  1. package/dist/api.d.mts +2 -2
  2. package/dist/api.d.ts +2 -2
  3. package/dist/api.js +11 -12
  4. package/dist/api.js.map +1 -1
  5. package/dist/api.mjs +2 -2
  6. package/dist/assets/lottie.d.mts +1 -1
  7. package/dist/assets/lottie.d.ts +1 -1
  8. package/dist/chains.d.mts +1 -1
  9. package/dist/chains.d.ts +1 -1
  10. package/dist/{chunk-2T4RY5BM.mjs → chunk-FGJ25ONR.mjs} +285 -277
  11. package/dist/chunk-FGJ25ONR.mjs.map +1 -0
  12. package/dist/{chunk-GCIXXSIH.mjs → chunk-SG45XKMV.mjs} +2 -2
  13. package/dist/components.d.mts +3 -3
  14. package/dist/components.d.ts +3 -3
  15. package/dist/components.js +295 -287
  16. package/dist/components.js.map +1 -1
  17. package/dist/components.mjs +1 -1
  18. package/dist/hooks.d.mts +4 -2
  19. package/dist/hooks.d.ts +4 -2
  20. package/dist/hooks.js +103 -100
  21. package/dist/hooks.js.map +1 -1
  22. package/dist/hooks.mjs +1 -1
  23. package/dist/icon.d.mts +2 -2
  24. package/dist/icon.d.ts +2 -2
  25. package/dist/{index-Bx7ztInz.d.ts → index-4dZbgWG2.d.ts} +1 -1
  26. package/dist/{index-DXRGMAbv.d.mts → index-B50DU_xT.d.mts} +4 -4
  27. package/dist/{index-DXRGMAbv.d.ts → index-B50DU_xT.d.ts} +4 -4
  28. package/dist/{index-D6wTVWuu.d.mts → index-BKSGbw7b.d.mts} +3 -3
  29. package/dist/{index-DL0LMDQ0.d.mts → index-BXbfmVoU.d.mts} +2 -2
  30. package/dist/{index-BTO2pJRz.d.ts → index-BtjgRcNJ.d.ts} +3 -3
  31. package/dist/{index-DY5CjOq2.d.ts → index-C82WIWvx.d.ts} +5 -5
  32. package/dist/{index-DysgDUCb.d.mts → index-CDTTHSh0.d.mts} +14 -14
  33. package/dist/{index-DysgDUCb.d.ts → index-CDTTHSh0.d.ts} +14 -14
  34. package/dist/{index-BjdOd1te.d.mts → index-CHG4-0Z1.d.mts} +987 -981
  35. package/dist/{index-8h2kA48e.d.ts → index-CsUEaGtM.d.ts} +2 -2
  36. package/dist/{index-CopoHLm5.d.ts → index-CwHXzvvB.d.ts} +1 -1
  37. package/dist/{index-DueNjDv_.d.ts → index-D1Ep9UMx.d.ts} +987 -981
  38. package/dist/{index-HYPgwvkU.d.mts → index-D7E317WV.d.mts} +5 -5
  39. package/dist/{index-B-u8_Lcy.d.ts → index-DK7l3lsH.d.ts} +13 -11
  40. package/dist/{index-BW1GRpQ3.d.mts → index-FKxw4Vaa.d.mts} +1 -1
  41. package/dist/{index-D2hhRO2j.d.mts → index-TjbO7d74.d.mts} +1 -1
  42. package/dist/{index-Ba8t2zs6.d.mts → index-YPRyEYt6.d.mts} +13 -11
  43. package/dist/index.d.mts +20 -20
  44. package/dist/index.d.ts +20 -20
  45. package/dist/index.js +101 -93
  46. package/dist/index.js.map +1 -1
  47. package/dist/index.mjs +2 -2
  48. package/dist/{types-Ch54HuTY.d.mts → types-DEsY_CPH.d.mts} +1 -1
  49. package/dist/{types-Ch54HuTY.d.ts → types-DEsY_CPH.d.ts} +1 -1
  50. package/dist/types.d.mts +1 -1
  51. package/dist/types.d.ts +1 -1
  52. package/dist/ui.d.mts +3 -4
  53. package/dist/ui.d.ts +3 -4
  54. package/dist/ui.js +13 -10
  55. package/dist/ui.js.map +1 -1
  56. package/dist/ui.mjs +3 -3
  57. package/example/package.json +3 -0
  58. package/example/src/App.tsx +7 -0
  59. package/example/src/pages/User/index.tsx +49 -4
  60. package/example/src/store/useStore.ts +14 -0
  61. package/example/yarn.lock +15 -0
  62. package/package.json +2 -3
  63. package/dist/chunk-2T4RY5BM.mjs.map +0 -1
  64. /package/dist/{chunk-GCIXXSIH.mjs.map → chunk-SG45XKMV.mjs.map} +0 -0
package/dist/index.js CHANGED
@@ -2446,7 +2446,7 @@ __export(ui_exports, {
2446
2446
  Field: () => Field,
2447
2447
  HashPanel: () => HashPanel_default,
2448
2448
  Input: () => Input,
2449
- Lottie: () => Lottie,
2449
+ Lottie: () => Lottie_default,
2450
2450
  Modal: () => Modal,
2451
2451
  ModalDrawer: () => ModalDrawer,
2452
2452
  ModalWithHeader: () => ModalWithHeader,
@@ -3544,7 +3544,7 @@ function WalletModalContent({
3544
3544
  }, [visible, connected, status, error, address]);
3545
3545
  return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: `matchid-wallet-box`, children: [
3546
3546
  /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: `matchid-wallet-content`, children: [
3547
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Lottie, { animationData: pageData.statusImage, style: {
3547
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Lottie_default, { animationData: pageData.statusImage, style: {
3548
3548
  width: 128,
3549
3549
  height: 128
3550
3550
  } }),
@@ -3628,7 +3628,7 @@ function WalletModalContentV2(props) {
3628
3628
  }, [props, submitting]);
3629
3629
  return /* @__PURE__ */ (0, import_jsx_runtime69.jsx)("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: `matchid-wallet-box`, children: [
3630
3630
  /* @__PURE__ */ (0, import_jsx_runtime69.jsxs)("div", { className: `matchid-wallet-content`, children: [
3631
- /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Lottie, { animationData: pageData.statusImage, style: {
3631
+ /* @__PURE__ */ (0, import_jsx_runtime69.jsx)(Lottie_default, { animationData: pageData.statusImage, style: {
3632
3632
  width: 128,
3633
3633
  height: 128
3634
3634
  } }),
@@ -3698,7 +3698,7 @@ var import_wagmi = require("wagmi");
3698
3698
  var import_ethers = require("ethers");
3699
3699
 
3700
3700
  // node_modules/@wagmi/core/dist/esm/version.js
3701
- var version = "2.16.3";
3701
+ var version = "2.16.5";
3702
3702
 
3703
3703
  // node_modules/@wagmi/core/dist/esm/utils/getVersion.js
3704
3704
  var getVersion2 = () => `@wagmi/core@${version}`;
@@ -3849,7 +3849,11 @@ async function getConnectorClient(config, parameters = {}) {
3849
3849
  if (config.state.status === "reconnecting" && !connector2.getAccounts && !connector2.getChainId)
3850
3850
  throw new ConnectorUnavailableReconnectingError({ connector: connector2 });
3851
3851
  const [accounts, chainId2] = await Promise.all([
3852
- connector2.getAccounts(),
3852
+ connector2.getAccounts().catch((e) => {
3853
+ if (parameters.account === null)
3854
+ return [];
3855
+ throw e;
3856
+ }),
3853
3857
  connector2.getChainId()
3854
3858
  ]);
3855
3859
  connection = {
@@ -3872,7 +3876,8 @@ async function getConnectorClient(config, parameters = {}) {
3872
3876
  if (connector.getClient)
3873
3877
  return connector.getClient({ chainId });
3874
3878
  const account = (0, import_utils6.parseAccount)(parameters.account ?? connection.accounts[0]);
3875
- account.address = (0, import_utils6.getAddress)(account.address);
3879
+ if (account)
3880
+ account.address = (0, import_utils6.getAddress)(account.address);
3876
3881
  if (parameters.account && !connection.accounts.some((x) => x.toLowerCase() === account.address.toLowerCase()))
3877
3882
  throw new ConnectorAccountNotFoundError({
3878
3883
  address: account.address,
@@ -4094,7 +4099,7 @@ function EVMConnectModal({
4094
4099
  }), children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(WalletContent, { onSuccess, type }) });
4095
4100
  }
4096
4101
  function EVMModal(props) {
4097
- return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(EVMConnectModal, { ...props });
4102
+ return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(import_rainbowkit.RainbowKitProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime70.jsx)(EVMConnectModal, { ...props }) });
4098
4103
  }
4099
4104
 
4100
4105
  // src/components/TRONModal/index.tsx
@@ -5830,7 +5835,7 @@ function HashPanel({
5830
5835
  /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("div", { className: `matchid-hashpanel-status`, style: {
5831
5836
  color: statusValue.color
5832
5837
  }, children: statusValue.text }),
5833
- statusValue.lottie ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Lottie, { animationData: statusValue.lottie, style: {
5838
+ statusValue.lottie ? /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Lottie_default, { animationData: statusValue.lottie, style: {
5834
5839
  width: "96px",
5835
5840
  height: "96px"
5836
5841
  } }) : /* @__PURE__ */ (0, import_jsx_runtime83.jsx)("img", { src: statusValue.icon, alt: statusValue.text, className: `matchid-hashpanel-img` }),
@@ -5956,17 +5961,20 @@ function Tabs(props) {
5956
5961
  }
5957
5962
 
5958
5963
  // src/ui/Lottie/index.tsx
5959
- var import_lottie_react = __toESM(require("lottie-react"));
5960
- var import_jsx_runtime89 = require("react/jsx-runtime");
5961
- function Lottie(props) {
5962
- console.log("Lottie", props);
5963
- const result = /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(import_lottie_react.default, { loop: true, autoplay: true, ...props });
5964
- console.log("result", result);
5965
- return result;
5966
- }
5964
+ var import_lottie_react = require("lottie-react");
5965
+ var LazyLottie = (props) => {
5966
+ const options = {
5967
+ animationData: props.animationData,
5968
+ loop: true,
5969
+ autoplay: true
5970
+ };
5971
+ const { View } = (0, import_lottie_react.useLottie)(options, props.style);
5972
+ return View;
5973
+ };
5974
+ var Lottie_default = LazyLottie;
5967
5975
 
5968
5976
  // src/context/ModalContext.tsx
5969
- var import_jsx_runtime90 = require("react/jsx-runtime");
5977
+ var import_jsx_runtime89 = require("react/jsx-runtime");
5970
5978
  var ModalContext = (0, import_react30.createContext)(null);
5971
5979
  function ModalProvider({ children }) {
5972
5980
  const [modalState, setModalState] = (0, import_react30.useState)({
@@ -6008,7 +6016,7 @@ function ModalProvider({ children }) {
6008
6016
  index: modalIndex,
6009
6017
  zIndex: newZIndex,
6010
6018
  close: () => closeModal(modalIndex),
6011
- content: ({ close, zIndex }) => /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(ModalDrawer, { showClose: true, isOpen: true, onClose: close, title: props.title, zIndex, onBack: props.onBack, children: /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(props.content, { close, zIndex }) })
6019
+ content: ({ close, zIndex }) => /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(ModalDrawer, { showClose: true, isOpen: true, onClose: close, title: props.title, zIndex, onBack: props.onBack, children: /* @__PURE__ */ (0, import_jsx_runtime89.jsx)(props.content, { close, zIndex }) })
6012
6020
  }],
6013
6021
  highestZIndex: newZIndex
6014
6022
  };
@@ -6020,7 +6028,7 @@ function ModalProvider({ children }) {
6020
6028
  document.body
6021
6029
  ) : null
6022
6030
  );
6023
- return /* @__PURE__ */ (0, import_jsx_runtime90.jsxs)(ModalContext.Provider, { value: { show, open }, children: [
6031
+ return /* @__PURE__ */ (0, import_jsx_runtime89.jsxs)(ModalContext.Provider, { value: { show, open }, children: [
6024
6032
  children,
6025
6033
  modalElements
6026
6034
  ] });
@@ -6064,7 +6072,7 @@ var useTransactionStore = (0, import_zustand5.create)((0, import_middleware3.dev
6064
6072
  var useTransactionStore_default = useTransactionStore;
6065
6073
 
6066
6074
  // src/hooks/useWallet.tsx
6067
- var import_jsx_runtime91 = require("react/jsx-runtime");
6075
+ var import_jsx_runtime90 = require("react/jsx-runtime");
6068
6076
  var AppClientId = "react-sdk-" + getVersion();
6069
6077
  function useWallet() {
6070
6078
  const { address, wallet: walletConfig } = useLocalStore_default();
@@ -6238,12 +6246,12 @@ function useWallet() {
6238
6246
  address: evmAccount.address
6239
6247
  });
6240
6248
  modal.show((props) => {
6241
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, hash: txHash, chain: _chain });
6249
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, hash: txHash, chain: _chain });
6242
6250
  });
6243
6251
  return txHash;
6244
6252
  } catch (error) {
6245
6253
  modal.show((props) => {
6246
- return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, error: typeof error == "string" ? error : error.details || error.message, chain: _chain });
6254
+ return /* @__PURE__ */ (0, import_jsx_runtime90.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, error: typeof error == "string" ? error : error.details || error.message, chain: _chain });
6247
6255
  });
6248
6256
  throw error;
6249
6257
  }
@@ -6321,7 +6329,7 @@ function useCopyClipboard(timeout = 500) {
6321
6329
  // src/context/ToastContext.tsx
6322
6330
  var import_react33 = require("react");
6323
6331
  var import_react_dom2 = require("react-dom");
6324
- var import_jsx_runtime92 = require("react/jsx-runtime");
6332
+ var import_jsx_runtime91 = require("react/jsx-runtime");
6325
6333
  var ToastContext = (0, import_react33.createContext)(null);
6326
6334
  function ToastProvider({ children, zIndex = 299 }) {
6327
6335
  const [toasts, setToasts] = (0, import_react33.useState)([]);
@@ -6334,28 +6342,28 @@ function ToastProvider({ children, zIndex = 299 }) {
6334
6342
  setTimeout(() => removeToast(id), timeout);
6335
6343
  }, [removeToast]);
6336
6344
  const success = (0, import_react33.useCallback)((text, timeout) => {
6337
- show({ icon: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(CheckRoundIcon, { color: "#2FCC00", size: 24 }), text, timeout });
6345
+ show({ icon: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(CheckRoundIcon, { color: "#2FCC00", size: 24 }), text, timeout });
6338
6346
  }, [show]);
6339
6347
  const error = (0, import_react33.useCallback)((text, timeout) => {
6340
- show({ icon: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(ErrorRoundIcon, { size: 24 }), text, timeout });
6348
+ show({ icon: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ErrorRoundIcon, { size: 24 }), text, timeout });
6341
6349
  }, [show]);
6342
6350
  const ToastComponent = (0, import_react_dom2.createPortal)(
6343
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: "matchid-toast-box", style: {
6351
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "matchid-toast-box", style: {
6344
6352
  zIndex
6345
- }, children: toasts.reverse().map(({ id, icon, text }) => /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
6353
+ }, children: toasts.reverse().map(({ id, icon, text }) => /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(
6346
6354
  "div",
6347
6355
  {
6348
6356
  className: "matchid-toast",
6349
6357
  children: [
6350
- icon && /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { children: icon }),
6351
- /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { children: text })
6358
+ icon && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { children: icon }),
6359
+ /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { children: text })
6352
6360
  ]
6353
6361
  },
6354
6362
  id
6355
6363
  )) }),
6356
6364
  document.body
6357
6365
  );
6358
- return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(ToastContext.Provider, { value: { show, success, error }, children: [
6366
+ return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)(ToastContext.Provider, { value: { show, success, error }, children: [
6359
6367
  children,
6360
6368
  ToastComponent
6361
6369
  ] });
@@ -6500,7 +6508,7 @@ function useWalletAssetListQuery({
6500
6508
  var import_react34 = require("react");
6501
6509
  var import_viem10 = require("viem");
6502
6510
  var import_react_intl19 = require("react-intl");
6503
- var import_jsx_runtime93 = require("react/jsx-runtime");
6511
+ var import_jsx_runtime92 = require("react/jsx-runtime");
6504
6512
  function useMatchChain() {
6505
6513
  const chainListQuery = useChainListQuery();
6506
6514
  const modal = useModal();
@@ -6531,28 +6539,28 @@ function useMatchChain() {
6531
6539
  const { chainId: storeChainId2, setChainId: setChainId2 } = useLocalStore_default();
6532
6540
  const [selectedChainId, setSelectedChainId] = (0, import_react34.useState)(storeChainId2);
6533
6541
  const isDownMd = useDownMd();
6534
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-change-network-box`, children: [
6535
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: `matchid-change-network-list`, children: chainListQuery.data?.map((item, index) => {
6536
- return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
6542
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-change-network-box`, children: [
6543
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: `matchid-change-network-list`, children: chainListQuery.data?.map((item, index) => {
6544
+ return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)(
6537
6545
  "div",
6538
6546
  {
6539
6547
  onClick: () => setSelectedChainId(item.id),
6540
6548
  className: `matchid-change-network-item ${selectedChainId == item.id ? "matchid-change-network-selected" : ""}`,
6541
6549
  children: [
6542
- /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-change-network-item-content`, children: [
6543
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("img", { src: item.iconUrl, className: `matchid-change-network-item-icon` }),
6544
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("span", { className: "matchid-change-network-item-name", children: item.name })
6550
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-change-network-item-content`, children: [
6551
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("img", { src: item.iconUrl, className: `matchid-change-network-item-icon` }),
6552
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("span", { className: "matchid-change-network-item-name", children: item.name })
6545
6553
  ] }),
6546
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Radio, { checked: selectedChainId === item.id, size: isDownMd ? 18 : 24 })
6554
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Radio, { checked: selectedChainId === item.id, size: isDownMd ? 18 : 24 })
6547
6555
  ]
6548
6556
  },
6549
6557
  index
6550
6558
  );
6551
6559
  }) }),
6552
- /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button, { size: "lg", highlight: true, onClick: () => {
6560
+ /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Button, { size: "lg", highlight: true, onClick: () => {
6553
6561
  setChainId2(selectedChainId || 0);
6554
6562
  close();
6555
- }, block: true, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl19.FormattedMessage, { id: "confirm" }) })
6563
+ }, block: true, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl19.FormattedMessage, { id: "confirm" }) })
6556
6564
  ] });
6557
6565
  }
6558
6566
  const showChangeNetwork = () => {
@@ -6625,7 +6633,7 @@ function useIsContract({
6625
6633
  }
6626
6634
 
6627
6635
  // src/components/ImportToken/index.tsx
6628
- var import_jsx_runtime94 = require("react/jsx-runtime");
6636
+ var import_jsx_runtime93 = require("react/jsx-runtime");
6629
6637
  function ImportToken({ close }) {
6630
6638
  const [status, setStatus] = (0, import_react35.useState)("");
6631
6639
  const { token } = useUserInfo();
@@ -6736,22 +6744,22 @@ function ImportToken({ close }) {
6736
6744
  enabled: canImport
6737
6745
  });
6738
6746
  if (status == "success" || status == "fail") {
6739
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-import-token-result matchid-flex`, children: [
6740
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-import-token-result-box matchid-flex`, children: [
6741
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-import-token-result-img`, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Lottie, { animationData: status == "success" ? success_default : fail_default, style: {
6747
+ return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-import-token-result matchid-flex`, children: [
6748
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-import-token-result-box matchid-flex`, children: [
6749
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: `matchid-import-token-result-img`, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Lottie_default, { animationData: status == "success" ? success_default : fail_default, style: {
6742
6750
  width: "96px",
6743
6751
  height: "96px"
6744
6752
  } }) }),
6745
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-import-token-result-text matchid-import-token-result-text-${status}`, children: status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl20.FormattedMessage, { id: "importSuccess" }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl20.FormattedMessage, { id: "importFail" }) })
6753
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: `matchid-import-token-result-text matchid-import-token-result-text-${status}`, children: status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl20.FormattedMessage, { id: "importSuccess" }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl20.FormattedMessage, { id: "importFail" }) })
6746
6754
  ] }),
6747
- status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Button, { size: "lg", onClick: close, block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl20.FormattedMessage, { id: "close" }) }) : /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Button, { size: "lg", onClick: () => setStatus(""), block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl20.FormattedMessage, { id: "back" }) })
6755
+ status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button, { size: "lg", onClick: close, block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl20.FormattedMessage, { id: "close" }) }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button, { size: "lg", onClick: () => setStatus(""), block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl20.FormattedMessage, { id: "back" }) })
6748
6756
  ] });
6749
6757
  }
6750
- return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-import-token`, children: [
6751
- /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "matchid-import-token-form", children: [
6752
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Field, { label: intl.formatMessage({
6758
+ return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-import-token`, children: [
6759
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "matchid-import-token-form", children: [
6760
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Field, { label: intl.formatMessage({
6753
6761
  id: "tokenSmartContract"
6754
- }), error: error.address ? error.address : isContractQuery.isFetched && !isContractQuery.isLoading && !isContractQuery.data && canImport ? "Address isn't a contract address" : "", children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
6762
+ }), error: error.address ? error.address : isContractQuery.isFetched && !isContractQuery.isLoading && !isContractQuery.data && canImport ? "Address isn't a contract address" : "", children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
6755
6763
  Input,
6756
6764
  {
6757
6765
  placeholder: intl.formatMessage({
@@ -6762,9 +6770,9 @@ function ImportToken({ close }) {
6762
6770
  maxLength: 42
6763
6771
  }
6764
6772
  ) }),
6765
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Field, { label: intl.formatMessage({
6773
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Field, { label: intl.formatMessage({
6766
6774
  id: "tokenSymbol"
6767
- }), error: error.symbol, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
6775
+ }), error: error.symbol, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
6768
6776
  Input,
6769
6777
  {
6770
6778
  placeholder: intl.formatMessage({
@@ -6775,9 +6783,9 @@ function ImportToken({ close }) {
6775
6783
  maxLength: 16
6776
6784
  }
6777
6785
  ) }),
6778
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Field, { label: intl.formatMessage({
6786
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Field, { label: intl.formatMessage({
6779
6787
  id: "tokenDecimals"
6780
- }), error: error.decimals, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
6788
+ }), error: error.decimals, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
6781
6789
  Input,
6782
6790
  {
6783
6791
  placeholder: intl.formatMessage({
@@ -6789,7 +6797,7 @@ function ImportToken({ close }) {
6789
6797
  }
6790
6798
  ) })
6791
6799
  ] }),
6792
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
6800
+ /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
6793
6801
  Button,
6794
6802
  {
6795
6803
  size: "lg",
@@ -6798,14 +6806,14 @@ function ImportToken({ close }) {
6798
6806
  loading: loading || isContractQuery.isLoading,
6799
6807
  disabled: !canImport || !isContractQuery.data,
6800
6808
  highlight: true,
6801
- children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl20.FormattedMessage, { id: "import" })
6809
+ children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl20.FormattedMessage, { id: "import" })
6802
6810
  }
6803
6811
  )
6804
6812
  ] });
6805
6813
  }
6806
6814
 
6807
6815
  // src/hooks/useMatchWallet.tsx
6808
- var import_jsx_runtime95 = require("react/jsx-runtime");
6816
+ var import_jsx_runtime94 = require("react/jsx-runtime");
6809
6817
  var ReceiveModal = () => {
6810
6818
  const chain = useMatchChain();
6811
6819
  const { address } = useWallet();
@@ -6819,10 +6827,10 @@ var ReceiveModal = () => {
6819
6827
  }));
6820
6828
  };
6821
6829
  const chainLink = chain.explorerLink("address/" + address);
6822
- return /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: `matchid-receive-modal`, children: [
6823
- /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "matchid-receive-container", children: [
6824
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: `matchid-receive-text`, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl21.FormattedMessage, { id: "receiveQrcode" }) }),
6825
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("div", { className: `matchid-qr-container`, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
6830
+ return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-receive-modal`, children: [
6831
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "matchid-receive-container", children: [
6832
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-receive-text`, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl21.FormattedMessage, { id: "receiveQrcode" }) }),
6833
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-qr-container`, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
6826
6834
  import_react_qrcode.QRCode,
6827
6835
  {
6828
6836
  margin: "0",
@@ -6830,7 +6838,7 @@ var ReceiveModal = () => {
6830
6838
  value: address
6831
6839
  }
6832
6840
  ) }),
6833
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
6841
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
6834
6842
  "a",
6835
6843
  {
6836
6844
  href: chainLink,
@@ -6840,7 +6848,7 @@ var ReceiveModal = () => {
6840
6848
  }
6841
6849
  )
6842
6850
  ] }),
6843
- /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Button, { size: "lg", onClick: onCopy, block: true, highlight: true, disabled: copied, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
6851
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Button, { size: "lg", onClick: onCopy, block: true, highlight: true, disabled: copied, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
6844
6852
  import_react_intl21.FormattedMessage,
6845
6853
  {
6846
6854
  id: "copyAddress"
@@ -7464,7 +7472,7 @@ function useTransaction({
7464
7472
  // src/components/CEXBindModal/index.tsx
7465
7473
  var import_react39 = require("react");
7466
7474
  var import_react_intl22 = require("react-intl");
7467
- var import_jsx_runtime96 = require("react/jsx-runtime");
7475
+ var import_jsx_runtime95 = require("react/jsx-runtime");
7468
7476
  function CEXBindModal({
7469
7477
  onClose,
7470
7478
  type,
@@ -7519,20 +7527,20 @@ function CEXBindModal({
7519
7527
  setLoading(false);
7520
7528
  }
7521
7529
  };
7522
- return /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(ModalWithHeader, { showClose: true, isOpen, onClose, title: intl.formatMessage({
7530
+ return /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(ModalWithHeader, { showClose: true, isOpen, onClose, title: intl.formatMessage({
7523
7531
  id: "CEXBindTitle"
7524
7532
  }, {
7525
7533
  type
7526
- }), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { className: "matchid-cex-modal", children: [
7527
- /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)("div", { children: [
7528
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindAttention" }) }),
7529
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindTips1" }) }),
7530
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindTips2" }) }),
7531
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindTips3" }) })
7534
+ }), ...props, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { className: "matchid-cex-modal", children: [
7535
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsxs)("div", { children: [
7536
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindAttention" }) }),
7537
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindTips1" }) }),
7538
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindTips2" }) }),
7539
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)("p", { children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl22.FormattedMessage, { id: "CEXBindTips3" }) })
7532
7540
  ] }),
7533
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Field, { label: intl.formatMessage({
7541
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Field, { label: intl.formatMessage({
7534
7542
  id: "CEXBindApiKey"
7535
- }), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
7543
+ }), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
7536
7544
  Input,
7537
7545
  {
7538
7546
  value: key,
@@ -7540,9 +7548,9 @@ function CEXBindModal({
7540
7548
  placeholder: "**** **** ****"
7541
7549
  }
7542
7550
  ) }),
7543
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Field, { label: intl.formatMessage({
7551
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Field, { label: intl.formatMessage({
7544
7552
  id: "CEXBindApiSecretKey"
7545
- }), error: !needPassphrase && error, children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
7553
+ }), error: !needPassphrase && error, children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
7546
7554
  Input,
7547
7555
  {
7548
7556
  value: secret,
@@ -7550,9 +7558,9 @@ function CEXBindModal({
7550
7558
  placeholder: "**** **** ****"
7551
7559
  }
7552
7560
  ) }),
7553
- needPassphrase && /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(Field, { error, label: intl.formatMessage({
7561
+ needPassphrase && /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(Field, { error, label: intl.formatMessage({
7554
7562
  id: "CEXBindApiPassphrase"
7555
- }), children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
7563
+ }), children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
7556
7564
  Input,
7557
7565
  {
7558
7566
  value: APIPassphrase,
@@ -7560,7 +7568,7 @@ function CEXBindModal({
7560
7568
  placeholder: "**** **** ****"
7561
7569
  }
7562
7570
  ) }),
7563
- /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
7571
+ /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(
7564
7572
  Button,
7565
7573
  {
7566
7574
  onClick: SubmitApi,
@@ -7568,7 +7576,7 @@ function CEXBindModal({
7568
7576
  block: true,
7569
7577
  loading,
7570
7578
  disabled: !key || !secret,
7571
- children: /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(import_react_intl22.FormattedMessage, { id: "continue" })
7579
+ children: /* @__PURE__ */ (0, import_jsx_runtime95.jsx)(import_react_intl22.FormattedMessage, { id: "continue" })
7572
7580
  }
7573
7581
  )
7574
7582
  ] }) });
@@ -7576,7 +7584,7 @@ function CEXBindModal({
7576
7584
 
7577
7585
  // src/context/BusinessProvider.tsx
7578
7586
  var import_react_query9 = require("@tanstack/react-query");
7579
- var import_jsx_runtime97 = require("react/jsx-runtime");
7587
+ var import_jsx_runtime96 = require("react/jsx-runtime");
7580
7588
  function BusinessProvider({ children }) {
7581
7589
  const { overview, token } = useUserInfo();
7582
7590
  const { type: EVMType, isOpen: EVMIsOpen, close: EVMClose } = useEVMModalStore();
@@ -7610,8 +7618,8 @@ function BusinessProvider({ children }) {
7610
7618
  enabled: !!tgAppAuthCode,
7611
7619
  refetchInterval: 1e3 * 5
7612
7620
  });
7613
- return /* @__PURE__ */ (0, import_jsx_runtime97.jsxs)(import_jsx_runtime97.Fragment, { children: [
7614
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
7621
+ return /* @__PURE__ */ (0, import_jsx_runtime96.jsxs)(import_jsx_runtime96.Fragment, { children: [
7622
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
7615
7623
  EVMModal,
7616
7624
  {
7617
7625
  isOpen: EVMIsOpen && (EVMType == "login" && !overview && !token || EVMType == "bind" && !!token && !!overview),
@@ -7621,7 +7629,7 @@ function BusinessProvider({ children }) {
7621
7629
  zIndex: 199
7622
7630
  }
7623
7631
  ),
7624
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
7632
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
7625
7633
  TRONModal,
7626
7634
  {
7627
7635
  isOpen: TRONIsOpen && (TRONType == "login" && !overview && !token || TRONType == "bind" && !!token && !!overview),
@@ -7631,7 +7639,7 @@ function BusinessProvider({ children }) {
7631
7639
  zIndex: 199
7632
7640
  }
7633
7641
  ),
7634
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
7642
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
7635
7643
  TONModal,
7636
7644
  {
7637
7645
  isOpen: TONIsOpen && (TONType == "login" && !overview && !token || TONType == "bind" && !!token && !!overview),
@@ -7641,7 +7649,7 @@ function BusinessProvider({ children }) {
7641
7649
  zIndex: 199
7642
7650
  }
7643
7651
  ),
7644
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
7652
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
7645
7653
  BTCModal,
7646
7654
  {
7647
7655
  isOpen: BTCIsOpen && (BTCType == "login" && !overview && !token || BTCType == "bind" && !!token && !!overview),
@@ -7651,7 +7659,7 @@ function BusinessProvider({ children }) {
7651
7659
  zIndex: 199
7652
7660
  }
7653
7661
  ),
7654
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
7662
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
7655
7663
  CEXBindModal,
7656
7664
  {
7657
7665
  isOpen: CEXIsOpen && (!!token && !!overview),
@@ -7660,7 +7668,7 @@ function BusinessProvider({ children }) {
7660
7668
  zIndex: 199
7661
7669
  }
7662
7670
  ),
7663
- /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(
7671
+ /* @__PURE__ */ (0, import_jsx_runtime96.jsx)(
7664
7672
  WalletModal,
7665
7673
  {
7666
7674
  isOpen: WalletModalStore.isOpen && (WalletModalStore.type == "login" && !overview && !token || WalletModalStore.type == "bind" && !!token && !!overview),
@@ -7675,9 +7683,9 @@ function BusinessProvider({ children }) {
7675
7683
  }
7676
7684
 
7677
7685
  // src/context/index.tsx
7678
- var import_jsx_runtime98 = require("react/jsx-runtime");
7686
+ var import_jsx_runtime97 = require("react/jsx-runtime");
7679
7687
  var Providers = ({ children }) => {
7680
- return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ToastProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(ModalProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(BusinessProvider, { children }) }) });
7688
+ return /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ToastProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(ModalProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime97.jsx)(BusinessProvider, { children }) }) });
7681
7689
  };
7682
7690
  var context_default = Providers;
7683
7691
 
@@ -8939,7 +8947,7 @@ var matchTest = /* @__PURE__ */ (0, import_viem17.defineChain)({
8939
8947
 
8940
8948
  // src/MatchContext.tsx
8941
8949
  var import_wagmi3 = require("wagmi");
8942
- var import_jsx_runtime99 = require("react/jsx-runtime");
8950
+ var import_jsx_runtime98 = require("react/jsx-runtime");
8943
8951
  var queryClient = new import_react_query10.QueryClient();
8944
8952
  var wagmiConfig = (0, import_rainbowkit2.getDefaultConfig)({
8945
8953
  appName: "MatchID",
@@ -8978,7 +8986,7 @@ var MatchProvider = ({
8978
8986
  useWalletInit({
8979
8987
  config: wallet
8980
8988
  });
8981
- return /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_intl23.IntlProvider, { locale: realLocale, messages: messages[realLocale], children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_wagmi3.WagmiProvider, { config: wagmiConfig, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_react_query10.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(import_rainbowkit2.RainbowKitProvider, { children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(
8989
+ return /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_intl23.IntlProvider, { locale: realLocale, messages: messages[realLocale], children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_wagmi3.WagmiProvider, { config: wagmiConfig, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(import_react_query10.QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(
8982
8990
  MatchContext.Provider,
8983
8991
  {
8984
8992
  value: {
@@ -8989,9 +8997,9 @@ var MatchProvider = ({
8989
8997
  theme,
8990
8998
  locale: realLocale
8991
8999
  },
8992
- children: /* @__PURE__ */ (0, import_jsx_runtime99.jsx)(context_default, { children })
9000
+ children: /* @__PURE__ */ (0, import_jsx_runtime98.jsx)(context_default, { children })
8993
9001
  }
8994
- ) }) }) }) });
9002
+ ) }) }) });
8995
9003
  };
8996
9004
  var useMatch = () => {
8997
9005
  const context = (0, import_react42.useContext)(MatchContext);