@matchain/matchid-sdk-react 0.1.56 → 0.1.57
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.
- package/dist/api.d.mts +2 -2
- package/dist/api.d.ts +2 -2
- package/dist/api.js +96 -48
- package/dist/api.js.map +1 -1
- package/dist/api.mjs +3 -3
- package/dist/chains.d.mts +1 -1
- package/dist/chains.d.ts +1 -1
- package/dist/{chunk-GD7URBBZ.mjs → chunk-7SUDHG7S.mjs} +41 -1
- package/dist/chunk-7SUDHG7S.mjs.map +1 -0
- package/dist/{chunk-NYE6DBEZ.mjs → chunk-EUG3QRAG.mjs} +2 -2
- package/dist/{chunk-KFB23MLQ.mjs → chunk-QMV4FDUH.mjs} +348 -215
- package/dist/chunk-QMV4FDUH.mjs.map +1 -0
- package/dist/components.d.mts +3 -3
- package/dist/components.d.ts +3 -3
- package/dist/components.js +495 -368
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +2 -2
- package/dist/hooks.d.mts +2 -3
- package/dist/hooks.d.ts +2 -3
- package/dist/hooks.js +228 -182
- package/dist/hooks.js.map +1 -1
- package/dist/hooks.mjs +2 -2
- package/dist/icon.d.mts +2 -2
- package/dist/icon.d.ts +2 -2
- package/dist/icon.js +40 -0
- package/dist/icon.js.map +1 -1
- package/dist/icon.mjs +5 -1
- package/dist/{index-CBcBTQyU.d.mts → index-84CqVi2I.d.mts} +1 -1
- package/dist/index-B70k4Jpk.d.ts +7138 -0
- package/dist/index-BJJ0Gb6v.d.mts +7138 -0
- package/dist/{index-DlaCsN95.d.ts → index-BNqdFiOo.d.ts} +1 -1
- package/dist/{index-xThRnNN3.d.mts → index-BctnHnJp.d.ts} +11 -3
- package/dist/{index-CjekOYJl.d.mts → index-BqI0PEIi.d.mts} +1 -1
- package/dist/{index-BcuSCgol.d.ts → index-C2hr7zlN.d.ts} +5 -3
- package/dist/{index-CD0dACxf.d.mts → index-CTHpnEoB.d.mts} +5 -3
- package/dist/{index-CER00guz.d.mts → index-Car1jFyN.d.mts} +1 -1
- package/dist/{index-B50DU_xT.d.mts → index-CboftuIp.d.mts} +2 -0
- package/dist/{index-B50DU_xT.d.ts → index-CboftuIp.d.ts} +2 -0
- package/dist/{index-o0WW1c5O.d.ts → index-CcVHENNv.d.ts} +1 -1
- package/dist/{index-DkIIQLbh.d.ts → index-Cqdz_5bE.d.ts} +2 -2
- package/dist/{index-DdN22cwf.d.ts → index-CvzpMw3N.d.ts} +1 -1
- package/dist/{index-DN-jrh8-.d.ts → index-DkijpM5Q.d.mts} +11 -3
- package/dist/{index-lh6qBAf_.d.mts → index-DxHhOW24.d.mts} +2 -2
- package/dist/index.css +209 -46
- package/dist/index.d.mts +166 -88
- package/dist/index.d.ts +166 -88
- package/dist/index.js +596 -427
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/{types-CheN9vHJ.d.mts → types-BrVeC0c8.d.mts} +1 -1
- package/dist/{types-CheN9vHJ.d.ts → types-BrVeC0c8.d.ts} +1 -1
- package/dist/types.d.mts +1 -1
- package/dist/types.d.ts +1 -1
- package/dist/ui.d.mts +3 -3
- package/dist/ui.d.ts +3 -3
- package/dist/ui.js +127 -110
- package/dist/ui.js.map +1 -1
- package/dist/ui.mjs +2 -2
- package/example/src/App.tsx +65 -60
- package/example/src/config/index.ts +8 -6
- package/example/src/pages/Wallet/index.tsx +88 -88
- package/package.json +2 -2
- package/dist/chunk-GD7URBBZ.mjs.map +0 -1
- package/dist/chunk-KFB23MLQ.mjs.map +0 -1
- package/dist/index-BlMLqmS2.d.mts +0 -3341
- package/dist/index-C1Nyy5zx.d.ts +0 -3341
- /package/dist/{chunk-NYE6DBEZ.mjs.map → chunk-EUG3QRAG.mjs.map} +0 -0
package/dist/hooks.js
CHANGED
|
@@ -652,6 +652,12 @@ function InputLengthIcon({
|
|
|
652
652
|
) });
|
|
653
653
|
}
|
|
654
654
|
|
|
655
|
+
// src/assets/icon/KakaoIcon.tsx
|
|
656
|
+
var import_jsx_runtime54 = require("react/jsx-runtime");
|
|
657
|
+
|
|
658
|
+
// src/assets/icon/MatchIdIcon.tsx
|
|
659
|
+
var import_jsx_runtime55 = require("react/jsx-runtime");
|
|
660
|
+
|
|
655
661
|
// src/hooks/useLayout.tsx
|
|
656
662
|
var useLayout_exports = {};
|
|
657
663
|
__export(useLayout_exports, {
|
|
@@ -673,7 +679,7 @@ function useDownMd() {
|
|
|
673
679
|
}
|
|
674
680
|
|
|
675
681
|
// src/hooks/useConfig.tsx
|
|
676
|
-
var
|
|
682
|
+
var import_jsx_runtime56 = require("react/jsx-runtime");
|
|
677
683
|
var DEFAULT_WALLET_METHODS = ["evm", "sol", "btc", "tron", "ton"];
|
|
678
684
|
|
|
679
685
|
// src/store/useModalStore.ts
|
|
@@ -714,6 +720,12 @@ var useWalletModalStore = (0, import_zustand2.create)((set) => ({
|
|
|
714
720
|
open: (type, methods = DEFAULT_WALLET_METHODS) => set({ isOpen: true, type, methods }),
|
|
715
721
|
close: () => set({ isOpen: false })
|
|
716
722
|
}));
|
|
723
|
+
var useEmailModalStore = (0, import_zustand2.create)((set) => ({
|
|
724
|
+
isOpen: false,
|
|
725
|
+
type: "",
|
|
726
|
+
open: (type) => set({ isOpen: true, type }),
|
|
727
|
+
close: () => set({ isOpen: false })
|
|
728
|
+
}));
|
|
717
729
|
|
|
718
730
|
// src/components/EmailModal/index.tsx
|
|
719
731
|
var import_react7 = require("react");
|
|
@@ -723,7 +735,7 @@ var import_react3 = require("react");
|
|
|
723
735
|
|
|
724
736
|
// src/ui/Overlay/index.tsx
|
|
725
737
|
var import_react2 = require("react");
|
|
726
|
-
var
|
|
738
|
+
var import_jsx_runtime57 = require("react/jsx-runtime");
|
|
727
739
|
function Overlay({
|
|
728
740
|
isOpen = false,
|
|
729
741
|
children,
|
|
@@ -739,7 +751,7 @@ function Overlay({
|
|
|
739
751
|
document.body.style.overflow = "";
|
|
740
752
|
};
|
|
741
753
|
}, [isOpen]);
|
|
742
|
-
return isOpen ? /* @__PURE__ */ (0,
|
|
754
|
+
return isOpen ? /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(
|
|
743
755
|
"div",
|
|
744
756
|
{
|
|
745
757
|
className: "matchid-overlay",
|
|
@@ -748,12 +760,12 @@ function Overlay({
|
|
|
748
760
|
},
|
|
749
761
|
children
|
|
750
762
|
}
|
|
751
|
-
) : /* @__PURE__ */ (0,
|
|
763
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime57.jsx)(import_jsx_runtime57.Fragment, {});
|
|
752
764
|
}
|
|
753
765
|
|
|
754
766
|
// src/ui/Modal/index.tsx
|
|
755
767
|
var import_react_intl = require("react-intl");
|
|
756
|
-
var
|
|
768
|
+
var import_jsx_runtime58 = require("react/jsx-runtime");
|
|
757
769
|
function Modal({
|
|
758
770
|
children,
|
|
759
771
|
isOpen,
|
|
@@ -761,10 +773,10 @@ function Modal({
|
|
|
761
773
|
zIndex = 100,
|
|
762
774
|
className = ""
|
|
763
775
|
}) {
|
|
764
|
-
return /* @__PURE__ */ (0,
|
|
776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: `matchid-modal ${className}`, style: {
|
|
765
777
|
width
|
|
766
778
|
}, children: [
|
|
767
|
-
/* @__PURE__ */ (0,
|
|
779
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("div", { className: "matchid-modal-mobile-header" }),
|
|
768
780
|
children
|
|
769
781
|
] }) });
|
|
770
782
|
}
|
|
@@ -778,13 +790,13 @@ function ModalWithHeader({
|
|
|
778
790
|
...props
|
|
779
791
|
}) {
|
|
780
792
|
const isDownMd = useDownMd();
|
|
781
|
-
return /* @__PURE__ */ (0,
|
|
782
|
-
/* @__PURE__ */ (0,
|
|
783
|
-
/* @__PURE__ */ (0,
|
|
784
|
-
onBack && /* @__PURE__ */ (0,
|
|
785
|
-
/* @__PURE__ */ (0,
|
|
793
|
+
return /* @__PURE__ */ (0, import_jsx_runtime58.jsxs)(Modal, { ...props, children: [
|
|
794
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: `matchid-modal-header ${showBorder ? "matchid-modal-header-border" : ""}`, children: [
|
|
795
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsxs)("div", { className: "matchid-modal-header-content", children: [
|
|
796
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(ArrowLeftIcon, { height: isDownMd ? 20 : 25, width: isDownMd ? 20 : 24, className: "matchid-modal-header-back", onClick: onBack }),
|
|
797
|
+
/* @__PURE__ */ (0, import_jsx_runtime58.jsx)("span", { className: "matchid-modal-header-title", children: title })
|
|
786
798
|
] }),
|
|
787
|
-
onClose && /* @__PURE__ */ (0,
|
|
799
|
+
onClose && /* @__PURE__ */ (0, import_jsx_runtime58.jsx)(CloseRoundIcon, { size: isDownMd ? 24 : 30, className: "matchid-modal-header-close", onClick: onClose })
|
|
788
800
|
] }),
|
|
789
801
|
children
|
|
790
802
|
] });
|
|
@@ -795,7 +807,7 @@ var import_react5 = require("react");
|
|
|
795
807
|
|
|
796
808
|
// src/utils/index.tsx
|
|
797
809
|
var import_moment = __toESM(require("moment"));
|
|
798
|
-
var
|
|
810
|
+
var import_jsx_runtime59 = require("react/jsx-runtime");
|
|
799
811
|
var getVersion = () => {
|
|
800
812
|
return "0.0.2";
|
|
801
813
|
};
|
|
@@ -827,10 +839,10 @@ var NumberFormatter = ({
|
|
|
827
839
|
const [intPart, decimalPart] = numberValue.toString().split(".");
|
|
828
840
|
const intFormat = separator ? intPart.replace(/\B(?=(\d{3})+(?!\d))/g, ",") : intPart;
|
|
829
841
|
if (Math.abs(parseFloat(numberValue)) >= 1) {
|
|
830
|
-
return /* @__PURE__ */ (0,
|
|
831
|
-
prefix && /* @__PURE__ */ (0,
|
|
832
|
-
/* @__PURE__ */ (0,
|
|
833
|
-
decimalPart ? /* @__PURE__ */ (0,
|
|
842
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className, children: [
|
|
843
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: prefixClassName, children: prefix }),
|
|
844
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: intClassName, children: intFormat }),
|
|
845
|
+
decimalPart ? /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className: decimalClassName, children: [
|
|
834
846
|
".",
|
|
835
847
|
decimalPart.substring(0, fixNum)
|
|
836
848
|
] }) : "",
|
|
@@ -847,30 +859,30 @@ var NumberFormatter = ({
|
|
|
847
859
|
}
|
|
848
860
|
}
|
|
849
861
|
if (zeroCount < tFixNum) {
|
|
850
|
-
return /* @__PURE__ */ (0,
|
|
851
|
-
prefix && /* @__PURE__ */ (0,
|
|
852
|
-
/* @__PURE__ */ (0,
|
|
853
|
-
/* @__PURE__ */ (0,
|
|
862
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className, children: [
|
|
863
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: prefixClassName, children: prefix }),
|
|
864
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: intClassName, children: intFormat }),
|
|
865
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className: decimalClassName, children: [
|
|
854
866
|
".",
|
|
855
867
|
decimalPart.substring(0, tFixNum)
|
|
856
868
|
] }),
|
|
857
869
|
suffix
|
|
858
870
|
] });
|
|
859
871
|
}
|
|
860
|
-
return /* @__PURE__ */ (0,
|
|
861
|
-
prefix && /* @__PURE__ */ (0,
|
|
862
|
-
/* @__PURE__ */ (0,
|
|
863
|
-
/* @__PURE__ */ (0,
|
|
872
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className, children: [
|
|
873
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: prefixClassName, children: prefix }),
|
|
874
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: intClassName, children: intFormat }),
|
|
875
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className: decimalClassName, children: [
|
|
864
876
|
".0",
|
|
865
|
-
/* @__PURE__ */ (0,
|
|
877
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("sub", { children: zeroCount }),
|
|
866
878
|
decimalPart?.substring(zeroCount, zeroCount + tFixNum - 2)
|
|
867
879
|
] }),
|
|
868
880
|
suffix
|
|
869
881
|
] });
|
|
870
882
|
}
|
|
871
|
-
return /* @__PURE__ */ (0,
|
|
872
|
-
prefix && /* @__PURE__ */ (0,
|
|
873
|
-
/* @__PURE__ */ (0,
|
|
883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime59.jsxs)("span", { className, children: [
|
|
884
|
+
prefix && /* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: prefixClassName, children: prefix }),
|
|
885
|
+
/* @__PURE__ */ (0, import_jsx_runtime59.jsx)("span", { className: intClassName, children: intPart }),
|
|
874
886
|
suffix
|
|
875
887
|
] });
|
|
876
888
|
};
|
|
@@ -879,7 +891,7 @@ var isInTgApp = () => {
|
|
|
879
891
|
};
|
|
880
892
|
|
|
881
893
|
// src/ui/Button/index.tsx
|
|
882
|
-
var
|
|
894
|
+
var import_jsx_runtime60 = require("react/jsx-runtime");
|
|
883
895
|
function Button({
|
|
884
896
|
size = "df",
|
|
885
897
|
disabled = false,
|
|
@@ -899,7 +911,7 @@ function Button({
|
|
|
899
911
|
onClick && onClick();
|
|
900
912
|
}
|
|
901
913
|
};
|
|
902
|
-
return /* @__PURE__ */ (0,
|
|
914
|
+
return /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(
|
|
903
915
|
"button",
|
|
904
916
|
{
|
|
905
917
|
type,
|
|
@@ -910,14 +922,14 @@ function Button({
|
|
|
910
922
|
},
|
|
911
923
|
onClick: onAction,
|
|
912
924
|
...dataset,
|
|
913
|
-
children: loading ? /* @__PURE__ */ (0,
|
|
925
|
+
children: loading ? /* @__PURE__ */ (0, import_jsx_runtime60.jsx)(LoadingIcon_default, { className: "matchid-btn-loading-icon", color: "var(--matchid-btn-loading-color)" }) : children
|
|
914
926
|
}
|
|
915
927
|
);
|
|
916
928
|
}
|
|
917
929
|
|
|
918
930
|
// src/ui/Input/index.tsx
|
|
919
931
|
var import_react4 = require("react");
|
|
920
|
-
var
|
|
932
|
+
var import_jsx_runtime61 = require("react/jsx-runtime");
|
|
921
933
|
function Input({
|
|
922
934
|
onChange,
|
|
923
935
|
type,
|
|
@@ -942,7 +954,7 @@ function Input({
|
|
|
942
954
|
textarea.style.height = Math.min(textarea.scrollHeight, maxHeight) + "px";
|
|
943
955
|
}
|
|
944
956
|
}, [props.value]);
|
|
945
|
-
return /* @__PURE__ */ (0,
|
|
957
|
+
return /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)(
|
|
946
958
|
"div",
|
|
947
959
|
{
|
|
948
960
|
className: `matchid-input-box matchid-input-${type} ${props.value && props.value.length > 0 ? "matchid-input-has-content" : ""} ${className}`,
|
|
@@ -951,14 +963,14 @@ function Input({
|
|
|
951
963
|
"--max-rows": maxRows
|
|
952
964
|
},
|
|
953
965
|
children: [
|
|
954
|
-
children ?? (type == "textarea" ? /* @__PURE__ */ (0,
|
|
966
|
+
children ?? (type == "textarea" ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("textarea", { rows: 1, onChange, ...props, className: "matchid-input-field", ref: textareaRef, style: {
|
|
955
967
|
maxHeight: maxRows * 24 + "px"
|
|
956
|
-
} }) : /* @__PURE__ */ (0,
|
|
957
|
-
type != "textarea" && showClear && props.value && props.value.length > 0 && /* @__PURE__ */ (0,
|
|
968
|
+
} }) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("input", { type: inputType, onChange, ...props, className: "matchid-input-field" })),
|
|
969
|
+
type != "textarea" && showClear && props.value && props.value.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "matchid-input-delete-icon", onClick: (e) => {
|
|
958
970
|
if (onChange) {
|
|
959
971
|
onChange({ target: { value: "" } });
|
|
960
972
|
}
|
|
961
|
-
}, children: /* @__PURE__ */ (0,
|
|
973
|
+
}, children: /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(
|
|
962
974
|
DeleteRoundIcon,
|
|
963
975
|
{
|
|
964
976
|
height: isDownMd ? 16 : 21,
|
|
@@ -966,16 +978,16 @@ function Input({
|
|
|
966
978
|
color: "var(--matchid-input-delete-icon-color)"
|
|
967
979
|
}
|
|
968
980
|
) }),
|
|
969
|
-
type === "password" && /* @__PURE__ */ (0,
|
|
981
|
+
type === "password" && /* @__PURE__ */ (0, import_jsx_runtime61.jsx)("div", { className: "matchid-input-eye-icon", onClick: () => {
|
|
970
982
|
setInputType(inputType === "password" ? "text" : "password");
|
|
971
|
-
}, children: inputType === "password" ? /* @__PURE__ */ (0,
|
|
972
|
-
showLength && props.maxLength && /* @__PURE__ */ (0,
|
|
973
|
-
/* @__PURE__ */ (0,
|
|
983
|
+
}, children: inputType === "password" ? /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(CloseEyeIcon, { size: isDownMd ? 16 : 20 }) : /* @__PURE__ */ (0, import_jsx_runtime61.jsx)(OpenEyeIcon, { size: isDownMd ? 16 : 20 }) }),
|
|
984
|
+
showLength && props.maxLength && /* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("div", { className: `matchid-input-length`, children: [
|
|
985
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsxs)("span", { children: [
|
|
974
986
|
props.value?.length || 0,
|
|
975
987
|
"/",
|
|
976
988
|
props.maxLength
|
|
977
989
|
] }),
|
|
978
|
-
/* @__PURE__ */ (0,
|
|
990
|
+
/* @__PURE__ */ (0, import_jsx_runtime61.jsx)(InputLengthIcon, { color: "var(--icon-color)" })
|
|
979
991
|
] }),
|
|
980
992
|
after
|
|
981
993
|
]
|
|
@@ -984,7 +996,7 @@ function Input({
|
|
|
984
996
|
}
|
|
985
997
|
|
|
986
998
|
// src/ui/Field/index.tsx
|
|
987
|
-
var
|
|
999
|
+
var import_jsx_runtime62 = require("react/jsx-runtime");
|
|
988
1000
|
function Field({
|
|
989
1001
|
label,
|
|
990
1002
|
children,
|
|
@@ -992,19 +1004,19 @@ function Field({
|
|
|
992
1004
|
required,
|
|
993
1005
|
className = ""
|
|
994
1006
|
}) {
|
|
995
|
-
return /* @__PURE__ */ (0,
|
|
996
|
-
/* @__PURE__ */ (0,
|
|
997
|
-
required && /* @__PURE__ */ (0,
|
|
1007
|
+
return /* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: `matchid-field-box ${className}`, children: [
|
|
1008
|
+
/* @__PURE__ */ (0, import_jsx_runtime62.jsxs)("div", { className: "matchid-field-label", children: [
|
|
1009
|
+
required && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("span", { className: "matchid-field-required", children: "*" }),
|
|
998
1010
|
label
|
|
999
1011
|
] }),
|
|
1000
1012
|
children,
|
|
1001
|
-
error && /* @__PURE__ */ (0,
|
|
1013
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime62.jsx)("div", { className: "matchid-field-error", children: error })
|
|
1002
1014
|
] });
|
|
1003
1015
|
}
|
|
1004
1016
|
|
|
1005
1017
|
// src/components/EmailModal/StepEmail.tsx
|
|
1006
1018
|
var import_react_intl2 = require("react-intl");
|
|
1007
|
-
var
|
|
1019
|
+
var import_jsx_runtime63 = require("react/jsx-runtime");
|
|
1008
1020
|
|
|
1009
1021
|
// src/components/EmailModal/StepVerify.tsx
|
|
1010
1022
|
var import_react6 = require("react");
|
|
@@ -1014,15 +1026,15 @@ var NATIVE_TOKEN_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
|
1014
1026
|
|
|
1015
1027
|
// src/components/EmailModal/StepVerify.tsx
|
|
1016
1028
|
var import_react_intl3 = require("react-intl");
|
|
1017
|
-
var
|
|
1029
|
+
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
1018
1030
|
|
|
1019
1031
|
// src/components/EmailModal/index.tsx
|
|
1020
1032
|
var import_react_intl4 = require("react-intl");
|
|
1021
|
-
var
|
|
1033
|
+
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
1022
1034
|
|
|
1023
1035
|
// src/ui/Popover/index.tsx
|
|
1024
1036
|
var import_react8 = require("react");
|
|
1025
|
-
var
|
|
1037
|
+
var import_jsx_runtime66 = require("react/jsx-runtime");
|
|
1026
1038
|
|
|
1027
1039
|
// src/components/LoginBox/index.tsx
|
|
1028
1040
|
var import_react9 = require("react");
|
|
@@ -1032,39 +1044,39 @@ var import_react_intl5 = require("react-intl");
|
|
|
1032
1044
|
var import_react_query = require("@tanstack/react-query");
|
|
1033
1045
|
|
|
1034
1046
|
// src/components/LoginBox/index.tsx
|
|
1035
|
-
var
|
|
1047
|
+
var import_jsx_runtime67 = require("react/jsx-runtime");
|
|
1036
1048
|
|
|
1037
1049
|
// src/components/LoginButton/index.tsx
|
|
1038
1050
|
var import_react11 = require("react");
|
|
1039
1051
|
|
|
1040
1052
|
// src/components/LoginPanel/index.tsx
|
|
1041
1053
|
var import_react_intl6 = require("react-intl");
|
|
1042
|
-
var
|
|
1054
|
+
var import_jsx_runtime68 = require("react/jsx-runtime");
|
|
1043
1055
|
|
|
1044
1056
|
// src/components/LoginModal/index.tsx
|
|
1045
|
-
var
|
|
1057
|
+
var import_jsx_runtime69 = require("react/jsx-runtime");
|
|
1046
1058
|
|
|
1047
1059
|
// src/components/UserPopover/index.tsx
|
|
1048
1060
|
var import_react10 = require("react");
|
|
1049
1061
|
|
|
1050
1062
|
// src/assets/icon/ProfileIcon.tsx
|
|
1051
|
-
var
|
|
1063
|
+
var import_jsx_runtime70 = require("react/jsx-runtime");
|
|
1052
1064
|
|
|
1053
1065
|
// src/components/UserPopover/index.tsx
|
|
1054
1066
|
var import_react_intl7 = require("react-intl");
|
|
1055
|
-
var
|
|
1067
|
+
var import_jsx_runtime71 = require("react/jsx-runtime");
|
|
1056
1068
|
|
|
1057
1069
|
// src/components/LoginButton/index.tsx
|
|
1058
1070
|
var import_react_intl8 = require("react-intl");
|
|
1059
|
-
var
|
|
1071
|
+
var import_jsx_runtime72 = require("react/jsx-runtime");
|
|
1060
1072
|
|
|
1061
1073
|
// src/components/UsernameModal/index.tsx
|
|
1062
1074
|
var import_react12 = require("react");
|
|
1063
1075
|
var import_react_intl9 = require("react-intl");
|
|
1064
|
-
var
|
|
1076
|
+
var import_jsx_runtime73 = require("react/jsx-runtime");
|
|
1065
1077
|
|
|
1066
1078
|
// src/ui/Drawer/index.tsx
|
|
1067
|
-
var
|
|
1079
|
+
var import_jsx_runtime74 = require("react/jsx-runtime");
|
|
1068
1080
|
function Drawer({
|
|
1069
1081
|
children,
|
|
1070
1082
|
showClose = true,
|
|
@@ -1075,15 +1087,15 @@ function Drawer({
|
|
|
1075
1087
|
onBack
|
|
1076
1088
|
}) {
|
|
1077
1089
|
if (!isOpen) {
|
|
1078
|
-
return /* @__PURE__ */ (0,
|
|
1090
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(import_jsx_runtime74.Fragment, {});
|
|
1079
1091
|
}
|
|
1080
|
-
return /* @__PURE__ */ (0,
|
|
1081
|
-
/* @__PURE__ */ (0,
|
|
1082
|
-
/* @__PURE__ */ (0,
|
|
1083
|
-
onBack && /* @__PURE__ */ (0,
|
|
1092
|
+
return /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(Overlay, { isOpen, zIndex, children: /* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: "matchid-drawer", children: [
|
|
1093
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: `matchid-drawer-header matchid-flex`, children: [
|
|
1094
|
+
/* @__PURE__ */ (0, import_jsx_runtime74.jsxs)("div", { className: `matchid-drawer-header-content matchid-flex`, children: [
|
|
1095
|
+
onBack && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(ArrowLeftIcon, { height: 25, width: 24, className: "matchid-drawer-header-back", onClick: onBack }),
|
|
1084
1096
|
title
|
|
1085
1097
|
] }),
|
|
1086
|
-
showClose && /* @__PURE__ */ (0,
|
|
1098
|
+
showClose && /* @__PURE__ */ (0, import_jsx_runtime74.jsx)(CloseRoundIcon, { className: "matchid-drawer-header-close", onClick: onClose })
|
|
1087
1099
|
] }),
|
|
1088
1100
|
children
|
|
1089
1101
|
] }) });
|
|
@@ -1093,7 +1105,7 @@ function Drawer({
|
|
|
1093
1105
|
var import_react13 = require("react");
|
|
1094
1106
|
|
|
1095
1107
|
// src/ui/ModalDrawer/index.tsx
|
|
1096
|
-
var
|
|
1108
|
+
var import_jsx_runtime75 = require("react/jsx-runtime");
|
|
1097
1109
|
function ModalDrawer({
|
|
1098
1110
|
title,
|
|
1099
1111
|
drawerTitleVisible = true,
|
|
@@ -1101,9 +1113,9 @@ function ModalDrawer({
|
|
|
1101
1113
|
}) {
|
|
1102
1114
|
const isDownMd = useDownMd();
|
|
1103
1115
|
if (isDownMd) {
|
|
1104
|
-
return /* @__PURE__ */ (0,
|
|
1116
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(ModalWithHeader, { ...props, title });
|
|
1105
1117
|
}
|
|
1106
|
-
return /* @__PURE__ */ (0,
|
|
1118
|
+
return /* @__PURE__ */ (0, import_jsx_runtime75.jsx)(Drawer, { ...props, title: drawerTitleVisible ? title : null });
|
|
1107
1119
|
}
|
|
1108
1120
|
|
|
1109
1121
|
// src/assets/lottie/confirm.json
|
|
@@ -1159,7 +1171,7 @@ function useHash({
|
|
|
1159
1171
|
}
|
|
1160
1172
|
|
|
1161
1173
|
// src/ui/HashPanel/index.tsx
|
|
1162
|
-
var
|
|
1174
|
+
var import_jsx_runtime76 = require("react/jsx-runtime");
|
|
1163
1175
|
function HashPanel({
|
|
1164
1176
|
hash,
|
|
1165
1177
|
chain,
|
|
@@ -1219,14 +1231,14 @@ function HashPanel({
|
|
|
1219
1231
|
}
|
|
1220
1232
|
}, [hashQuery.data]);
|
|
1221
1233
|
const link = chain ? `${chain?.blockExplorers?.default.url}/tx/${hash}` : "";
|
|
1222
|
-
return /* @__PURE__ */ (0,
|
|
1234
|
+
return /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
1223
1235
|
ModalDrawer,
|
|
1224
1236
|
{
|
|
1225
1237
|
isOpen,
|
|
1226
1238
|
showClose: true,
|
|
1227
1239
|
onClose,
|
|
1228
1240
|
zIndex,
|
|
1229
|
-
title: /* @__PURE__ */ (0,
|
|
1241
|
+
title: /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(
|
|
1230
1242
|
"div",
|
|
1231
1243
|
{
|
|
1232
1244
|
className: "matchid-hashpanel-header",
|
|
@@ -1236,36 +1248,36 @@ function HashPanel({
|
|
|
1236
1248
|
children: statusValue.text
|
|
1237
1249
|
}
|
|
1238
1250
|
),
|
|
1239
|
-
children: /* @__PURE__ */ (0,
|
|
1240
|
-
/* @__PURE__ */ (0,
|
|
1241
|
-
/* @__PURE__ */ (0,
|
|
1251
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "matchid-hashpanel-box", children: [
|
|
1252
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "matchid-hashpanel-content", children: [
|
|
1253
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: `matchid-hashpanel-status`, style: {
|
|
1242
1254
|
color: statusValue.color
|
|
1243
1255
|
}, children: statusValue.text }),
|
|
1244
|
-
statusValue.lottie && /* @__PURE__ */ (0,
|
|
1256
|
+
statusValue.lottie && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Lottie_default, { animationData: statusValue.lottie, style: {
|
|
1245
1257
|
width: "96px",
|
|
1246
1258
|
height: "96px"
|
|
1247
1259
|
} }),
|
|
1248
|
-
hash && /* @__PURE__ */ (0,
|
|
1260
|
+
hash && /* @__PURE__ */ (0, import_jsx_runtime76.jsxs)("div", { className: "matchid-hashpanel-hash", children: [
|
|
1249
1261
|
"Hash:",
|
|
1250
|
-
/* @__PURE__ */ (0,
|
|
1262
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)("a", { href: link, target: "_blank", children: hash })
|
|
1251
1263
|
] }),
|
|
1252
|
-
error && /* @__PURE__ */ (0,
|
|
1264
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)("div", { className: "matchid-hashpanel-text", children: error })
|
|
1253
1265
|
] }),
|
|
1254
|
-
/* @__PURE__ */ (0,
|
|
1266
|
+
/* @__PURE__ */ (0, import_jsx_runtime76.jsx)(Button, { onClick: onClose, size: "lg", block: true, children: "Back" })
|
|
1255
1267
|
] })
|
|
1256
1268
|
}
|
|
1257
1269
|
);
|
|
1258
1270
|
}
|
|
1259
1271
|
function HashPanel_default(props) {
|
|
1260
|
-
return props.isOpen && /* @__PURE__ */ (0,
|
|
1272
|
+
return props.isOpen && /* @__PURE__ */ (0, import_jsx_runtime76.jsx)(HashPanel, { ...props });
|
|
1261
1273
|
}
|
|
1262
1274
|
|
|
1263
1275
|
// src/ui/Switch/index.tsx
|
|
1264
|
-
var
|
|
1276
|
+
var import_jsx_runtime77 = require("react/jsx-runtime");
|
|
1265
1277
|
|
|
1266
1278
|
// src/ui/AlphaAvatar/index.tsx
|
|
1267
1279
|
var import_react14 = require("react");
|
|
1268
|
-
var
|
|
1280
|
+
var import_jsx_runtime78 = require("react/jsx-runtime");
|
|
1269
1281
|
function AlphaAvatar({
|
|
1270
1282
|
name,
|
|
1271
1283
|
size = "default",
|
|
@@ -1282,7 +1294,7 @@ function AlphaAvatar({
|
|
|
1282
1294
|
return "";
|
|
1283
1295
|
}, [name]);
|
|
1284
1296
|
const numberSize = typeof size === "number" ? size : size === "sm" ? 24 : size === "default" ? 40 : 64;
|
|
1285
|
-
return /* @__PURE__ */ (0,
|
|
1297
|
+
return /* @__PURE__ */ (0, import_jsx_runtime78.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
1286
1298
|
width: numberSize,
|
|
1287
1299
|
height: numberSize,
|
|
1288
1300
|
fontSize: Math.ceil(numberSize / 2),
|
|
@@ -1291,7 +1303,7 @@ function AlphaAvatar({
|
|
|
1291
1303
|
}
|
|
1292
1304
|
|
|
1293
1305
|
// src/ui/Radio/index.tsx
|
|
1294
|
-
var
|
|
1306
|
+
var import_jsx_runtime79 = require("react/jsx-runtime");
|
|
1295
1307
|
function Radio({
|
|
1296
1308
|
checked = false,
|
|
1297
1309
|
onChange,
|
|
@@ -1300,23 +1312,23 @@ function Radio({
|
|
|
1300
1312
|
className = "",
|
|
1301
1313
|
style = {}
|
|
1302
1314
|
}) {
|
|
1303
|
-
return /* @__PURE__ */ (0,
|
|
1315
|
+
return /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { onClick: onChange, className: `matchid-radio ${className} ${checked ? "matchid-radio-checked" : ""}`, style: {
|
|
1304
1316
|
width: size,
|
|
1305
1317
|
height: size,
|
|
1306
1318
|
...style,
|
|
1307
1319
|
// @ts-ignore
|
|
1308
1320
|
"--matchid-radio-checked": color
|
|
1309
|
-
}, children: checked && /* @__PURE__ */ (0,
|
|
1321
|
+
}, children: checked && /* @__PURE__ */ (0, import_jsx_runtime79.jsx)("div", { className: `matchid-radio-content`, style: {
|
|
1310
1322
|
width: Math.floor(size * 0.7),
|
|
1311
1323
|
height: Math.floor(size * 0.7)
|
|
1312
1324
|
} }) });
|
|
1313
1325
|
}
|
|
1314
1326
|
|
|
1315
1327
|
// src/ui/Skeleton/index.tsx
|
|
1316
|
-
var
|
|
1328
|
+
var import_jsx_runtime80 = require("react/jsx-runtime");
|
|
1317
1329
|
|
|
1318
1330
|
// src/ui/Tabs/index.tsx
|
|
1319
|
-
var
|
|
1331
|
+
var import_jsx_runtime81 = require("react/jsx-runtime");
|
|
1320
1332
|
|
|
1321
1333
|
// src/ui/Lottie/index.tsx
|
|
1322
1334
|
var import_lottie_react = require("lottie-react");
|
|
@@ -1332,7 +1344,7 @@ var LazyLottie = (props) => {
|
|
|
1332
1344
|
var Lottie_default = LazyLottie;
|
|
1333
1345
|
|
|
1334
1346
|
// src/ui/Checkbox/index.tsx
|
|
1335
|
-
var
|
|
1347
|
+
var import_jsx_runtime82 = require("react/jsx-runtime");
|
|
1336
1348
|
|
|
1337
1349
|
// src/components/EVMModal/index.tsx
|
|
1338
1350
|
var import_react17 = require("react");
|
|
@@ -1370,7 +1382,7 @@ var import_react_intl10 = require("react-intl");
|
|
|
1370
1382
|
|
|
1371
1383
|
// src/components/WalletModalContent/index.tsx
|
|
1372
1384
|
var import_react15 = require("react");
|
|
1373
|
-
var
|
|
1385
|
+
var import_jsx_runtime83 = require("react/jsx-runtime");
|
|
1374
1386
|
|
|
1375
1387
|
// src/components/EVMModal/index.tsx
|
|
1376
1388
|
var import_rainbowkit = require("@rainbow-me/rainbowkit");
|
|
@@ -1387,7 +1399,7 @@ var import_ethers = require("ethers");
|
|
|
1387
1399
|
// src/components/EVMModal/index.tsx
|
|
1388
1400
|
var import_siwe = require("siwe");
|
|
1389
1401
|
var import_styles = require("@rainbow-me/rainbowkit/styles.css");
|
|
1390
|
-
var
|
|
1402
|
+
var import_jsx_runtime84 = require("react/jsx-runtime");
|
|
1391
1403
|
|
|
1392
1404
|
// src/components/TRONModal/index.tsx
|
|
1393
1405
|
var import_react19 = __toESM(require("react"));
|
|
@@ -1397,13 +1409,13 @@ var import_react_intl11 = require("react-intl");
|
|
|
1397
1409
|
var import_react18 = require("react");
|
|
1398
1410
|
|
|
1399
1411
|
// src/components/TRONModal/index.tsx
|
|
1400
|
-
var
|
|
1412
|
+
var import_jsx_runtime85 = require("react/jsx-runtime");
|
|
1401
1413
|
|
|
1402
1414
|
// src/components/TONModal/index.tsx
|
|
1403
1415
|
var import_react20 = __toESM(require("react"));
|
|
1404
1416
|
var import_react_intl12 = require("react-intl");
|
|
1405
1417
|
var import_ui_react = require("@tonconnect/ui-react");
|
|
1406
|
-
var
|
|
1418
|
+
var import_jsx_runtime86 = require("react/jsx-runtime");
|
|
1407
1419
|
|
|
1408
1420
|
// src/components/BTCModal/index.tsx
|
|
1409
1421
|
var import_react22 = __toESM(require("react"));
|
|
@@ -1416,16 +1428,16 @@ var import_sats_connect = require("sats-connect");
|
|
|
1416
1428
|
var import_react21 = require("react");
|
|
1417
1429
|
|
|
1418
1430
|
// src/components/BTCModal/index.tsx
|
|
1419
|
-
var
|
|
1431
|
+
var import_jsx_runtime87 = require("react/jsx-runtime");
|
|
1420
1432
|
|
|
1421
1433
|
// src/components/WalletModal/index.tsx
|
|
1422
1434
|
var import_react23 = require("react");
|
|
1423
1435
|
var import_react_intl14 = require("react-intl");
|
|
1424
|
-
var
|
|
1436
|
+
var import_jsx_runtime88 = require("react/jsx-runtime");
|
|
1425
1437
|
|
|
1426
1438
|
// src/components/AlphaAvatar/index.tsx
|
|
1427
1439
|
var import_react24 = require("react");
|
|
1428
|
-
var
|
|
1440
|
+
var import_jsx_runtime89 = require("react/jsx-runtime");
|
|
1429
1441
|
function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
1430
1442
|
const [avatar, setAvatar] = (0, import_react24.useState)(void 0);
|
|
1431
1443
|
(0, import_react24.useEffect)(() => {
|
|
@@ -1434,7 +1446,7 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
|
1434
1446
|
setAvatar(char);
|
|
1435
1447
|
}
|
|
1436
1448
|
}, [name]);
|
|
1437
|
-
return /* @__PURE__ */ (0,
|
|
1449
|
+
return /* @__PURE__ */ (0, import_jsx_runtime89.jsx)("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
1438
1450
|
width: size,
|
|
1439
1451
|
height: size,
|
|
1440
1452
|
fontSize: Math.ceil(size / 2)
|
|
@@ -1442,13 +1454,13 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
|
1442
1454
|
}
|
|
1443
1455
|
|
|
1444
1456
|
// src/components/WalletAsset/index.tsx
|
|
1445
|
-
var
|
|
1457
|
+
var import_jsx_runtime90 = require("react/jsx-runtime");
|
|
1446
1458
|
|
|
1447
1459
|
// src/components/TokenSend/index.tsx
|
|
1448
1460
|
var import_react25 = require("react");
|
|
1449
1461
|
var import_viem2 = require("viem");
|
|
1450
1462
|
var import_react_intl15 = require("react-intl");
|
|
1451
|
-
var
|
|
1463
|
+
var import_jsx_runtime91 = require("react/jsx-runtime");
|
|
1452
1464
|
function Input2({
|
|
1453
1465
|
onChange,
|
|
1454
1466
|
placeholder,
|
|
@@ -1458,8 +1470,8 @@ function Input2({
|
|
|
1458
1470
|
error,
|
|
1459
1471
|
size = "df"
|
|
1460
1472
|
}) {
|
|
1461
|
-
return /* @__PURE__ */ (0,
|
|
1462
|
-
/* @__PURE__ */ (0,
|
|
1473
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-token-input-box ${"matchid-token-input-" + size}`, children: [
|
|
1474
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
1463
1475
|
"input",
|
|
1464
1476
|
{
|
|
1465
1477
|
placeholder,
|
|
@@ -1470,7 +1482,7 @@ function Input2({
|
|
|
1470
1482
|
className: `matchid-token-input ${error ? "matchid-token-input-error" : ""}`
|
|
1471
1483
|
}
|
|
1472
1484
|
),
|
|
1473
|
-
error && /* @__PURE__ */ (0,
|
|
1485
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: "matchid-token-input-error-text", children: error })
|
|
1474
1486
|
] });
|
|
1475
1487
|
}
|
|
1476
1488
|
function TokenSend({
|
|
@@ -1598,24 +1610,24 @@ function TokenSend({
|
|
|
1598
1610
|
window.removeEventListener("message", receiveMessage);
|
|
1599
1611
|
};
|
|
1600
1612
|
}, []);
|
|
1601
|
-
return /* @__PURE__ */ (0,
|
|
1602
|
-
/* @__PURE__ */ (0,
|
|
1603
|
-
/* @__PURE__ */ (0,
|
|
1604
|
-
/* @__PURE__ */ (0,
|
|
1605
|
-
/* @__PURE__ */ (0,
|
|
1606
|
-
/* @__PURE__ */ (0,
|
|
1607
|
-
token.icon ? /* @__PURE__ */ (0,
|
|
1613
|
+
return /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react_intl15.FormattedMessage, { id: "send" }), onBack, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-token-send-box`, children: [
|
|
1614
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
1615
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-token-amount-content`, children: [
|
|
1616
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-token-amount-header`, children: [
|
|
1617
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react_intl15.FormattedMessage, { id: "amount" }) }),
|
|
1618
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-token-amount-chain`, children: [
|
|
1619
|
+
token.icon ? /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
1608
1620
|
"img",
|
|
1609
1621
|
{
|
|
1610
1622
|
src: token?.icon,
|
|
1611
1623
|
alt: token?.symbol,
|
|
1612
1624
|
className: `matchid-token-amount-chain-icon`
|
|
1613
1625
|
}
|
|
1614
|
-
) : /* @__PURE__ */ (0,
|
|
1615
|
-
/* @__PURE__ */ (0,
|
|
1626
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(AlphaAvatar, { name: token.symbol || token.name || "", size: 16 }),
|
|
1627
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("span", { children: token?.symbol })
|
|
1616
1628
|
] })
|
|
1617
1629
|
] }),
|
|
1618
|
-
/* @__PURE__ */ (0,
|
|
1630
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
1619
1631
|
Input2,
|
|
1620
1632
|
{
|
|
1621
1633
|
type: "text",
|
|
@@ -1628,18 +1640,18 @@ function TokenSend({
|
|
|
1628
1640
|
error: error.amount || txError
|
|
1629
1641
|
}
|
|
1630
1642
|
),
|
|
1631
|
-
/* @__PURE__ */ (0,
|
|
1632
|
-
/* @__PURE__ */ (0,
|
|
1633
|
-
/* @__PURE__ */ (0,
|
|
1643
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-token-amount-footer`, children: [
|
|
1644
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-token-amount-title`, children: [
|
|
1645
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react_intl15.FormattedMessage, { id: "balance" }),
|
|
1634
1646
|
":"
|
|
1635
1647
|
] }),
|
|
1636
|
-
/* @__PURE__ */ (0,
|
|
1648
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
|
|
1637
1649
|
] }),
|
|
1638
|
-
/* @__PURE__ */ (0,
|
|
1650
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(TransferIcon, { className: "matchid-token-amount-transfer" })
|
|
1639
1651
|
] }),
|
|
1640
|
-
/* @__PURE__ */ (0,
|
|
1641
|
-
/* @__PURE__ */ (0,
|
|
1642
|
-
/* @__PURE__ */ (0,
|
|
1652
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsxs)("div", { className: `matchid-token-address-content`, children: [
|
|
1653
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react_intl15.FormattedMessage, { id: "receiveTitle" }) }) }),
|
|
1654
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
1643
1655
|
Input2,
|
|
1644
1656
|
{
|
|
1645
1657
|
type: "text",
|
|
@@ -1655,7 +1667,7 @@ function TokenSend({
|
|
|
1655
1667
|
)
|
|
1656
1668
|
] })
|
|
1657
1669
|
] }),
|
|
1658
|
-
/* @__PURE__ */ (0,
|
|
1670
|
+
/* @__PURE__ */ (0, import_jsx_runtime91.jsx)(
|
|
1659
1671
|
Button,
|
|
1660
1672
|
{
|
|
1661
1673
|
size: "lg",
|
|
@@ -1664,7 +1676,7 @@ function TokenSend({
|
|
|
1664
1676
|
disabled: !canSend || !!txError,
|
|
1665
1677
|
onClick: onNext,
|
|
1666
1678
|
loading: loading || sending,
|
|
1667
|
-
children: /* @__PURE__ */ (0,
|
|
1679
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime91.jsx)(import_react_intl15.FormattedMessage, { id: "next" })
|
|
1668
1680
|
}
|
|
1669
1681
|
)
|
|
1670
1682
|
] }) });
|
|
@@ -1672,12 +1684,12 @@ function TokenSend({
|
|
|
1672
1684
|
|
|
1673
1685
|
// src/components/TokenDetail/index.tsx
|
|
1674
1686
|
var import_react_intl16 = require("react-intl");
|
|
1675
|
-
var
|
|
1687
|
+
var import_jsx_runtime92 = require("react/jsx-runtime");
|
|
1676
1688
|
|
|
1677
1689
|
// src/components/TokenSendList/index.tsx
|
|
1678
1690
|
var import_react26 = require("react");
|
|
1679
1691
|
var import_react_intl17 = require("react-intl");
|
|
1680
|
-
var
|
|
1692
|
+
var import_jsx_runtime93 = require("react/jsx-runtime");
|
|
1681
1693
|
function TokenSendList({ close }) {
|
|
1682
1694
|
const isDownMd = useDownMd();
|
|
1683
1695
|
const walletAssets = useMatchWalletAssets();
|
|
@@ -1689,16 +1701,16 @@ function TokenSendList({ close }) {
|
|
|
1689
1701
|
const modal = useModal();
|
|
1690
1702
|
const onNext = () => {
|
|
1691
1703
|
checked && modal.show((props) => {
|
|
1692
|
-
return /* @__PURE__ */ (0,
|
|
1704
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(TokenSend, { onClose: () => {
|
|
1693
1705
|
props.close();
|
|
1694
1706
|
close();
|
|
1695
1707
|
}, onBack: props.close, zIndex: props.zIndex, token: checked });
|
|
1696
1708
|
});
|
|
1697
1709
|
};
|
|
1698
|
-
return /* @__PURE__ */ (0,
|
|
1699
|
-
/* @__PURE__ */ (0,
|
|
1710
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "matchid-token-send-list-box", children: [
|
|
1711
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: "matchid-token-send-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
1700
1712
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
1701
|
-
return /* @__PURE__ */ (0,
|
|
1713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime93.jsxs)(
|
|
1702
1714
|
"div",
|
|
1703
1715
|
{
|
|
1704
1716
|
className: `matchid-token-send-item ${checked?.address == n.address ? "matchid-token-send-chekced" : ""}`,
|
|
@@ -1706,10 +1718,10 @@ function TokenSendList({ close }) {
|
|
|
1706
1718
|
setChecked(n);
|
|
1707
1719
|
},
|
|
1708
1720
|
children: [
|
|
1709
|
-
/* @__PURE__ */ (0,
|
|
1710
|
-
/* @__PURE__ */ (0,
|
|
1711
|
-
/* @__PURE__ */ (0,
|
|
1712
|
-
n.icon ? /* @__PURE__ */ (0,
|
|
1721
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Radio, { checked: checked?.address == n.address, size: isDownMd ? 18 : 24 }),
|
|
1722
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "matchid-token-send-content", children: [
|
|
1723
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: "matchid-token-send-logo", children: [
|
|
1724
|
+
n.icon ? /* @__PURE__ */ (0, import_jsx_runtime93.jsx)("img", { src: n.icon, alt: n.symbol, className: `matchid-token-send-icon` }) : /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
1713
1725
|
AlphaAvatar2,
|
|
1714
1726
|
{
|
|
1715
1727
|
className: `matchid-token-send-icon`,
|
|
@@ -1717,7 +1729,7 @@ function TokenSendList({ close }) {
|
|
|
1717
1729
|
name: n.symbol || n.name || ""
|
|
1718
1730
|
}
|
|
1719
1731
|
),
|
|
1720
|
-
chain?.iconUrl && /* @__PURE__ */ (0,
|
|
1732
|
+
chain?.iconUrl && /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(
|
|
1721
1733
|
"img",
|
|
1722
1734
|
{
|
|
1723
1735
|
src: chain.iconUrl,
|
|
@@ -1726,9 +1738,9 @@ function TokenSendList({ close }) {
|
|
|
1726
1738
|
}
|
|
1727
1739
|
)
|
|
1728
1740
|
] }),
|
|
1729
|
-
/* @__PURE__ */ (0,
|
|
1730
|
-
/* @__PURE__ */ (0,
|
|
1731
|
-
/* @__PURE__ */ (0,
|
|
1741
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsxs)("div", { className: `matchid-token-send-info`, children: [
|
|
1742
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: `matchid-token-send-name`, children: n.symbol }),
|
|
1743
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)("div", { className: `matchid-token-send-balance`, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(NumberFormatter, { value: n.balance, tFixNum: 3 }) })
|
|
1732
1744
|
] })
|
|
1733
1745
|
] })
|
|
1734
1746
|
]
|
|
@@ -1736,7 +1748,7 @@ function TokenSendList({ close }) {
|
|
|
1736
1748
|
index
|
|
1737
1749
|
);
|
|
1738
1750
|
}) }),
|
|
1739
|
-
/* @__PURE__ */ (0,
|
|
1751
|
+
/* @__PURE__ */ (0, import_jsx_runtime93.jsx)(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ (0, import_jsx_runtime93.jsx)(import_react_intl17.FormattedMessage, { id: "next" }) })
|
|
1740
1752
|
] });
|
|
1741
1753
|
}
|
|
1742
1754
|
|
|
@@ -1804,12 +1816,12 @@ var useContractStore_default = useContractStore;
|
|
|
1804
1816
|
|
|
1805
1817
|
// src/components/TransactionList/index.tsx
|
|
1806
1818
|
var import_react_intl18 = require("react-intl");
|
|
1807
|
-
var
|
|
1819
|
+
var import_jsx_runtime94 = require("react/jsx-runtime");
|
|
1808
1820
|
|
|
1809
1821
|
// src/components/CEXBindModal/index.tsx
|
|
1810
1822
|
var import_react28 = require("react");
|
|
1811
1823
|
var import_react_intl19 = require("react-intl");
|
|
1812
|
-
var
|
|
1824
|
+
var import_jsx_runtime95 = require("react/jsx-runtime");
|
|
1813
1825
|
|
|
1814
1826
|
// src/context/BusinessProvider.tsx
|
|
1815
1827
|
var import_react_query3 = require("@tanstack/react-query");
|
|
@@ -1826,13 +1838,16 @@ var useStore = (0, import_zustand4.create)((set) => ({
|
|
|
1826
1838
|
}));
|
|
1827
1839
|
var useStore_default = useStore;
|
|
1828
1840
|
|
|
1841
|
+
// src/components/BindEmailModal/index.tsx
|
|
1842
|
+
var import_jsx_runtime96 = require("react/jsx-runtime");
|
|
1843
|
+
|
|
1829
1844
|
// src/context/BusinessProvider.tsx
|
|
1830
|
-
var
|
|
1845
|
+
var import_jsx_runtime97 = require("react/jsx-runtime");
|
|
1831
1846
|
|
|
1832
1847
|
// src/context/ModalContext.tsx
|
|
1833
1848
|
var import_react29 = require("react");
|
|
1834
1849
|
var import_react_dom = require("react-dom");
|
|
1835
|
-
var
|
|
1850
|
+
var import_jsx_runtime98 = require("react/jsx-runtime");
|
|
1836
1851
|
var ModalContext = (0, import_react29.createContext)(null);
|
|
1837
1852
|
function useModal() {
|
|
1838
1853
|
const context = (0, import_react29.useContext)(ModalContext);
|
|
@@ -1845,7 +1860,7 @@ function useModal() {
|
|
|
1845
1860
|
// src/context/ToastContext.tsx
|
|
1846
1861
|
var import_react30 = require("react");
|
|
1847
1862
|
var import_react_dom2 = require("react-dom");
|
|
1848
|
-
var
|
|
1863
|
+
var import_jsx_runtime99 = require("react/jsx-runtime");
|
|
1849
1864
|
var ToastContext = (0, import_react30.createContext)(null);
|
|
1850
1865
|
function useToast() {
|
|
1851
1866
|
const context = (0, import_react30.useContext)(ToastContext);
|
|
@@ -1856,7 +1871,7 @@ function useToast() {
|
|
|
1856
1871
|
}
|
|
1857
1872
|
|
|
1858
1873
|
// src/context/index.tsx
|
|
1859
|
-
var
|
|
1874
|
+
var import_jsx_runtime100 = require("react/jsx-runtime");
|
|
1860
1875
|
|
|
1861
1876
|
// src/hooks/useWalletInit.ts
|
|
1862
1877
|
var import_react31 = require("react");
|
|
@@ -1936,7 +1951,7 @@ var matchTest = /* @__PURE__ */ (0, import_viem6.defineChain)({
|
|
|
1936
1951
|
|
|
1937
1952
|
// src/MatchContext.tsx
|
|
1938
1953
|
var import_wagmi3 = require("wagmi");
|
|
1939
|
-
var
|
|
1954
|
+
var import_jsx_runtime101 = require("react/jsx-runtime");
|
|
1940
1955
|
var queryClient = new import_react_query4.QueryClient();
|
|
1941
1956
|
var wagmiConfig = (0, import_rainbowkit2.getDefaultConfig)({
|
|
1942
1957
|
appName: "MatchID",
|
|
@@ -1988,6 +2003,7 @@ function useUserInfo() {
|
|
|
1988
2003
|
const { open: BTCOpen } = useBTCModalStore();
|
|
1989
2004
|
const { open: CEXBindOpen } = useCEXBindModalStore();
|
|
1990
2005
|
const walletModalStore = useWalletModalStore();
|
|
2006
|
+
const emailModalStore = useEmailModalStore();
|
|
1991
2007
|
const getRedirectUri = () => {
|
|
1992
2008
|
return encodeURIComponent(window.location.href);
|
|
1993
2009
|
};
|
|
@@ -2081,6 +2097,7 @@ function useUserInfo() {
|
|
|
2081
2097
|
case "github":
|
|
2082
2098
|
case "linkedin":
|
|
2083
2099
|
case "facebook":
|
|
2100
|
+
case "kakao":
|
|
2084
2101
|
return await loginByMethod(method);
|
|
2085
2102
|
default:
|
|
2086
2103
|
throw new Error("unsupported method");
|
|
@@ -2165,6 +2182,8 @@ function useUserInfo() {
|
|
|
2165
2182
|
return TONOpen("bind");
|
|
2166
2183
|
case "btc":
|
|
2167
2184
|
return BTCOpen("bind");
|
|
2185
|
+
case "email":
|
|
2186
|
+
return emailModalStore.open("bind");
|
|
2168
2187
|
case "telegram":
|
|
2169
2188
|
return await bindTelegram();
|
|
2170
2189
|
case "twitter":
|
|
@@ -2174,6 +2193,7 @@ function useUserInfo() {
|
|
|
2174
2193
|
case "linkedin":
|
|
2175
2194
|
case "facebook":
|
|
2176
2195
|
case "youtube":
|
|
2196
|
+
case "kakao":
|
|
2177
2197
|
const link = `${endpoints.back}api/v1/auth/${method == "youtube" ? "google" : method}?appid=${appid}&provider=${method == "youtube" ? "google" : method}&redirect=${encodeURIComponent(endpoints.auth + "bind/" + method)}&authorization=${token.includes("Bearer ") ? token.split(" ")[1] : token}${method == "youtube" ? "&auth_type=youtube" : ""}`;
|
|
2178
2198
|
matchlog_default.log("link", link);
|
|
2179
2199
|
return window.open(
|
|
@@ -2188,6 +2208,31 @@ function useUserInfo() {
|
|
|
2188
2208
|
const bindCex = (type) => {
|
|
2189
2209
|
return CEXBindOpen(type);
|
|
2190
2210
|
};
|
|
2211
|
+
const bindByEmail = async ({ email, code }) => {
|
|
2212
|
+
try {
|
|
2213
|
+
const obj = {
|
|
2214
|
+
email,
|
|
2215
|
+
verification_key: emailLoginKey,
|
|
2216
|
+
verification_code: code
|
|
2217
|
+
};
|
|
2218
|
+
const res = await verifyEmailCodeApi(obj);
|
|
2219
|
+
if (res && res.data && isSuccess(res)) {
|
|
2220
|
+
events.onBind && events.onBind({
|
|
2221
|
+
type: "email"
|
|
2222
|
+
});
|
|
2223
|
+
eventManager_default.emit("onBind", {
|
|
2224
|
+
type: "email"
|
|
2225
|
+
});
|
|
2226
|
+
return true;
|
|
2227
|
+
} else {
|
|
2228
|
+
throw new Error(res.message);
|
|
2229
|
+
}
|
|
2230
|
+
} catch (error) {
|
|
2231
|
+
console.error("bindByEmail", error);
|
|
2232
|
+
throw error;
|
|
2233
|
+
}
|
|
2234
|
+
return false;
|
|
2235
|
+
};
|
|
2191
2236
|
const getAuthInfo = async (method) => {
|
|
2192
2237
|
const element_id = "auth_iframe";
|
|
2193
2238
|
if (document.getElementById(element_id)) {
|
|
@@ -2256,6 +2301,7 @@ function useUserInfo() {
|
|
|
2256
2301
|
auth,
|
|
2257
2302
|
login: loginMethod,
|
|
2258
2303
|
bind,
|
|
2304
|
+
bindByEmail,
|
|
2259
2305
|
getAuthInfo,
|
|
2260
2306
|
invite
|
|
2261
2307
|
};
|
|
@@ -2318,7 +2364,7 @@ var useTransactionStore = (0, import_zustand5.create)((0, import_middleware3.dev
|
|
|
2318
2364
|
var useTransactionStore_default = useTransactionStore;
|
|
2319
2365
|
|
|
2320
2366
|
// src/hooks/useWallet.tsx
|
|
2321
|
-
var
|
|
2367
|
+
var import_jsx_runtime102 = require("react/jsx-runtime");
|
|
2322
2368
|
var AppClientId2 = "react-sdk-" + getVersion();
|
|
2323
2369
|
function useWallet() {
|
|
2324
2370
|
const { address, wallet: walletConfig } = useLocalStore_default();
|
|
@@ -2492,12 +2538,12 @@ function useWallet() {
|
|
|
2492
2538
|
address: evmAccount.address
|
|
2493
2539
|
});
|
|
2494
2540
|
modal.show((props) => {
|
|
2495
|
-
return /* @__PURE__ */ (0,
|
|
2541
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, hash: txHash, chain: _chain });
|
|
2496
2542
|
});
|
|
2497
2543
|
return txHash;
|
|
2498
2544
|
} catch (error) {
|
|
2499
2545
|
modal.show((props) => {
|
|
2500
|
-
return /* @__PURE__ */ (0,
|
|
2546
|
+
return /* @__PURE__ */ (0, import_jsx_runtime102.jsx)(HashPanel_default, { isOpen: true, onClose: props.close, zIndex: props.zIndex, error: typeof error == "string" ? error : error.details || error.message, chain: _chain });
|
|
2501
2547
|
});
|
|
2502
2548
|
throw error;
|
|
2503
2549
|
}
|
|
@@ -2631,7 +2677,7 @@ function useImportTokenListQuery({
|
|
|
2631
2677
|
var import_react38 = require("react");
|
|
2632
2678
|
var import_viem10 = require("viem");
|
|
2633
2679
|
var import_react_intl21 = require("react-intl");
|
|
2634
|
-
var
|
|
2680
|
+
var import_jsx_runtime103 = require("react/jsx-runtime");
|
|
2635
2681
|
function useMatchChain() {
|
|
2636
2682
|
const chainListQuery = useChainListQuery();
|
|
2637
2683
|
const modal = useModal();
|
|
@@ -2662,28 +2708,28 @@ function useMatchChain() {
|
|
|
2662
2708
|
const { chainId: storeChainId2, setChainId: setChainId2 } = useLocalStore_default();
|
|
2663
2709
|
const [selectedChainId, setSelectedChainId] = (0, import_react38.useState)(storeChainId2);
|
|
2664
2710
|
const isDownMd = useDownMd();
|
|
2665
|
-
return /* @__PURE__ */ (0,
|
|
2666
|
-
/* @__PURE__ */ (0,
|
|
2667
|
-
return /* @__PURE__ */ (0,
|
|
2711
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: `matchid-change-network-box`, children: [
|
|
2712
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("div", { className: `matchid-change-network-list`, children: chainListQuery.data?.map((item, index) => {
|
|
2713
|
+
return /* @__PURE__ */ (0, import_jsx_runtime103.jsxs)(
|
|
2668
2714
|
"div",
|
|
2669
2715
|
{
|
|
2670
2716
|
onClick: () => setSelectedChainId(item.id),
|
|
2671
2717
|
className: `matchid-change-network-item ${selectedChainId == item.id ? "matchid-change-network-selected" : ""}`,
|
|
2672
2718
|
children: [
|
|
2673
|
-
/* @__PURE__ */ (0,
|
|
2674
|
-
/* @__PURE__ */ (0,
|
|
2675
|
-
/* @__PURE__ */ (0,
|
|
2719
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsxs)("div", { className: `matchid-change-network-item-content`, children: [
|
|
2720
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("img", { src: item.iconUrl, className: `matchid-change-network-item-icon` }),
|
|
2721
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)("span", { className: "matchid-change-network-item-name", children: item.name })
|
|
2676
2722
|
] }),
|
|
2677
|
-
/* @__PURE__ */ (0,
|
|
2723
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Radio, { checked: selectedChainId === item.id, size: isDownMd ? 18 : 24 })
|
|
2678
2724
|
]
|
|
2679
2725
|
},
|
|
2680
2726
|
index
|
|
2681
2727
|
);
|
|
2682
2728
|
}) }),
|
|
2683
|
-
/* @__PURE__ */ (0,
|
|
2729
|
+
/* @__PURE__ */ (0, import_jsx_runtime103.jsx)(Button, { size: "lg", highlight: true, onClick: () => {
|
|
2684
2730
|
setChainId2(selectedChainId || 0);
|
|
2685
2731
|
close();
|
|
2686
|
-
}, block: true, children: /* @__PURE__ */ (0,
|
|
2732
|
+
}, block: true, children: /* @__PURE__ */ (0, import_jsx_runtime103.jsx)(import_react_intl21.FormattedMessage, { id: "confirm" }) })
|
|
2687
2733
|
] });
|
|
2688
2734
|
}
|
|
2689
2735
|
const showChangeNetwork = () => {
|
|
@@ -2756,7 +2802,7 @@ function useIsContract({
|
|
|
2756
2802
|
}
|
|
2757
2803
|
|
|
2758
2804
|
// src/components/ImportToken/index.tsx
|
|
2759
|
-
var
|
|
2805
|
+
var import_jsx_runtime104 = require("react/jsx-runtime");
|
|
2760
2806
|
function ImportToken({ close }) {
|
|
2761
2807
|
const [status, setStatus] = (0, import_react39.useState)("");
|
|
2762
2808
|
const { token } = useUserInfo();
|
|
@@ -2867,22 +2913,22 @@ function ImportToken({ close }) {
|
|
|
2867
2913
|
enabled: canImport
|
|
2868
2914
|
});
|
|
2869
2915
|
if (status == "success" || status == "fail") {
|
|
2870
|
-
return /* @__PURE__ */ (0,
|
|
2871
|
-
/* @__PURE__ */ (0,
|
|
2872
|
-
/* @__PURE__ */ (0,
|
|
2916
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: `matchid-import-token-result matchid-flex`, children: [
|
|
2917
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: `matchid-import-token-result-box matchid-flex`, children: [
|
|
2918
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: `matchid-import-token-result-img`, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Lottie_default, { animationData: status == "success" ? success_default : fail_default, style: {
|
|
2873
2919
|
width: "96px",
|
|
2874
2920
|
height: "96px"
|
|
2875
2921
|
} }) }),
|
|
2876
|
-
/* @__PURE__ */ (0,
|
|
2922
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)("div", { className: `matchid-import-token-result-text matchid-import-token-result-text-${status}`, children: status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react_intl22.FormattedMessage, { id: "importSuccess" }) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react_intl22.FormattedMessage, { id: "importFail" }) })
|
|
2877
2923
|
] }),
|
|
2878
|
-
status == "success" ? /* @__PURE__ */ (0,
|
|
2924
|
+
status == "success" ? /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Button, { size: "lg", onClick: close, block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react_intl22.FormattedMessage, { id: "close" }) }) : /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Button, { size: "lg", onClick: () => setStatus(""), block: true, highlight: true, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react_intl22.FormattedMessage, { id: "back" }) })
|
|
2879
2925
|
] });
|
|
2880
2926
|
}
|
|
2881
|
-
return /* @__PURE__ */ (0,
|
|
2882
|
-
/* @__PURE__ */ (0,
|
|
2883
|
-
/* @__PURE__ */ (0,
|
|
2927
|
+
return /* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: `matchid-import-token`, children: [
|
|
2928
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsxs)("div", { className: "matchid-import-token-form", children: [
|
|
2929
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Field, { label: intl.formatMessage({
|
|
2884
2930
|
id: "tokenSmartContract"
|
|
2885
|
-
}), error: error.address ? error.address : isContractQuery.isFetched && !isContractQuery.isLoading && !isContractQuery.data && canImport ? "Address isn't a contract address" : "", children: /* @__PURE__ */ (0,
|
|
2931
|
+
}), error: error.address ? error.address : isContractQuery.isFetched && !isContractQuery.isLoading && !isContractQuery.data && canImport ? "Address isn't a contract address" : "", children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
2886
2932
|
Input,
|
|
2887
2933
|
{
|
|
2888
2934
|
placeholder: intl.formatMessage({
|
|
@@ -2893,9 +2939,9 @@ function ImportToken({ close }) {
|
|
|
2893
2939
|
maxLength: 42
|
|
2894
2940
|
}
|
|
2895
2941
|
) }),
|
|
2896
|
-
/* @__PURE__ */ (0,
|
|
2942
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Field, { label: intl.formatMessage({
|
|
2897
2943
|
id: "tokenSymbol"
|
|
2898
|
-
}), error: error.symbol, children: /* @__PURE__ */ (0,
|
|
2944
|
+
}), error: error.symbol, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
2899
2945
|
Input,
|
|
2900
2946
|
{
|
|
2901
2947
|
placeholder: intl.formatMessage({
|
|
@@ -2906,9 +2952,9 @@ function ImportToken({ close }) {
|
|
|
2906
2952
|
maxLength: 16
|
|
2907
2953
|
}
|
|
2908
2954
|
) }),
|
|
2909
|
-
/* @__PURE__ */ (0,
|
|
2955
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(Field, { label: intl.formatMessage({
|
|
2910
2956
|
id: "tokenDecimals"
|
|
2911
|
-
}), error: error.decimals, children: /* @__PURE__ */ (0,
|
|
2957
|
+
}), error: error.decimals, children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
2912
2958
|
Input,
|
|
2913
2959
|
{
|
|
2914
2960
|
placeholder: intl.formatMessage({
|
|
@@ -2920,7 +2966,7 @@ function ImportToken({ close }) {
|
|
|
2920
2966
|
}
|
|
2921
2967
|
) })
|
|
2922
2968
|
] }),
|
|
2923
|
-
/* @__PURE__ */ (0,
|
|
2969
|
+
/* @__PURE__ */ (0, import_jsx_runtime104.jsx)(
|
|
2924
2970
|
Button,
|
|
2925
2971
|
{
|
|
2926
2972
|
size: "lg",
|
|
@@ -2929,14 +2975,14 @@ function ImportToken({ close }) {
|
|
|
2929
2975
|
loading: loading || isContractQuery.isLoading,
|
|
2930
2976
|
disabled: !canImport || !isContractQuery.data,
|
|
2931
2977
|
highlight: true,
|
|
2932
|
-
children: /* @__PURE__ */ (0,
|
|
2978
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime104.jsx)(import_react_intl22.FormattedMessage, { id: "import" })
|
|
2933
2979
|
}
|
|
2934
2980
|
)
|
|
2935
2981
|
] });
|
|
2936
2982
|
}
|
|
2937
2983
|
|
|
2938
2984
|
// src/hooks/useMatchWallet.tsx
|
|
2939
|
-
var
|
|
2985
|
+
var import_jsx_runtime105 = require("react/jsx-runtime");
|
|
2940
2986
|
var ReceiveModal = () => {
|
|
2941
2987
|
const chain = useMatchChain();
|
|
2942
2988
|
const { address } = useWallet();
|
|
@@ -2950,10 +2996,10 @@ var ReceiveModal = () => {
|
|
|
2950
2996
|
}));
|
|
2951
2997
|
};
|
|
2952
2998
|
const chainLink = chain.explorerLink("address/" + address);
|
|
2953
|
-
return /* @__PURE__ */ (0,
|
|
2954
|
-
/* @__PURE__ */ (0,
|
|
2955
|
-
/* @__PURE__ */ (0,
|
|
2956
|
-
/* @__PURE__ */ (0,
|
|
2999
|
+
return /* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: `matchid-receive-modal`, children: [
|
|
3000
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsxs)("div", { className: "matchid-receive-container", children: [
|
|
3001
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: `matchid-receive-text`, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(import_react_intl23.FormattedMessage, { id: "receiveQrcode" }) }),
|
|
3002
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)("div", { className: `matchid-qr-container`, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
2957
3003
|
import_react_qrcode.QRCode,
|
|
2958
3004
|
{
|
|
2959
3005
|
margin: "0",
|
|
@@ -2961,7 +3007,7 @@ var ReceiveModal = () => {
|
|
|
2961
3007
|
value: address
|
|
2962
3008
|
}
|
|
2963
3009
|
) }),
|
|
2964
|
-
/* @__PURE__ */ (0,
|
|
3010
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
2965
3011
|
"a",
|
|
2966
3012
|
{
|
|
2967
3013
|
href: chainLink,
|
|
@@ -2971,7 +3017,7 @@ var ReceiveModal = () => {
|
|
|
2971
3017
|
}
|
|
2972
3018
|
)
|
|
2973
3019
|
] }),
|
|
2974
|
-
/* @__PURE__ */ (0,
|
|
3020
|
+
/* @__PURE__ */ (0, import_jsx_runtime105.jsx)(Button, { size: "lg", onClick: onCopy, block: true, highlight: true, disabled: copied, children: /* @__PURE__ */ (0, import_jsx_runtime105.jsx)(
|
|
2975
3021
|
import_react_intl23.FormattedMessage,
|
|
2976
3022
|
{
|
|
2977
3023
|
id: "copyAddress"
|