@matchain/matchid-sdk-react 0.1.53-alpha.1 → 0.1.53-alpha.3

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 (84) hide show
  1. package/dist/assets/icon/index.d.mts +4 -2
  2. package/dist/assets/icon/index.d.ts +4 -2
  3. package/dist/assets/icon/index.js +19 -0
  4. package/dist/assets/icon/index.js.map +1 -1
  5. package/dist/assets/icon/index.mjs +3 -1
  6. package/dist/{chunk-LHNKZISB.mjs → chunk-3USZ4ZZY.mjs} +20 -2
  7. package/dist/chunk-3USZ4ZZY.mjs.map +1 -0
  8. package/dist/{chunk-2DVC6WCN.mjs → chunk-3YF3P77J.mjs} +270 -419
  9. package/dist/chunk-3YF3P77J.mjs.map +1 -0
  10. package/dist/{chunk-6QTW3KXN.mjs → chunk-4EVF2PXX.mjs} +2 -2
  11. package/dist/{chunk-HLUFAIFV.mjs → chunk-OCQ2AIM3.mjs} +7 -2
  12. package/dist/{chunk-HLUFAIFV.mjs.map → chunk-OCQ2AIM3.mjs.map} +1 -1
  13. package/dist/{chunk-FB5MHLWX.mjs → chunk-V2S54LGG.mjs} +2 -2
  14. package/dist/components/index.d.mts +3 -3
  15. package/dist/components/index.d.ts +3 -3
  16. package/dist/components/index.js +396 -511
  17. package/dist/components/index.js.map +1 -1
  18. package/dist/components/index.mjs +5 -7
  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 +89 -133
  22. package/dist/hooks/api/index.js.map +1 -1
  23. package/dist/hooks/api/index.mjs +5 -5
  24. package/dist/hooks/index.d.mts +2 -2
  25. package/dist/hooks/index.d.ts +2 -2
  26. package/dist/hooks/index.js +207 -264
  27. package/dist/hooks/index.js.map +1 -1
  28. package/dist/hooks/index.mjs +5 -5
  29. package/dist/{index-DvM6x6e6.d.ts → index-BKHtf1Tu.d.ts} +1 -1
  30. package/dist/{index-BDoEk1EK.d.ts → index-BSUoL5Jo.d.mts} +4 -11
  31. package/dist/{index-XzSw1Bym.d.mts → index-BVO4Bt59.d.ts} +4 -11
  32. package/dist/{index-k2Uf0F94.d.ts → index-CcN5ls1U.d.ts} +1 -1
  33. package/dist/{index-BUj9mOrS.d.ts → index-Cul4qlZl.d.ts} +1 -1
  34. package/dist/{index-D5OzNRfu.d.mts → index-CvVl_Xw1.d.mts} +2 -2
  35. package/dist/{index-Bmir-Wor.d.mts → index-DXRsJY9h.d.mts} +1 -1
  36. package/dist/{index-X_fw5wX_.d.ts → index-DgwlV4ve.d.ts} +3 -3
  37. package/dist/{index-B_o9HBS1.d.mts → index-DrEKzXYX.d.mts} +1 -1
  38. package/dist/{index-B-QfwtE5.d.mts → index-EPwrSSOz.d.mts} +3 -3
  39. package/dist/{index-CDqIk5k2.d.mts → index-ba3VTkaV.d.mts} +1 -1
  40. package/dist/{index-DMUZQqNB.d.ts → index-lKJjj0w4.d.ts} +2 -2
  41. package/dist/index.d.mts +7 -8
  42. package/dist/index.d.ts +7 -8
  43. package/dist/index.js +509 -601
  44. package/dist/index.js.map +1 -1
  45. package/dist/index.mjs +12 -12
  46. package/dist/types/index.d.mts +1 -1
  47. package/dist/types/index.d.ts +1 -1
  48. package/dist/{types-Dd_ExpLx.d.mts → types-Bgd3Ac92.d.mts} +1 -2
  49. package/dist/{types-Dd_ExpLx.d.ts → types-Bgd3Ac92.d.ts} +1 -2
  50. package/dist/ui/index.d.mts +3 -3
  51. package/dist/ui/index.d.ts +3 -3
  52. package/dist/ui/index.js +62 -59
  53. package/dist/ui/index.js.map +1 -1
  54. package/dist/ui/index.mjs +2 -2
  55. package/dist/utils/index.d.mts +2 -1
  56. package/dist/utils/index.d.ts +2 -1
  57. package/dist/utils/index.js +6 -0
  58. package/dist/utils/index.js.map +1 -1
  59. package/dist/utils/index.mjs +3 -1
  60. package/example/dist/assets/ccip-nxE3Zma4.js +1 -0
  61. package/example/dist/assets/index-BFAv3rdU.css +1 -0
  62. package/example/dist/assets/index-DMWWRDPI.js +1658 -0
  63. package/example/dist/index.html +2 -2
  64. package/package.json +1 -5
  65. package/dist/chunk-2DVC6WCN.mjs.map +0 -1
  66. package/dist/chunk-LHNKZISB.mjs.map +0 -1
  67. package/example/dist/assets/TransportWebHID-BEu7tC0r.js +0 -1
  68. package/example/dist/assets/bignumber-iG7K-qxw.js +0 -10
  69. package/example/dist/assets/ccip-a6wQ1Vcb.js +0 -1
  70. package/example/dist/assets/draggabilly-CRYR_S0q.js +0 -14
  71. package/example/dist/assets/index--dp9m9Ep.js +0 -1
  72. package/example/dist/assets/index-BDTHolFv.js +0 -569
  73. package/example/dist/assets/index-BZl59qLb.js +0 -179
  74. package/example/dist/assets/index-BmMbYNHO.js +0 -303
  75. package/example/dist/assets/index-C7cxVRDF.js +0 -1677
  76. package/example/dist/assets/index-CJk171Yb.js +0 -1
  77. package/example/dist/assets/index-CQiBesAa.js +0 -3
  78. package/example/dist/assets/index-D62loNA9.js +0 -3
  79. package/example/dist/assets/index-DqyX3FG6.js +0 -1
  80. package/example/dist/assets/index-Gy3FXGhr.css +0 -1
  81. package/example/dist/assets/inherits_browser-BlmhoU4v.js +0 -1
  82. package/example/dist/assets/solanaEmbed.esm-Djn-u4Vn.js +0 -38
  83. /package/dist/{chunk-6QTW3KXN.mjs.map → chunk-4EVF2PXX.mjs.map} +0 -0
  84. /package/dist/{chunk-FB5MHLWX.mjs.map → chunk-V2S54LGG.mjs.map} +0 -0
@@ -43,7 +43,7 @@ __export(hooks_exports, {
43
43
  useToast: () => useToast,
44
44
  useTransaction: () => useTransaction,
45
45
  useUserInfo: () => useUserInfo,
46
- useWallet: () => useWallet2
46
+ useWallet: () => useWallet
47
47
  });
48
48
  module.exports = __toCommonJS(hooks_exports);
49
49
 
@@ -349,10 +349,10 @@ var localStore = useLocalStore;
349
349
  var useLocalStore_default = useLocalStore;
350
350
 
351
351
  // src/hooks/useUserInfo.tsx
352
- var import_react32 = require("react");
352
+ var import_react31 = require("react");
353
353
 
354
354
  // src/MatchContext.tsx
355
- var import_react31 = require("react");
355
+ var import_react30 = require("react");
356
356
 
357
357
  // src/store/useModalStore.ts
358
358
  var import_zustand2 = require("zustand");
@@ -614,6 +614,9 @@ function TransferIcon({ size = 40, ...props }) {
614
614
  // src/assets/icon/ArrowSendIcon.tsx
615
615
  var import_jsx_runtime48 = require("react/jsx-runtime");
616
616
 
617
+ // src/assets/icon/PhantomIcon.tsx
618
+ var import_jsx_runtime49 = require("react/jsx-runtime");
619
+
617
620
  // src/hooks/useLayout.tsx
618
621
  var useLayout_exports = {};
619
622
  __export(useLayout_exports, {
@@ -635,16 +638,10 @@ function useDownMd() {
635
638
  }
636
639
 
637
640
  // src/hooks/useConfig.tsx
638
- var import_jsx_runtime49 = require("react/jsx-runtime");
641
+ var import_jsx_runtime50 = require("react/jsx-runtime");
639
642
  var DEFAULT_WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
640
643
 
641
644
  // src/store/useModalStore.ts
642
- var useSOLModalStore = (0, import_zustand2.create)((set) => ({
643
- isOpen: false,
644
- type: "",
645
- open: (type) => set({ isOpen: true, type }),
646
- close: () => set({ isOpen: false })
647
- }));
648
645
  var useTRONModalStore = (0, import_zustand2.create)((set) => ({
649
646
  isOpen: false,
650
647
  type: "",
@@ -682,7 +679,7 @@ var import_react6 = require("react");
682
679
 
683
680
  // src/ui/Overlay/index.tsx
684
681
  var import_react2 = require("react");
685
- var import_jsx_runtime50 = require("react/jsx-runtime");
682
+ var import_jsx_runtime51 = require("react/jsx-runtime");
686
683
  function Overlay({
687
684
  isOpen = false,
688
685
  children,
@@ -698,7 +695,7 @@ function Overlay({
698
695
  document.body.style.overflow = "";
699
696
  };
700
697
  }, [isOpen]);
701
- return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(
698
+ return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(
702
699
  "div",
703
700
  {
704
701
  className: "matchid-overlay",
@@ -707,11 +704,11 @@ function Overlay({
707
704
  },
708
705
  children
709
706
  }
710
- ) : /* @__PURE__ */ (0, import_jsx_runtime50.jsx)(import_jsx_runtime50.Fragment, {});
707
+ ) : /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(import_jsx_runtime51.Fragment, {});
711
708
  }
712
709
 
713
710
  // src/ui/Modal/index.tsx
714
- var import_jsx_runtime51 = require("react/jsx-runtime");
711
+ var import_jsx_runtime52 = require("react/jsx-runtime");
715
712
  function Modal({
716
713
  children,
717
714
  isOpen,
@@ -719,10 +716,10 @@ function Modal({
719
716
  zIndex = 100,
720
717
  className = ""
721
718
  }) {
722
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: `matchid-modal ${className}`, style: {
719
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: `matchid-modal ${className}`, style: {
723
720
  width
724
721
  }, children: [
725
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("div", { className: "matchid-modal-mobile-header" }),
722
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("div", { className: "matchid-modal-mobile-header" }),
726
723
  children
727
724
  ] }) });
728
725
  }
@@ -736,13 +733,13 @@ function ModalWithHeader({
736
733
  ...props
737
734
  }) {
738
735
  const isDownMd = useDownMd();
739
- return /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)(Modal, { ...props, children: [
740
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: `matchid-modal-header ${showBorder ? "matchid-modal-header-border" : ""}`, children: [
741
- /* @__PURE__ */ (0, import_jsx_runtime51.jsxs)("div", { className: "matchid-modal-header-content", children: [
742
- onBack && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(ArrowLeftIcon, { height: isDownMd ? 20 : 25, width: isDownMd ? 20 : 24, className: "matchid-modal-header-back", onClick: onBack }),
743
- /* @__PURE__ */ (0, import_jsx_runtime51.jsx)("span", { className: "matchid-modal-header-title", children: title })
736
+ return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)(Modal, { ...props, children: [
737
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: `matchid-modal-header ${showBorder ? "matchid-modal-header-border" : ""}`, children: [
738
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("div", { className: "matchid-modal-header-content", children: [
739
+ onBack && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(ArrowLeftIcon, { height: isDownMd ? 20 : 25, width: isDownMd ? 20 : 24, className: "matchid-modal-header-back", onClick: onBack }),
740
+ /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: "matchid-modal-header-title", children: title })
744
741
  ] }),
745
- onClose && /* @__PURE__ */ (0, import_jsx_runtime51.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30, className: "matchid-modal-header-close", onClick: onClose })
742
+ onClose && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30, className: "matchid-modal-header-close", onClick: onClose })
746
743
  ] }),
747
744
  children
748
745
  ] });
@@ -753,7 +750,7 @@ var import_react4 = require("react");
753
750
 
754
751
  // src/utils/index.tsx
755
752
  var import_moment = __toESM(require("moment"));
756
- var import_jsx_runtime52 = require("react/jsx-runtime");
753
+ var import_jsx_runtime53 = require("react/jsx-runtime");
757
754
  var getVersion = () => {
758
755
  return "0.0.2";
759
756
  };
@@ -785,10 +782,10 @@ var NumberFormatter = ({
785
782
  const [intPart, decimalPart] = numberValue.toString().split(".");
786
783
  const intFormat = separator ? intPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",") : intPart;
787
784
  if (Math.abs(parseFloat(numberValue)) >= 1) {
788
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className, children: [
789
- prefix && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: prefixClassName, children: prefix }),
790
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: intClassName, children: intFormat }),
791
- decimalPart ? /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: decimalClassName, children: [
785
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className, children: [
786
+ prefix && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: prefixClassName, children: prefix }),
787
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: intClassName, children: intFormat }),
788
+ decimalPart ? /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: decimalClassName, children: [
792
789
  ".",
793
790
  decimalPart.substring(0, fixNum)
794
791
  ] }) : "",
@@ -805,30 +802,30 @@ var NumberFormatter = ({
805
802
  }
806
803
  }
807
804
  if (zeroCount < tFixNum) {
808
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className, children: [
809
- prefix && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: prefixClassName, children: prefix }),
810
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: intClassName, children: intFormat }),
811
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: decimalClassName, children: [
805
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className, children: [
806
+ prefix && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: prefixClassName, children: prefix }),
807
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: intClassName, children: intFormat }),
808
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: decimalClassName, children: [
812
809
  ".",
813
810
  decimalPart.substring(0, tFixNum)
814
811
  ] }),
815
812
  suffix
816
813
  ] });
817
814
  }
818
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className, children: [
819
- prefix && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: prefixClassName, children: prefix }),
820
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: intClassName, children: intFormat }),
821
- /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className: decimalClassName, children: [
815
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className, children: [
816
+ prefix && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: prefixClassName, children: prefix }),
817
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: intClassName, children: intFormat }),
818
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className: decimalClassName, children: [
822
819
  ".0",
823
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("sub", { children: zeroCount }),
820
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("sub", { children: zeroCount }),
824
821
  decimalPart?.substring(zeroCount, zeroCount + tFixNum - 2)
825
822
  ] }),
826
823
  suffix
827
824
  ] });
828
825
  }
829
- return /* @__PURE__ */ (0, import_jsx_runtime52.jsxs)("span", { className, children: [
830
- prefix && /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: prefixClassName, children: prefix }),
831
- /* @__PURE__ */ (0, import_jsx_runtime52.jsx)("span", { className: intClassName, children: intPart }),
826
+ return /* @__PURE__ */ (0, import_jsx_runtime53.jsxs)("span", { className, children: [
827
+ prefix && /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: prefixClassName, children: prefix }),
828
+ /* @__PURE__ */ (0, import_jsx_runtime53.jsx)("span", { className: intClassName, children: intPart }),
832
829
  suffix
833
830
  ] });
834
831
  };
@@ -837,7 +834,7 @@ var isInTgApp = () => {
837
834
  };
838
835
 
839
836
  // src/ui/Button/index.tsx
840
- var import_jsx_runtime53 = require("react/jsx-runtime");
837
+ var import_jsx_runtime54 = require("react/jsx-runtime");
841
838
  function Button({
842
839
  size = "df",
843
840
  disabled = false,
@@ -856,7 +853,7 @@ function Button({
856
853
  onClick && onClick();
857
854
  }
858
855
  };
859
- return /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(
856
+ return /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
860
857
  "button",
861
858
  {
862
859
  type,
@@ -866,14 +863,14 @@ function Button({
866
863
  ...style
867
864
  },
868
865
  onClick: onAction,
869
- children: loading ? /* @__PURE__ */ (0, import_jsx_runtime53.jsx)(LoadingIcon_default, { className: "matchid-btn-loading-icon", color: "var(--matchid-btn-loading-color)" }) : children
866
+ children: loading ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(LoadingIcon_default, { className: "matchid-btn-loading-icon", color: "var(--matchid-btn-loading-color)" }) : children
870
867
  }
871
868
  );
872
869
  }
873
870
 
874
871
  // src/ui/Input/index.tsx
875
872
  var import_react3 = require("react");
876
- var import_jsx_runtime54 = require("react/jsx-runtime");
873
+ var import_jsx_runtime55 = require("react/jsx-runtime");
877
874
  function Input({
878
875
  onChange,
879
876
  type,
@@ -883,17 +880,17 @@ function Input({
883
880
  }) {
884
881
  const [inputType, setInputType] = (0, import_react3.useState)(type);
885
882
  const isDownMd = useDownMd();
886
- return /* @__PURE__ */ (0, import_jsx_runtime54.jsxs)(
883
+ return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)(
887
884
  "div",
888
885
  {
889
886
  className: `matchid-input-box ${props.value && props.value.length > 0 ? "matchid-input-has-content" : ""} ${className}`,
890
887
  children: [
891
- /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("input", { type: inputType, onChange, ...props, className: "matchid-input-field" }),
892
- props.value && props.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "matchid-input-delete-icon", onClick: (e) => {
888
+ /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("input", { type: inputType, onChange, ...props, className: "matchid-input-field" }),
889
+ props.value && props.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "matchid-input-delete-icon", onClick: (e) => {
893
890
  if (onChange) {
894
891
  onChange({ target: { value: "" } });
895
892
  }
896
- }, children: /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(
893
+ }, children: /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(
897
894
  DeleteRoundIcon,
898
895
  {
899
896
  height: isDownMd ? 16 : 21,
@@ -901,9 +898,9 @@ function Input({
901
898
  color: "var(--matchid-input-delete-icon-color)"
902
899
  }
903
900
  ) }),
904
- type === "password" && /* @__PURE__ */ (0, import_jsx_runtime54.jsx)("div", { className: "matchid-input-eye-icon", onClick: () => {
901
+ type === "password" && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "matchid-input-eye-icon", onClick: () => {
905
902
  setInputType(inputType === "password" ? "text" : "password");
906
- }, children: inputType === "password" ? /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(CloseEyeIcon, { size: isDownMd ? 16 : 20 }) : /* @__PURE__ */ (0, import_jsx_runtime54.jsx)(OpenEyeIcon, { size: isDownMd ? 16 : 20 }) }),
903
+ }, children: inputType === "password" ? /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(CloseEyeIcon, { size: isDownMd ? 16 : 20 }) : /* @__PURE__ */ (0, import_jsx_runtime55.jsx)(OpenEyeIcon, { size: isDownMd ? 16 : 20 }) }),
907
904
  after
908
905
  ]
909
906
  }
@@ -911,7 +908,7 @@ function Input({
911
908
  }
912
909
 
913
910
  // src/ui/Field/index.tsx
914
- var import_jsx_runtime55 = require("react/jsx-runtime");
911
+ var import_jsx_runtime56 = require("react/jsx-runtime");
915
912
  function Field({
916
913
  label,
917
914
  children,
@@ -919,19 +916,19 @@ function Field({
919
916
  required,
920
917
  className = ""
921
918
  }) {
922
- return /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: `matchid-field-box ${className}`, children: [
923
- /* @__PURE__ */ (0, import_jsx_runtime55.jsxs)("div", { className: "matchid-field-label", children: [
924
- required && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("span", { className: "matchid-field-required", children: "*" }),
919
+ return /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: `matchid-field-box ${className}`, children: [
920
+ /* @__PURE__ */ (0, import_jsx_runtime56.jsxs)("div", { className: "matchid-field-label", children: [
921
+ required && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("span", { className: "matchid-field-required", children: "*" }),
925
922
  label
926
923
  ] }),
927
924
  children,
928
- error && /* @__PURE__ */ (0, import_jsx_runtime55.jsx)("div", { className: "matchid-field-error", children: error })
925
+ error && /* @__PURE__ */ (0, import_jsx_runtime56.jsx)("div", { className: "matchid-field-error", children: error })
929
926
  ] });
930
927
  }
931
928
 
932
929
  // src/components/EmailModal/StepEmail.tsx
933
930
  var import_react_intl = require("react-intl");
934
- var import_jsx_runtime56 = require("react/jsx-runtime");
931
+ var import_jsx_runtime57 = require("react/jsx-runtime");
935
932
 
936
933
  // src/components/EmailModal/StepVerify.tsx
937
934
  var import_react5 = require("react");
@@ -941,15 +938,15 @@ var NATIVE_TOKEN_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
941
938
 
942
939
  // src/components/EmailModal/StepVerify.tsx
943
940
  var import_react_intl2 = require("react-intl");
944
- var import_jsx_runtime57 = require("react/jsx-runtime");
941
+ var import_jsx_runtime58 = require("react/jsx-runtime");
945
942
 
946
943
  // src/components/EmailModal/index.tsx
947
944
  var import_react_intl3 = require("react-intl");
948
- var import_jsx_runtime58 = require("react/jsx-runtime");
945
+ var import_jsx_runtime59 = require("react/jsx-runtime");
949
946
 
950
947
  // src/ui/Popover/index.tsx
951
948
  var import_react7 = require("react");
952
- var import_jsx_runtime59 = require("react/jsx-runtime");
949
+ var import_jsx_runtime60 = require("react/jsx-runtime");
953
950
 
954
951
  // src/components/LoginBox/index.tsx
955
952
  var import_react8 = require("react");
@@ -959,39 +956,39 @@ var import_react_intl4 = require("react-intl");
959
956
  var import_react_query = require("@tanstack/react-query");
960
957
 
961
958
  // src/components/LoginBox/index.tsx
962
- var import_jsx_runtime60 = require("react/jsx-runtime");
959
+ var import_jsx_runtime61 = require("react/jsx-runtime");
963
960
 
964
961
  // src/components/LoginButton/index.tsx
965
962
  var import_react10 = require("react");
966
963
 
967
964
  // src/components/LoginPanel/index.tsx
968
965
  var import_react_intl5 = require("react-intl");
969
- var import_jsx_runtime61 = require("react/jsx-runtime");
966
+ var import_jsx_runtime62 = require("react/jsx-runtime");
970
967
 
971
968
  // src/components/LoginModal/index.tsx
972
- var import_jsx_runtime62 = require("react/jsx-runtime");
969
+ var import_jsx_runtime63 = require("react/jsx-runtime");
973
970
 
974
971
  // src/components/UserPopover/index.tsx
975
972
  var import_react9 = require("react");
976
973
 
977
974
  // src/assets/icon/ProfileIcon.tsx
978
- var import_jsx_runtime63 = require("react/jsx-runtime");
975
+ var import_jsx_runtime64 = require("react/jsx-runtime");
979
976
 
980
977
  // src/components/UserPopover/index.tsx
981
978
  var import_react_intl6 = require("react-intl");
982
- var import_jsx_runtime64 = require("react/jsx-runtime");
979
+ var import_jsx_runtime65 = require("react/jsx-runtime");
983
980
 
984
981
  // src/components/LoginButton/index.tsx
985
982
  var import_react_intl7 = require("react-intl");
986
- var import_jsx_runtime65 = require("react/jsx-runtime");
983
+ var import_jsx_runtime66 = require("react/jsx-runtime");
987
984
 
988
985
  // src/components/UsernameModal/index.tsx
989
986
  var import_react11 = require("react");
990
987
  var import_react_intl8 = require("react-intl");
991
- var import_jsx_runtime66 = require("react/jsx-runtime");
988
+ var import_jsx_runtime67 = require("react/jsx-runtime");
992
989
 
993
- // src/components/SOLModal/index.tsx
994
- var import_react13 = __toESM(require("react"));
990
+ // src/components/TRONModal/index.tsx
991
+ var import_react14 = __toESM(require("react"));
995
992
 
996
993
  // src/hooks/eventManager.ts
997
994
  var EventManager = class {
@@ -1021,112 +1018,49 @@ var EventManager = class {
1021
1018
  var eventManager = new EventManager();
1022
1019
  var eventManager_default = eventManager;
1023
1020
 
1024
- // src/components/SOLModal/index.tsx
1025
- var import_web3 = require("@solana/web3.js");
1026
- var import_wallet_adapter_react = require("@solana/wallet-adapter-react");
1027
- var import_wallet_adapter_react_ui = require("@solana/wallet-adapter-react-ui");
1028
-
1029
- // node_modules/@solana/wallet-adapter-base/lib/esm/types.js
1030
- var WalletAdapterNetwork;
1031
- (function(WalletAdapterNetwork2) {
1032
- WalletAdapterNetwork2["Mainnet"] = "mainnet-beta";
1033
- WalletAdapterNetwork2["Testnet"] = "testnet";
1034
- WalletAdapterNetwork2["Devnet"] = "devnet";
1035
- })(WalletAdapterNetwork || (WalletAdapterNetwork = {}));
1036
-
1037
- // src/components/SOLModal/index.tsx
1038
- var import_wallet_adapter_wallets = require("@solana/wallet-adapter-wallets");
1039
- var import_styles = require("@solana/wallet-adapter-react-ui/styles.css");
1021
+ // src/components/TRONModal/index.tsx
1040
1022
  var import_react_intl9 = require("react-intl");
1041
1023
 
1042
1024
  // src/components/WalletModalContent/index.tsx
1043
1025
  var import_react12 = require("react");
1044
- var import_jsx_runtime67 = require("react/jsx-runtime");
1045
-
1046
- // src/components/SOLModal/index.tsx
1047
1026
  var import_jsx_runtime68 = require("react/jsx-runtime");
1048
- var wallets = [
1049
- new import_wallet_adapter_wallets.PhantomWalletAdapter(),
1050
- new import_wallet_adapter_wallets.SolflareWalletAdapter(),
1051
- new import_wallet_adapter_wallets.WalletConnectWalletAdapter({
1052
- network: WalletAdapterNetwork.Mainnet,
1053
- options: {
1054
- relayUrl: "wss://relay.walletconnect.com"
1055
- }
1056
- }),
1057
- new import_wallet_adapter_wallets.AlphaWalletAdapter(),
1058
- new import_wallet_adapter_wallets.AvanaWalletAdapter(),
1059
- new import_wallet_adapter_wallets.BitgetWalletAdapter(),
1060
- new import_wallet_adapter_wallets.BitpieWalletAdapter(),
1061
- new import_wallet_adapter_wallets.CloverWalletAdapter(),
1062
- new import_wallet_adapter_wallets.Coin98WalletAdapter(),
1063
- new import_wallet_adapter_wallets.CoinbaseWalletAdapter(),
1064
- new import_wallet_adapter_wallets.CoinhubWalletAdapter(),
1065
- new import_wallet_adapter_wallets.FractalWalletAdapter(),
1066
- new import_wallet_adapter_wallets.HuobiWalletAdapter(),
1067
- new import_wallet_adapter_wallets.HyperPayWalletAdapter(),
1068
- new import_wallet_adapter_wallets.KeystoneWalletAdapter(),
1069
- new import_wallet_adapter_wallets.KrystalWalletAdapter(),
1070
- new import_wallet_adapter_wallets.LedgerWalletAdapter(),
1071
- new import_wallet_adapter_wallets.MathWalletAdapter(),
1072
- new import_wallet_adapter_wallets.NekoWalletAdapter(),
1073
- new import_wallet_adapter_wallets.NightlyWalletAdapter(),
1074
- new import_wallet_adapter_wallets.NufiWalletAdapter(),
1075
- new import_wallet_adapter_wallets.OntoWalletAdapter(),
1076
- new import_wallet_adapter_wallets.ParticleAdapter(),
1077
- new import_wallet_adapter_wallets.SafePalWalletAdapter(),
1078
- new import_wallet_adapter_wallets.SaifuWalletAdapter(),
1079
- new import_wallet_adapter_wallets.SalmonWalletAdapter(),
1080
- new import_wallet_adapter_wallets.SkyWalletAdapter(),
1081
- new import_wallet_adapter_wallets.SolongWalletAdapter(),
1082
- new import_wallet_adapter_wallets.SpotWalletAdapter(),
1083
- new import_wallet_adapter_wallets.TokenaryWalletAdapter(),
1084
- new import_wallet_adapter_wallets.TokenPocketWalletAdapter(),
1085
- new import_wallet_adapter_wallets.TorusWalletAdapter(),
1086
- new import_wallet_adapter_wallets.TrustWalletAdapter(),
1087
- new import_wallet_adapter_wallets.XDEFIWalletAdapter()
1088
- ];
1089
-
1090
- // src/components/TRONModal/index.tsx
1091
- var import_react15 = __toESM(require("react"));
1092
- var import_react_intl10 = require("react-intl");
1093
1027
 
1094
1028
  // src/hooks/useTRONWallet.ts
1095
- var import_react14 = require("react");
1029
+ var import_react13 = require("react");
1096
1030
 
1097
1031
  // src/components/TRONModal/index.tsx
1098
1032
  var import_jsx_runtime69 = require("react/jsx-runtime");
1099
1033
 
1100
1034
  // src/components/TONModal/index.tsx
1101
- var import_react16 = __toESM(require("react"));
1102
- var import_react_intl11 = require("react-intl");
1035
+ var import_react15 = __toESM(require("react"));
1036
+ var import_react_intl10 = require("react-intl");
1103
1037
  var import_ui_react = require("@tonconnect/ui-react");
1104
1038
  var import_jsx_runtime70 = require("react/jsx-runtime");
1105
1039
 
1106
1040
  // src/components/BTCModal/index.tsx
1107
- var import_react18 = __toESM(require("react"));
1108
- var import_react_intl12 = require("react-intl");
1041
+ var import_react17 = __toESM(require("react"));
1042
+ var import_react_intl11 = require("react-intl");
1109
1043
 
1110
1044
  // src/lib/btc/XverseAdapter.ts
1111
1045
  var import_sats_connect = require("sats-connect");
1112
1046
 
1113
1047
  // src/hooks/useBTCWallet.ts
1114
- var import_react17 = require("react");
1048
+ var import_react16 = require("react");
1115
1049
 
1116
1050
  // src/components/BTCModal/index.tsx
1117
1051
  var import_jsx_runtime71 = require("react/jsx-runtime");
1118
1052
 
1119
1053
  // src/components/WalletModal/index.tsx
1120
- var import_react19 = require("react");
1121
- var import_react_intl13 = require("react-intl");
1054
+ var import_react18 = require("react");
1055
+ var import_react_intl12 = require("react-intl");
1122
1056
  var import_jsx_runtime72 = require("react/jsx-runtime");
1123
1057
 
1124
1058
  // src/components/AlphaAvatar/index.tsx
1125
- var import_react20 = require("react");
1059
+ var import_react19 = require("react");
1126
1060
  var import_jsx_runtime73 = require("react/jsx-runtime");
1127
1061
  function AlphaAvatar({ name, size = 40, className = "" }) {
1128
- const [avatar, setAvatar] = (0, import_react20.useState)(void 0);
1129
- (0, import_react20.useEffect)(() => {
1062
+ const [avatar, setAvatar] = (0, import_react19.useState)(void 0);
1063
+ (0, import_react19.useEffect)(() => {
1130
1064
  if (name) {
1131
1065
  const char = name[0].toUpperCase();
1132
1066
  setAvatar(char);
@@ -1169,7 +1103,7 @@ function Drawer({
1169
1103
  }
1170
1104
 
1171
1105
  // src/ui/HashPanel/index.tsx
1172
- var import_react21 = require("react");
1106
+ var import_react20 = require("react");
1173
1107
 
1174
1108
  // src/ui/ModalDrawer/index.tsx
1175
1109
  var import_jsx_runtime76 = require("react/jsx-runtime");
@@ -1246,7 +1180,7 @@ function HashPanel({
1246
1180
  onClose,
1247
1181
  zIndex
1248
1182
  }) {
1249
- const [status, setStatus] = (0, import_react21.useState)("confirm");
1183
+ const [status, setStatus] = (0, import_react20.useState)("confirm");
1250
1184
  const statusMaps = {
1251
1185
  "confirm": {
1252
1186
  icon: confirm_default,
@@ -1270,8 +1204,8 @@ function HashPanel({
1270
1204
  }
1271
1205
  };
1272
1206
  const statusValue = statusMaps[status];
1273
- const [shouldRefetch, setShouldRefetch] = (0, import_react21.useState)(true);
1274
- (0, import_react21.useEffect)(() => {
1207
+ const [shouldRefetch, setShouldRefetch] = (0, import_react20.useState)(true);
1208
+ (0, import_react20.useEffect)(() => {
1275
1209
  if (hash) {
1276
1210
  setShouldRefetch(true);
1277
1211
  setStatus("pending");
@@ -1284,7 +1218,7 @@ function HashPanel({
1284
1218
  chain,
1285
1219
  refetchInterval: shouldRefetch ? 3e3 : false
1286
1220
  });
1287
- (0, import_react21.useEffect)(() => {
1221
+ (0, import_react20.useEffect)(() => {
1288
1222
  if (hashQuery.data == 1 || hashQuery.data == -1) {
1289
1223
  setShouldRefetch(false);
1290
1224
  }
@@ -1338,7 +1272,7 @@ function HashPanel_default(props) {
1338
1272
  var import_jsx_runtime78 = require("react/jsx-runtime");
1339
1273
 
1340
1274
  // src/ui/AlphaAvatar/index.tsx
1341
- var import_react22 = require("react");
1275
+ var import_react21 = require("react");
1342
1276
  var import_jsx_runtime79 = require("react/jsx-runtime");
1343
1277
  function AlphaAvatar2({
1344
1278
  name,
@@ -1346,7 +1280,7 @@ function AlphaAvatar2({
1346
1280
  className = "",
1347
1281
  style
1348
1282
  }) {
1349
- const avatar = (0, import_react22.useMemo)(() => {
1283
+ const avatar = (0, import_react21.useMemo)(() => {
1350
1284
  if (name) {
1351
1285
  const char = name[0].toUpperCase();
1352
1286
  if (char.match(/[a-zA-Z0-9]/)) {
@@ -1387,9 +1321,9 @@ function Radio({
1387
1321
  }
1388
1322
 
1389
1323
  // src/components/TokenSend/index.tsx
1390
- var import_react23 = require("react");
1324
+ var import_react22 = require("react");
1391
1325
  var import_viem2 = require("viem");
1392
- var import_react_intl14 = require("react-intl");
1326
+ var import_react_intl13 = require("react-intl");
1393
1327
  var import_jsx_runtime81 = require("react/jsx-runtime");
1394
1328
  function Input2({
1395
1329
  onChange,
@@ -1422,25 +1356,25 @@ function TokenSend({
1422
1356
  onBack
1423
1357
  }) {
1424
1358
  const { list: chainList } = useMatchChain();
1425
- const intl = (0, import_react_intl14.useIntl)();
1426
- const { createWalletClient: createWalletClient2 } = useWallet2();
1359
+ const intl = (0, import_react_intl13.useIntl)();
1360
+ const { createWalletClient: createWalletClient2 } = useWallet();
1427
1361
  const isNative = token.address.toLowerCase() == NATIVE_TOKEN_ADDRESS;
1428
- const chain = (0, import_react23.useMemo)(() => {
1362
+ const chain = (0, import_react22.useMemo)(() => {
1429
1363
  return chainList?.find((m) => m.id.toString() === token.chain_id);
1430
1364
  }, [chainList, token.chain_id]);
1431
- const walletClient = (0, import_react23.useMemo)(() => {
1365
+ const walletClient = (0, import_react22.useMemo)(() => {
1432
1366
  return createWalletClient2({
1433
1367
  // @ts-ignore
1434
1368
  chain: (0, import_viem2.defineChain)(chain),
1435
1369
  transport: (0, import_viem2.http)()
1436
1370
  });
1437
1371
  }, [chain]);
1438
- const [amount, setAmount] = (0, import_react23.useState)("");
1439
- const [address, setAddress] = (0, import_react23.useState)("");
1440
- const [loading, setLoading] = (0, import_react23.useState)(false);
1441
- const [sending, setSending] = (0, import_react23.useState)(false);
1442
- const [txError, setTxError] = (0, import_react23.useState)("");
1443
- const transaction = (0, import_react23.useMemo)(() => {
1372
+ const [amount, setAmount] = (0, import_react22.useState)("");
1373
+ const [address, setAddress] = (0, import_react22.useState)("");
1374
+ const [loading, setLoading] = (0, import_react22.useState)(false);
1375
+ const [sending, setSending] = (0, import_react22.useState)(false);
1376
+ const [txError, setTxError] = (0, import_react22.useState)("");
1377
+ const transaction = (0, import_react22.useMemo)(() => {
1444
1378
  const reg = /^0x[a-fA-F0-9]{40}$/;
1445
1379
  if (!amount || !address || !reg.test(address)) {
1446
1380
  return;
@@ -1471,7 +1405,7 @@ function TokenSend({
1471
1405
  setLoading(false);
1472
1406
  }
1473
1407
  };
1474
- const error = (0, import_react23.useMemo)(() => {
1408
+ const error = (0, import_react22.useMemo)(() => {
1475
1409
  setTxError("");
1476
1410
  let amountError = "";
1477
1411
  let addressError = "";
@@ -1514,7 +1448,7 @@ function TokenSend({
1514
1448
  setAmount(value);
1515
1449
  }
1516
1450
  };
1517
- const canSend = (0, import_react23.useMemo)(() => {
1451
+ const canSend = (0, import_react22.useMemo)(() => {
1518
1452
  return !error.amount && !error.address && amount && address;
1519
1453
  }, [error]);
1520
1454
  const onNext = async () => {
@@ -1524,7 +1458,7 @@ function TokenSend({
1524
1458
  }
1525
1459
  onClose();
1526
1460
  };
1527
- (0, import_react23.useEffect)(() => {
1461
+ (0, import_react22.useEffect)(() => {
1528
1462
  const receiveMessage = (event) => {
1529
1463
  if (event.data) {
1530
1464
  if (event.data.source == "match-wallet") {
@@ -1540,11 +1474,11 @@ function TokenSend({
1540
1474
  window.removeEventListener("message", receiveMessage);
1541
1475
  };
1542
1476
  }, []);
1543
- return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react_intl14.FormattedMessage, { id: "send" }), onBack, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-token-send-box`, children: [
1477
+ return /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react_intl13.FormattedMessage, { id: "send" }), onBack, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-token-send-box`, children: [
1544
1478
  /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: "matchid-token-send-content", children: [
1545
1479
  /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-token-amount-content`, children: [
1546
1480
  /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-token-amount-header`, children: [
1547
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react_intl14.FormattedMessage, { id: "amount" }) }),
1481
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react_intl13.FormattedMessage, { id: "amount" }) }),
1548
1482
  /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-token-amount-chain`, children: [
1549
1483
  token.icon ? /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
1550
1484
  "img",
@@ -1572,7 +1506,7 @@ function TokenSend({
1572
1506
  ),
1573
1507
  /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-token-amount-footer`, children: [
1574
1508
  /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-token-amount-title`, children: [
1575
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react_intl14.FormattedMessage, { id: "balance" }),
1509
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react_intl13.FormattedMessage, { id: "balance" }),
1576
1510
  ":"
1577
1511
  ] }),
1578
1512
  /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
@@ -1580,7 +1514,7 @@ function TokenSend({
1580
1514
  /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(TransferIcon, { className: "matchid-token-amount-transfer" })
1581
1515
  ] }),
1582
1516
  /* @__PURE__ */ (0, import_jsx_runtime81.jsxs)("div", { className: `matchid-token-address-content`, children: [
1583
- /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react_intl14.FormattedMessage, { id: "receiveTitle" }) }) }),
1517
+ /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react_intl13.FormattedMessage, { id: "receiveTitle" }) }) }),
1584
1518
  /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(
1585
1519
  Input2,
1586
1520
  {
@@ -1606,19 +1540,19 @@ function TokenSend({
1606
1540
  disabled: !canSend || !!txError,
1607
1541
  onClick: onNext,
1608
1542
  loading: loading || sending,
1609
- children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react_intl14.FormattedMessage, { id: "next" })
1543
+ children: /* @__PURE__ */ (0, import_jsx_runtime81.jsx)(import_react_intl13.FormattedMessage, { id: "next" })
1610
1544
  }
1611
1545
  )
1612
1546
  ] }) });
1613
1547
  }
1614
1548
 
1615
1549
  // src/components/TokenDetail/index.tsx
1616
- var import_react_intl15 = require("react-intl");
1550
+ var import_react_intl14 = require("react-intl");
1617
1551
  var import_jsx_runtime82 = require("react/jsx-runtime");
1618
1552
 
1619
1553
  // src/components/TokenSendList/index.tsx
1620
- var import_react24 = require("react");
1621
- var import_react_intl16 = require("react-intl");
1554
+ var import_react23 = require("react");
1555
+ var import_react_intl15 = require("react-intl");
1622
1556
  var import_jsx_runtime83 = require("react/jsx-runtime");
1623
1557
  function TokenSendList({ close }) {
1624
1558
  const isDownMd = useDownMd();
@@ -1627,7 +1561,7 @@ function TokenSendList({ close }) {
1627
1561
  list: walletAssets.mergedAssets
1628
1562
  });
1629
1563
  const { list } = useMatchChain();
1630
- const [checked, setChecked] = (0, import_react24.useState)();
1564
+ const [checked, setChecked] = (0, import_react23.useState)();
1631
1565
  const modal = useModal();
1632
1566
  const onNext = () => {
1633
1567
  checked && modal.show((props) => {
@@ -1678,13 +1612,13 @@ function TokenSendList({ close }) {
1678
1612
  index
1679
1613
  );
1680
1614
  }) }),
1681
- /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_react_intl16.FormattedMessage, { id: "next" }) })
1615
+ /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ (0, import_jsx_runtime83.jsx)(import_react_intl15.FormattedMessage, { id: "next" }) })
1682
1616
  ] });
1683
1617
  }
1684
1618
 
1685
1619
  // src/components/TransactionList/index.tsx
1686
1620
  var import_react_infinite_scroll_component = __toESM(require("react-infinite-scroll-component"));
1687
- var import_react25 = require("react");
1621
+ var import_react24 = require("react");
1688
1622
  var import_viem3 = require("viem");
1689
1623
  var import_viem4 = require("viem");
1690
1624
 
@@ -1745,12 +1679,12 @@ var useContractStore = (0, import_zustand3.create)((0, import_middleware2.devtoo
1745
1679
  var useContractStore_default = useContractStore;
1746
1680
 
1747
1681
  // src/components/TransactionList/index.tsx
1748
- var import_react_intl17 = require("react-intl");
1682
+ var import_react_intl16 = require("react-intl");
1749
1683
  var import_jsx_runtime84 = require("react/jsx-runtime");
1750
1684
 
1751
1685
  // src/components/CEXBindModal/index.tsx
1752
- var import_react26 = require("react");
1753
- var import_react_intl18 = require("react-intl");
1686
+ var import_react25 = require("react");
1687
+ var import_react_intl17 = require("react-intl");
1754
1688
  var import_jsx_runtime85 = require("react/jsx-runtime");
1755
1689
 
1756
1690
  // src/context/BusinessProvider.tsx
@@ -1772,12 +1706,12 @@ var useStore_default = useStore;
1772
1706
  var import_jsx_runtime86 = require("react/jsx-runtime");
1773
1707
 
1774
1708
  // src/context/ModalContext.tsx
1775
- var import_react27 = require("react");
1709
+ var import_react26 = require("react");
1776
1710
  var import_react_dom = require("react-dom");
1777
1711
  var import_jsx_runtime87 = require("react/jsx-runtime");
1778
- var ModalContext = (0, import_react27.createContext)(null);
1712
+ var ModalContext = (0, import_react26.createContext)(null);
1779
1713
  function useModal() {
1780
- const context = (0, import_react27.useContext)(ModalContext);
1714
+ const context = (0, import_react26.useContext)(ModalContext);
1781
1715
  if (!context) {
1782
1716
  throw new Error("useModal must be used within a ModalProvider");
1783
1717
  }
@@ -1785,12 +1719,12 @@ function useModal() {
1785
1719
  }
1786
1720
 
1787
1721
  // src/context/ToastContext.tsx
1788
- var import_react28 = require("react");
1722
+ var import_react27 = require("react");
1789
1723
  var import_react_dom2 = require("react-dom");
1790
1724
  var import_jsx_runtime88 = require("react/jsx-runtime");
1791
- var ToastContext = (0, import_react28.createContext)(null);
1725
+ var ToastContext = (0, import_react27.createContext)(null);
1792
1726
  function useToast() {
1793
- const context = (0, import_react28.useContext)(ToastContext);
1727
+ const context = (0, import_react27.useContext)(ToastContext);
1794
1728
  if (!context) {
1795
1729
  throw new Error("useToast must be used within a ToastProvider");
1796
1730
  }
@@ -1801,20 +1735,20 @@ function useToast() {
1801
1735
  var import_jsx_runtime89 = require("react/jsx-runtime");
1802
1736
 
1803
1737
  // src/hooks/useWalletInit.ts
1804
- var import_react29 = require("react");
1738
+ var import_react28 = require("react");
1805
1739
  var AppClientId = getAppClientId();
1806
1740
 
1807
1741
  // src/hooks/useInit.tsx
1808
- var import_react30 = require("react");
1742
+ var import_react29 = require("react");
1809
1743
 
1810
1744
  // src/MatchContext.tsx
1811
1745
  var import_react_query4 = require("@tanstack/react-query");
1812
- var import_react_intl19 = require("react-intl");
1746
+ var import_react_intl18 = require("react-intl");
1813
1747
  var import_jsx_runtime90 = require("react/jsx-runtime");
1814
1748
  var queryClient = new import_react_query4.QueryClient();
1815
- var MatchContext = (0, import_react31.createContext)(void 0);
1749
+ var MatchContext = (0, import_react30.createContext)(void 0);
1816
1750
  var useMatch = () => {
1817
- const context = (0, import_react31.useContext)(MatchContext);
1751
+ const context = (0, import_react30.useContext)(MatchContext);
1818
1752
  if (context === void 0) {
1819
1753
  throw new Error("useMatch must be used within a MatchProvider");
1820
1754
  }
@@ -1837,14 +1771,17 @@ function useUserInfo() {
1837
1771
  refreshOverview
1838
1772
  } = useLocalStore_default();
1839
1773
  const { setTgAppAuthCode, emailLoginKey, setEmailLoginKey } = useStore_default();
1774
+ const isDownMd = useDownMd();
1840
1775
  const { events, login } = useMatch();
1841
- const { open: SOLOpen } = useSOLModalStore();
1842
1776
  const { open: TRONOpen } = useTRONModalStore();
1843
1777
  const { open: TONOpen } = useTONModalStore();
1844
1778
  const { open: BTCOpen } = useBTCModalStore();
1845
1779
  const { open: CEXBindOpen } = useCEXBindModalStore();
1846
1780
  const walletModalStore = useWalletModalStore();
1847
- const isLogin = (0, import_react32.useMemo)(() => !!token && !!overview, [token, overview]);
1781
+ const getRedirectUri = () => {
1782
+ return encodeURIComponent(window.location.href);
1783
+ };
1784
+ const isLogin = (0, import_react31.useMemo)(() => !!token && !!overview, [token, overview]);
1848
1785
  const logout = async () => {
1849
1786
  try {
1850
1787
  await toLogoutApi();
@@ -1914,6 +1851,9 @@ function useUserInfo() {
1914
1851
  case "evm":
1915
1852
  return window.open(`${endpoints.auth}login/wallet?appid=${appid}&locale=${locale}`);
1916
1853
  case "sol":
1854
+ if (isDownMd) {
1855
+ return window.location.href = `${endpoints.auth}login/sol?appid=${appid}&locale=${locale}&redirect_uri=${getRedirectUri()}`;
1856
+ }
1917
1857
  return window.open(`${endpoints.auth}login/sol?appid=${appid}&locale=${locale}`);
1918
1858
  case "tron":
1919
1859
  return TRONOpen("login");
@@ -1956,7 +1896,7 @@ function useUserInfo() {
1956
1896
  const res = await verifyEmailCodeApi(obj);
1957
1897
  if (res && res.data && isSuccess(res)) {
1958
1898
  await login({
1959
- mid: res.data.mid,
1899
+ // mid: res.data.mid,
1960
1900
  token: `${res.data.token_type} ${res.data.access_token}`
1961
1901
  });
1962
1902
  return true;
@@ -2003,7 +1943,10 @@ function useUserInfo() {
2003
1943
  case "evm":
2004
1944
  return window.open(`${endpoints.auth}bind/wallet?appid=${appid}&locale=${locale}&st=` + encodeURIComponent(encodeBase64(token)));
2005
1945
  case "sol":
2006
- return SOLOpen("bind");
1946
+ if (isDownMd) {
1947
+ return window.location.href = `${endpoints.auth}bind/sol?appid=${appid}&locale=${locale}&st=${encodeURIComponent(encodeBase64(token))}&redirect_uri=${getRedirectUri()}`;
1948
+ }
1949
+ return window.open(`${endpoints.auth}bind/sol?appid=${appid}&locale=${locale}&st=${encodeURIComponent(encodeBase64(token))}`);
2007
1950
  case "tron":
2008
1951
  return TRONOpen("bind");
2009
1952
  case "ton":
@@ -2101,9 +2044,9 @@ function useUserInfo() {
2101
2044
  }
2102
2045
 
2103
2046
  // src/hooks/useMatchEvents.ts
2104
- var import_react33 = require("react");
2047
+ var import_react32 = require("react");
2105
2048
  function useMatchEvents(handlers) {
2106
- (0, import_react33.useEffect)(() => {
2049
+ (0, import_react32.useEffect)(() => {
2107
2050
  Object.entries(handlers).forEach(([event, handler2]) => {
2108
2051
  if (handler2) {
2109
2052
  eventManager_default.on(event, handler2);
@@ -2123,7 +2066,7 @@ function useMatchEvents(handlers) {
2123
2066
  var import_viem5 = require("viem");
2124
2067
  var import_accounts = require("viem/accounts");
2125
2068
  var import_viem6 = require("viem");
2126
- var import_react34 = require("react");
2069
+ var import_react33 = require("react");
2127
2070
  var import_viem7 = require("viem");
2128
2071
 
2129
2072
  // src/store/useTransactionStore.ts
@@ -2159,7 +2102,7 @@ var useTransactionStore_default = useTransactionStore;
2159
2102
  // src/hooks/useWallet.tsx
2160
2103
  var import_jsx_runtime91 = require("react/jsx-runtime");
2161
2104
  var AppClientId2 = "react-sdk-" + getVersion();
2162
- function useWallet2() {
2105
+ function useWallet() {
2163
2106
  const { address, wallet: walletConfig } = useLocalStore_default();
2164
2107
  const { walletReady } = useStore_default();
2165
2108
  const modal = useModal();
@@ -2208,7 +2151,7 @@ function useWallet2() {
2208
2151
  throw error;
2209
2152
  }
2210
2153
  };
2211
- const evmAccount = (0, import_react34.useMemo)(() => {
2154
+ const evmAccount = (0, import_react33.useMemo)(() => {
2212
2155
  try {
2213
2156
  return address ? (0, import_accounts.toAccount)({
2214
2157
  address,
@@ -2247,7 +2190,7 @@ function useWallet2() {
2247
2190
  return void 0;
2248
2191
  }
2249
2192
  }, [address]);
2250
- (0, import_react34.useEffect)(() => {
2193
+ (0, import_react33.useEffect)(() => {
2251
2194
  matchlog_default.log("qwe-evmAccount", evmAccount);
2252
2195
  }, [evmAccount]);
2253
2196
  const realCreateWalletClient = (parameters) => {
@@ -2383,14 +2326,14 @@ function useWallet2() {
2383
2326
 
2384
2327
  // src/hooks/useCopyClipboard.ts
2385
2328
  var import_copy_to_clipboard = __toESM(require("copy-to-clipboard"));
2386
- var import_react35 = require("react");
2329
+ var import_react34 = require("react");
2387
2330
  function useCopyClipboard(timeout = 500) {
2388
- const [isCopied, setIsCopied] = (0, import_react35.useState)(false);
2389
- const staticCopy = (0, import_react35.useCallback)((text) => {
2331
+ const [isCopied, setIsCopied] = (0, import_react34.useState)(false);
2332
+ const staticCopy = (0, import_react34.useCallback)((text) => {
2390
2333
  const didCopy = (0, import_copy_to_clipboard.default)(text);
2391
2334
  setIsCopied(didCopy);
2392
2335
  }, []);
2393
- (0, import_react35.useEffect)(() => {
2336
+ (0, import_react34.useEffect)(() => {
2394
2337
  if (isCopied) {
2395
2338
  const hide = setTimeout(() => {
2396
2339
  setIsCopied(false);
@@ -2460,16 +2403,16 @@ function useImportTokenListQuery({
2460
2403
  }
2461
2404
 
2462
2405
  // src/hooks/useMatchChain.tsx
2463
- var import_react36 = require("react");
2406
+ var import_react35 = require("react");
2464
2407
  var import_viem8 = require("viem");
2465
- var import_react_intl20 = require("react-intl");
2408
+ var import_react_intl19 = require("react-intl");
2466
2409
  var import_jsx_runtime92 = require("react/jsx-runtime");
2467
2410
  function useMatchChain() {
2468
2411
  const chainListQuery = useChainListQuery();
2469
2412
  const modal = useModal();
2470
- const intl = (0, import_react_intl20.useIntl)();
2413
+ const intl = (0, import_react_intl19.useIntl)();
2471
2414
  const { chainId: storeChainId, setChainId } = useLocalStore_default();
2472
- const chainId = (0, import_react36.useMemo)(() => {
2415
+ const chainId = (0, import_react35.useMemo)(() => {
2473
2416
  if (!chainListQuery.data || !chainListQuery.data.length) {
2474
2417
  return null;
2475
2418
  }
@@ -2478,7 +2421,7 @@ function useMatchChain() {
2478
2421
  }
2479
2422
  return chainListQuery.data[0].id;
2480
2423
  }, [storeChainId, chainListQuery.data]);
2481
- const chain = (0, import_react36.useMemo)(() => {
2424
+ const chain = (0, import_react35.useMemo)(() => {
2482
2425
  if (!chainListQuery.data || !chainListQuery.data.length) {
2483
2426
  return null;
2484
2427
  }
@@ -2492,7 +2435,7 @@ function useMatchChain() {
2492
2435
  close
2493
2436
  }) {
2494
2437
  const { chainId: storeChainId2, setChainId: setChainId2 } = useLocalStore_default();
2495
- const [selectedChainId, setSelectedChainId] = (0, import_react36.useState)(storeChainId2);
2438
+ const [selectedChainId, setSelectedChainId] = (0, import_react35.useState)(storeChainId2);
2496
2439
  const isDownMd = useDownMd();
2497
2440
  return /* @__PURE__ */ (0, import_jsx_runtime92.jsxs)("div", { className: `matchid-change-network-box`, children: [
2498
2441
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)("div", { className: `matchid-change-network-list`, children: chainListQuery.data?.map((item, index) => {
@@ -2515,7 +2458,7 @@ function useMatchChain() {
2515
2458
  /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(Button, { size: "lg", highlight: true, onClick: () => {
2516
2459
  setChainId2(selectedChainId || 0);
2517
2460
  close();
2518
- }, block: true, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl20.FormattedMessage, { id: "confirm" }) })
2461
+ }, block: true, children: /* @__PURE__ */ (0, import_jsx_runtime92.jsx)(import_react_intl19.FormattedMessage, { id: "confirm" }) })
2519
2462
  ] });
2520
2463
  }
2521
2464
  const showChangeNetwork = () => {
@@ -2524,7 +2467,7 @@ function useMatchChain() {
2524
2467
  content: ChangeNetwork
2525
2468
  });
2526
2469
  };
2527
- const publicClient = (0, import_react36.useMemo)(() => {
2470
+ const publicClient = (0, import_react35.useMemo)(() => {
2528
2471
  if (!chain) {
2529
2472
  return null;
2530
2473
  }
@@ -2552,14 +2495,14 @@ function useMatchChain() {
2552
2495
 
2553
2496
  // src/hooks/useMatchWallet.tsx
2554
2497
  var import_react_qrcode = require("react-qrcode");
2555
- var import_react38 = require("react");
2498
+ var import_react37 = require("react");
2556
2499
  var import_react_query8 = require("@tanstack/react-query");
2557
2500
  var import_viem11 = require("viem");
2558
- var import_react_intl22 = require("react-intl");
2501
+ var import_react_intl21 = require("react-intl");
2559
2502
 
2560
2503
  // src/components/ImportToken/index.tsx
2561
- var import_react37 = require("react");
2562
- var import_react_intl21 = require("react-intl");
2504
+ var import_react36 = require("react");
2505
+ var import_react_intl20 = require("react-intl");
2563
2506
  var import_react_query7 = require("@tanstack/react-query");
2564
2507
  var import_viem10 = require("viem");
2565
2508
 
@@ -2590,12 +2533,12 @@ function useIsContract({
2590
2533
  // src/components/ImportToken/index.tsx
2591
2534
  var import_jsx_runtime93 = require("react/jsx-runtime");
2592
2535
  function ImportToken({ close }) {
2593
- const [status, setStatus] = (0, import_react37.useState)("");
2536
+ const [status, setStatus] = (0, import_react36.useState)("");
2594
2537
  const { token } = useUserInfo();
2595
- const [address, setAddress] = (0, import_react37.useState)("");
2596
- const [symbol, setSymbol] = (0, import_react37.useState)("");
2597
- const [decimals, setDecimals] = (0, import_react37.useState)("");
2598
- const [error, setError] = (0, import_react37.useState)({});
2538
+ const [address, setAddress] = (0, import_react36.useState)("");
2539
+ const [symbol, setSymbol] = (0, import_react36.useState)("");
2540
+ const [decimals, setDecimals] = (0, import_react36.useState)("");
2541
+ const [error, setError] = (0, import_react36.useState)({});
2599
2542
  const { publicClient, chainId, chain } = useMatchChain();
2600
2543
  const getContractInfo = async () => {
2601
2544
  if (!publicClient) return;
@@ -2628,8 +2571,8 @@ function ImportToken({ close }) {
2628
2571
  });
2629
2572
  }
2630
2573
  };
2631
- const intl = (0, import_react_intl21.useIntl)();
2632
- (0, import_react37.useEffect)(() => {
2574
+ const intl = (0, import_react_intl20.useIntl)();
2575
+ (0, import_react36.useEffect)(() => {
2633
2576
  if (address.length === 42) {
2634
2577
  const reg = /^0x[0-9a-fA-F]{40}$/;
2635
2578
  if (!reg.test(address)) {
@@ -2648,7 +2591,7 @@ function ImportToken({ close }) {
2648
2591
  }
2649
2592
  }
2650
2593
  }, [address, publicClient]);
2651
- const [loading, setLoading] = (0, import_react37.useState)(false);
2594
+ const [loading, setLoading] = (0, import_react36.useState)(false);
2652
2595
  const toast = useToast();
2653
2596
  const queryClient2 = (0, import_react_query7.useQueryClient)();
2654
2597
  const onImport = async () => {
@@ -2676,7 +2619,7 @@ function ImportToken({ close }) {
2676
2619
  setLoading(false);
2677
2620
  }
2678
2621
  };
2679
- const canImport = (0, import_react37.useMemo)(() => {
2622
+ const canImport = (0, import_react36.useMemo)(() => {
2680
2623
  if (!address) {
2681
2624
  return false;
2682
2625
  }
@@ -2702,9 +2645,9 @@ function ImportToken({ close }) {
2702
2645
  return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-import-token-result matchid-flex`, children: [
2703
2646
  /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-import-token-result-box matchid-flex`, children: [
2704
2647
  /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("img", { src: status == "success" ? success_default : fail_default, alt: status == "success" ? "success" : "fail", className: `matchid-import-token-result-img` }),
2705
- /* @__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_intl21.FormattedMessage, { id: "importSuccess" }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl21.FormattedMessage, { id: "importFail" }) })
2648
+ /* @__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" }) })
2706
2649
  ] }),
2707
- 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_intl21.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_intl21.FormattedMessage, { id: "back" }) })
2650
+ 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" }) })
2708
2651
  ] });
2709
2652
  }
2710
2653
  return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-import-token`, children: [
@@ -2758,7 +2701,7 @@ function ImportToken({ close }) {
2758
2701
  loading: loading || isContractQuery.isLoading,
2759
2702
  disabled: !canImport || !isContractQuery.data,
2760
2703
  highlight: true,
2761
- children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl21.FormattedMessage, { id: "import" })
2704
+ children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl20.FormattedMessage, { id: "import" })
2762
2705
  }
2763
2706
  )
2764
2707
  ] });
@@ -2768,10 +2711,10 @@ function ImportToken({ close }) {
2768
2711
  var import_jsx_runtime94 = require("react/jsx-runtime");
2769
2712
  var ReceiveModal = () => {
2770
2713
  const chain = useMatchChain();
2771
- const { address } = useWallet2();
2714
+ const { address } = useWallet();
2772
2715
  const [copied, setCopied] = useCopyClipboard();
2773
2716
  const toast = useToast();
2774
- const intl = (0, import_react_intl22.useIntl)();
2717
+ const intl = (0, import_react_intl21.useIntl)();
2775
2718
  const onCopy = () => {
2776
2719
  setCopied(address);
2777
2720
  toast.success(intl.formatMessage({
@@ -2781,7 +2724,7 @@ var ReceiveModal = () => {
2781
2724
  const chainLink = chain.explorerLink("address/" + address);
2782
2725
  return /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: `matchid-receive-modal`, children: [
2783
2726
  /* @__PURE__ */ (0, import_jsx_runtime94.jsxs)("div", { className: "matchid-receive-container", children: [
2784
- /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-receive-text`, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl22.FormattedMessage, { id: "receiveQrcode" }) }),
2727
+ /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-receive-text`, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(import_react_intl21.FormattedMessage, { id: "receiveQrcode" }) }),
2785
2728
  /* @__PURE__ */ (0, import_jsx_runtime94.jsx)("div", { className: `matchid-qr-container`, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
2786
2729
  import_react_qrcode.QRCode,
2787
2730
  {
@@ -2801,7 +2744,7 @@ var ReceiveModal = () => {
2801
2744
  )
2802
2745
  ] }),
2803
2746
  /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(Button, { size: "lg", onClick: onCopy, block: true, highlight: true, disabled: copied, children: /* @__PURE__ */ (0, import_jsx_runtime94.jsx)(
2804
- import_react_intl22.FormattedMessage,
2747
+ import_react_intl21.FormattedMessage,
2805
2748
  {
2806
2749
  id: "copyAddress"
2807
2750
  }
@@ -2810,7 +2753,7 @@ var ReceiveModal = () => {
2810
2753
  };
2811
2754
  function useMatchWallet() {
2812
2755
  const modal = useModal();
2813
- const intl = (0, import_react_intl22.useIntl)();
2756
+ const intl = (0, import_react_intl21.useIntl)();
2814
2757
  const showReceiveModal = () => {
2815
2758
  modal.open({
2816
2759
  title: intl.formatMessage({
@@ -2842,12 +2785,12 @@ function useMatchWallet() {
2842
2785
  };
2843
2786
  }
2844
2787
  function useMatchWalletRecords() {
2845
- const [hasMore, setHasMore] = (0, import_react38.useState)(true);
2846
- const [items, setItems] = (0, import_react38.useState)([]);
2788
+ const [hasMore, setHasMore] = (0, import_react37.useState)(true);
2789
+ const [items, setItems] = (0, import_react37.useState)([]);
2847
2790
  const { chainId, publicClient } = useMatchChain();
2848
- const { address } = useWallet2();
2849
- const hasMoreRef = (0, import_react38.useRef)(hasMore);
2850
- const nextPageParamsRef = (0, import_react38.useRef)(void 0);
2791
+ const { address } = useWallet();
2792
+ const hasMoreRef = (0, import_react37.useRef)(hasMore);
2793
+ const nextPageParamsRef = (0, import_react37.useRef)(void 0);
2851
2794
  const { contracts, setContracts } = useContractStore_default();
2852
2795
  const fetchMoreData = async () => {
2853
2796
  const chainIdStr = chainId ? chainId.toString() : "";
@@ -2874,7 +2817,7 @@ function useMatchWalletRecords() {
2874
2817
  hasMoreRef.current = true;
2875
2818
  fetchMoreData();
2876
2819
  };
2877
- (0, import_react38.useEffect)(() => {
2820
+ (0, import_react37.useEffect)(() => {
2878
2821
  if (chainId && address) {
2879
2822
  onInit();
2880
2823
  }
@@ -2930,7 +2873,7 @@ function useMatchWalletRecords() {
2930
2873
  setContracts(contractMap);
2931
2874
  }
2932
2875
  };
2933
- const list = (0, import_react38.useMemo)(() => {
2876
+ const list = (0, import_react37.useMemo)(() => {
2934
2877
  const localTransactions = transactions[`${chainId}-${address}`] || [];
2935
2878
  const removeList = localTransactions.filter((n) => items.findIndex((m) => m.hash == n.hash) >= 0);
2936
2879
  removeList.forEach((item) => {
@@ -2972,7 +2915,7 @@ function useMatchWalletAssets({
2972
2915
  chainId: chainId || 0,
2973
2916
  ...assetListOptions
2974
2917
  });
2975
- const mergedAssets = (0, import_react38.useMemo)(() => {
2918
+ const mergedAssets = (0, import_react37.useMemo)(() => {
2976
2919
  if (!assetListQuery.data && !importTokenQuery.data) return [];
2977
2920
  const assetList = (assetListQuery.data || []).map((asset) => ({
2978
2921
  ...asset,
@@ -3030,7 +2973,7 @@ function useMatchWalletAssetList({
3030
2973
  list
3031
2974
  }) {
3032
2975
  const { publicClient, chain } = useMatchChain();
3033
- const { address } = useWallet2();
2976
+ const { address } = useWallet();
3034
2977
  const { assets, setAssets } = useLocalStore_default();
3035
2978
  const nativeToken = list.find((asset) => asset.address.toLowerCase() === NATIVE_TOKEN_ADDRESS.toLowerCase()) || {
3036
2979
  chain_id: chain?.id || "",
@@ -3059,7 +3002,7 @@ function useMatchWalletAssetList({
3059
3002
  retry: 3
3060
3003
  // Retry up to 3 times if failed
3061
3004
  });
3062
- const erc20Tokens = (0, import_react38.useMemo)(() => list.filter((asset) => asset.address !== NATIVE_TOKEN_ADDRESS), [list]);
3005
+ const erc20Tokens = (0, import_react37.useMemo)(() => list.filter((asset) => asset.address !== NATIVE_TOKEN_ADDRESS), [list]);
3063
3006
  const erc20BalanceQuery = (0, import_react_query8.useQuery)({
3064
3007
  queryKey: ["erc20Balances", erc20Tokens.map((token) => token.address)],
3065
3008
  queryFn: async () => {
@@ -3087,7 +3030,7 @@ function useMatchWalletAssetList({
3087
3030
  // Refresh every 15 seconds
3088
3031
  retry: 3
3089
3032
  });
3090
- const enrichedAssets = (0, import_react38.useMemo)(() => {
3033
+ const enrichedAssets = (0, import_react37.useMemo)(() => {
3091
3034
  if (!list) return [];
3092
3035
  const erc20Balances = erc20BalanceQuery.data || [];
3093
3036
  return list.map((asset) => {
@@ -3109,7 +3052,7 @@ function useMatchWalletAssetList({
3109
3052
  return { ...asset, balance, value, balanceValue };
3110
3053
  });
3111
3054
  }, [list, nativeBalanceQuery.data, erc20BalanceQuery.data]);
3112
- (0, import_react38.useEffect)(() => {
3055
+ (0, import_react37.useEffect)(() => {
3113
3056
  const list2 = enrichedAssets.sort((a, b) => {
3114
3057
  if (a.address === NATIVE_TOKEN_ADDRESS) return -1;
3115
3058
  if (b.address === NATIVE_TOKEN_ADDRESS) return 1;
@@ -3134,14 +3077,14 @@ function useMatchWalletAssetList({
3134
3077
  }
3135
3078
 
3136
3079
  // src/hooks/useReceipt.tsx
3137
- var import_react39 = require("react");
3080
+ var import_react38 = require("react");
3138
3081
  var import_react_query9 = require("@tanstack/react-query");
3139
3082
  var import_viem12 = require("viem");
3140
3083
  var CACHE_TTL = 86400 * 30 * 1e3;
3141
3084
  var MAX_CACHE_SIZE = 500;
3142
3085
  var STORAGE_KEY = "match_receipt_logs";
3143
3086
  function useReceiptCache() {
3144
- const [cache, setCache] = (0, import_react39.useState)(/* @__PURE__ */ new Map());
3087
+ const [cache, setCache] = (0, import_react38.useState)(/* @__PURE__ */ new Map());
3145
3088
  const isLocalStorageAvailable = (() => {
3146
3089
  try {
3147
3090
  const testKey = "__test__";
@@ -3152,7 +3095,7 @@ function useReceiptCache() {
3152
3095
  return false;
3153
3096
  }
3154
3097
  })();
3155
- (0, import_react39.useEffect)(() => {
3098
+ (0, import_react38.useEffect)(() => {
3156
3099
  if (isLocalStorageAvailable) {
3157
3100
  try {
3158
3101
  const storedData = localStorage.getItem(STORAGE_KEY);
@@ -3171,7 +3114,7 @@ function useReceiptCache() {
3171
3114
  }
3172
3115
  }
3173
3116
  }, []);
3174
- const updateLocalStorage = (0, import_react39.useCallback)((updatedCache) => {
3117
+ const updateLocalStorage = (0, import_react38.useCallback)((updatedCache) => {
3175
3118
  if (isLocalStorageAvailable) {
3176
3119
  try {
3177
3120
  const storedData = localStorage.getItem(STORAGE_KEY);
@@ -3188,7 +3131,7 @@ function useReceiptCache() {
3188
3131
  }
3189
3132
  }
3190
3133
  }, []);
3191
- const set = (0, import_react39.useCallback)((key, value) => {
3134
+ const set = (0, import_react38.useCallback)((key, value) => {
3192
3135
  const now = Date.now();
3193
3136
  const newCache = new Map(cache);
3194
3137
  newCache.forEach((entry, k) => {
@@ -3206,7 +3149,7 @@ function useReceiptCache() {
3206
3149
  setCache(newCache);
3207
3150
  updateLocalStorage(newCache);
3208
3151
  }, [cache, updateLocalStorage]);
3209
- const get = (0, import_react39.useCallback)((key) => {
3152
+ const get = (0, import_react38.useCallback)((key) => {
3210
3153
  const entry = cache.get(key);
3211
3154
  if (entry) {
3212
3155
  if (Date.now() - entry.timestamp > CACHE_TTL) {
@@ -3220,7 +3163,7 @@ function useReceiptCache() {
3220
3163
  }
3221
3164
  return void 0;
3222
3165
  }, [cache, updateLocalStorage]);
3223
- const del = (0, import_react39.useCallback)((key) => {
3166
+ const del = (0, import_react38.useCallback)((key) => {
3224
3167
  if (cache.has(key)) {
3225
3168
  const newCache = new Map(cache);
3226
3169
  newCache.delete(key);
@@ -3228,7 +3171,7 @@ function useReceiptCache() {
3228
3171
  updateLocalStorage(newCache);
3229
3172
  }
3230
3173
  }, [cache, updateLocalStorage]);
3231
- const clear = (0, import_react39.useCallback)(() => {
3174
+ const clear = (0, import_react38.useCallback)(() => {
3232
3175
  setCache(/* @__PURE__ */ new Map());
3233
3176
  if (isLocalStorageAvailable) {
3234
3177
  localStorage.removeItem(STORAGE_KEY);
@@ -3243,7 +3186,7 @@ function useReceipt2({
3243
3186
  const { list } = useMatchChain();
3244
3187
  const cache = useReceiptCache();
3245
3188
  const chain = list?.find((item) => item.id === chainId);
3246
- const [shouldRefetch, setShouldRefetch] = (0, import_react39.useState)(true);
3189
+ const [shouldRefetch, setShouldRefetch] = (0, import_react38.useState)(true);
3247
3190
  const query = (0, import_react_query9.useQuery)({
3248
3191
  queryKey: ["match-tx-receipt", hash, chain],
3249
3192
  queryFn: async () => {
@@ -3269,7 +3212,7 @@ function useReceipt2({
3269
3212
  },
3270
3213
  refetchInterval: shouldRefetch ? 1e4 : false
3271
3214
  });
3272
- (0, import_react39.useEffect)(() => {
3215
+ (0, import_react38.useEffect)(() => {
3273
3216
  if (query.data) {
3274
3217
  setShouldRefetch(false);
3275
3218
  }
@@ -3278,14 +3221,14 @@ function useReceipt2({
3278
3221
  }
3279
3222
 
3280
3223
  // src/hooks/useTransaction.tsx
3281
- var import_react40 = require("react");
3224
+ var import_react39 = require("react");
3282
3225
  var import_react_query10 = require("@tanstack/react-query");
3283
3226
  var import_viem13 = require("viem");
3284
3227
  var CACHE_TTL2 = 86400 * 30 * 1e3;
3285
3228
  var MAX_CACHE_SIZE2 = 500;
3286
3229
  var STORAGE_KEY2 = "match_transaction_logs";
3287
3230
  function useTransactionCache() {
3288
- const [cache, setCache] = (0, import_react40.useState)(/* @__PURE__ */ new Map());
3231
+ const [cache, setCache] = (0, import_react39.useState)(/* @__PURE__ */ new Map());
3289
3232
  const isLocalStorageAvailable = (() => {
3290
3233
  try {
3291
3234
  const testKey = "__test__";
@@ -3296,7 +3239,7 @@ function useTransactionCache() {
3296
3239
  return false;
3297
3240
  }
3298
3241
  })();
3299
- (0, import_react40.useEffect)(() => {
3242
+ (0, import_react39.useEffect)(() => {
3300
3243
  if (isLocalStorageAvailable) {
3301
3244
  try {
3302
3245
  const storedData = localStorage.getItem(STORAGE_KEY2);
@@ -3315,7 +3258,7 @@ function useTransactionCache() {
3315
3258
  }
3316
3259
  }
3317
3260
  }, []);
3318
- const updateLocalStorage = (0, import_react40.useCallback)((updatedCache) => {
3261
+ const updateLocalStorage = (0, import_react39.useCallback)((updatedCache) => {
3319
3262
  if (isLocalStorageAvailable) {
3320
3263
  try {
3321
3264
  const storedData = localStorage.getItem(STORAGE_KEY2);
@@ -3332,7 +3275,7 @@ function useTransactionCache() {
3332
3275
  }
3333
3276
  }
3334
3277
  }, []);
3335
- const set = (0, import_react40.useCallback)((key, value) => {
3278
+ const set = (0, import_react39.useCallback)((key, value) => {
3336
3279
  const now = Date.now();
3337
3280
  const newCache = new Map(cache);
3338
3281
  newCache.forEach((entry, k) => {
@@ -3350,7 +3293,7 @@ function useTransactionCache() {
3350
3293
  setCache(newCache);
3351
3294
  updateLocalStorage(newCache);
3352
3295
  }, [cache, updateLocalStorage]);
3353
- const get = (0, import_react40.useCallback)((key) => {
3296
+ const get = (0, import_react39.useCallback)((key) => {
3354
3297
  const entry = cache.get(key);
3355
3298
  if (entry) {
3356
3299
  if (Date.now() - entry.timestamp > CACHE_TTL2) {
@@ -3364,7 +3307,7 @@ function useTransactionCache() {
3364
3307
  }
3365
3308
  return void 0;
3366
3309
  }, [cache, updateLocalStorage]);
3367
- const del = (0, import_react40.useCallback)((key) => {
3310
+ const del = (0, import_react39.useCallback)((key) => {
3368
3311
  if (cache.has(key)) {
3369
3312
  const newCache = new Map(cache);
3370
3313
  newCache.delete(key);
@@ -3372,7 +3315,7 @@ function useTransactionCache() {
3372
3315
  updateLocalStorage(newCache);
3373
3316
  }
3374
3317
  }, [cache, updateLocalStorage]);
3375
- const clear = (0, import_react40.useCallback)(() => {
3318
+ const clear = (0, import_react39.useCallback)(() => {
3376
3319
  setCache(/* @__PURE__ */ new Map());
3377
3320
  if (isLocalStorageAvailable) {
3378
3321
  localStorage.removeItem(STORAGE_KEY2);
@@ -3387,7 +3330,7 @@ function useTransaction({
3387
3330
  const { list } = useMatchChain();
3388
3331
  const cache = useTransactionCache();
3389
3332
  const chain = list?.find((item) => item.id === chainId);
3390
- const [shouldRefetch, setShouldRefetch] = (0, import_react40.useState)(true);
3333
+ const [shouldRefetch, setShouldRefetch] = (0, import_react39.useState)(true);
3391
3334
  const query = (0, import_react_query10.useQuery)({
3392
3335
  queryKey: ["match-tx-transaction", hash, chain],
3393
3336
  queryFn: async () => {
@@ -3413,7 +3356,7 @@ function useTransaction({
3413
3356
  },
3414
3357
  refetchInterval: shouldRefetch ? 1e4 : false
3415
3358
  });
3416
- (0, import_react40.useEffect)(() => {
3359
+ (0, import_react39.useEffect)(() => {
3417
3360
  if (query.data) {
3418
3361
  setShouldRefetch(false);
3419
3362
  }