@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
|
@@ -44,10 +44,12 @@ import {
|
|
|
44
44
|
InfoLineIcon,
|
|
45
45
|
InfoRoundIcon,
|
|
46
46
|
InputLengthIcon,
|
|
47
|
+
KakaoIcon,
|
|
47
48
|
LeatherIcon,
|
|
48
49
|
LinkedinIcon,
|
|
49
50
|
LoadingIcon_default,
|
|
50
51
|
LoginIcon_default,
|
|
52
|
+
MatchIdIcon_default,
|
|
51
53
|
OKXIcon,
|
|
52
54
|
OpenEyeIcon,
|
|
53
55
|
PhantomIcon,
|
|
@@ -66,7 +68,7 @@ import {
|
|
|
66
68
|
XIcon,
|
|
67
69
|
XverseIcon,
|
|
68
70
|
YoutubeIcon
|
|
69
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-7SUDHG7S.mjs";
|
|
70
72
|
import {
|
|
71
73
|
confirm_default,
|
|
72
74
|
connecting_default,
|
|
@@ -1983,6 +1985,8 @@ import { useQuery as useQuery4 } from "@tanstack/react-query";
|
|
|
1983
1985
|
var EMAIL_INTERVAL = 60;
|
|
1984
1986
|
var EMAIL_CODE_LENGTH = 6;
|
|
1985
1987
|
var NATIVE_TOKEN_ADDRESS = "0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee";
|
|
1988
|
+
var TERMS_OF_SERVICE_URL = "https://docs.google.com/document/d/1QbagOOBhi50niC2mn4pJAd9pyNlvm1MSwcKWuP9YB80/edit?usp=sharing";
|
|
1989
|
+
var PRIVACY_POLICY_URL = "https://docs.google.com/document/d/1YOUUOmNXbA7qy79YckxhPMLWBj_WDiUp6mkJPNq_XCk/edit?usp=sharing";
|
|
1986
1990
|
|
|
1987
1991
|
// src/hooks/useMatchWallet.tsx
|
|
1988
1992
|
import { erc20Abi as erc20Abi2, formatUnits as formatUnits2 } from "viem";
|
|
@@ -2997,6 +3001,12 @@ var useWalletModalStore = create5((set) => ({
|
|
|
2997
3001
|
open: (type, methods = DEFAULT_WALLET_METHODS) => set({ isOpen: true, type, methods }),
|
|
2998
3002
|
close: () => set({ isOpen: false })
|
|
2999
3003
|
}));
|
|
3004
|
+
var useEmailModalStore = create5((set) => ({
|
|
3005
|
+
isOpen: false,
|
|
3006
|
+
type: "",
|
|
3007
|
+
open: (type) => set({ isOpen: true, type }),
|
|
3008
|
+
close: () => set({ isOpen: false })
|
|
3009
|
+
}));
|
|
3000
3010
|
|
|
3001
3011
|
// src/components/CEXBindModal/index.tsx
|
|
3002
3012
|
import { useEffect as useEffect16, useMemo as useMemo7, useState as useState16 } from "react";
|
|
@@ -3017,7 +3027,7 @@ function CEXBindModal({
|
|
|
3017
3027
|
const [secret, setSecret] = useState16("");
|
|
3018
3028
|
const [error, setError] = useState16("");
|
|
3019
3029
|
const needPassphrase = useMemo7(() => {
|
|
3020
|
-
return ["bitget", "okx"].includes(type.toLowerCase());
|
|
3030
|
+
return ["bitget", "okx", "kucoin"].includes(type.toLowerCase());
|
|
3021
3031
|
}, [type]);
|
|
3022
3032
|
useEffect16(() => {
|
|
3023
3033
|
if (isOpen) {
|
|
@@ -3113,7 +3123,25 @@ function CEXBindModal({
|
|
|
3113
3123
|
|
|
3114
3124
|
// src/context/BusinessProvider.tsx
|
|
3115
3125
|
import { useQuery as useQuery7 } from "@tanstack/react-query";
|
|
3116
|
-
|
|
3126
|
+
|
|
3127
|
+
// src/components/BindEmailModal/index.tsx
|
|
3128
|
+
import { jsx as jsx25 } from "react/jsx-runtime";
|
|
3129
|
+
var BindEmailModal = ({ isOpen, onClose, onBack, onLogin }) => {
|
|
3130
|
+
return /* @__PURE__ */ jsx25(
|
|
3131
|
+
EmailModal,
|
|
3132
|
+
{
|
|
3133
|
+
type: "bind",
|
|
3134
|
+
isOpen,
|
|
3135
|
+
onClose,
|
|
3136
|
+
onBack,
|
|
3137
|
+
onLogin
|
|
3138
|
+
}
|
|
3139
|
+
);
|
|
3140
|
+
};
|
|
3141
|
+
var BindEmailModal_default = BindEmailModal;
|
|
3142
|
+
|
|
3143
|
+
// src/context/BusinessProvider.tsx
|
|
3144
|
+
import { Fragment as Fragment4, jsx as jsx26, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
3117
3145
|
function BusinessProvider({ children }) {
|
|
3118
3146
|
const { overview, token } = useUserInfo();
|
|
3119
3147
|
const { type: EVMType, isOpen: EVMIsOpen, close: EVMClose } = useEVMModalStore();
|
|
@@ -3121,6 +3149,7 @@ function BusinessProvider({ children }) {
|
|
|
3121
3149
|
const { type: TRONType, isOpen: TRONIsOpen, close: TRONClose } = useTRONModalStore();
|
|
3122
3150
|
const { type: BTCType, isOpen: BTCIsOpen, close: BTCClose } = useBTCModalStore();
|
|
3123
3151
|
const { type: CEXType, isOpen: CEXIsOpen, close: CEXClose } = useCEXBindModalStore();
|
|
3152
|
+
const { type: EmailType, isOpen: EmailIsOpen, close: EmailClose } = useEmailModalStore();
|
|
3124
3153
|
const WalletModalStore = useWalletModalStore();
|
|
3125
3154
|
const { tgAppAuthCode, setTgAppAuthCode } = useStore_default();
|
|
3126
3155
|
const { login } = useMatch();
|
|
@@ -3148,7 +3177,7 @@ function BusinessProvider({ children }) {
|
|
|
3148
3177
|
refetchInterval: 1e3 * 5
|
|
3149
3178
|
});
|
|
3150
3179
|
return /* @__PURE__ */ jsxs14(Fragment4, { children: [
|
|
3151
|
-
/* @__PURE__ */
|
|
3180
|
+
/* @__PURE__ */ jsx26(
|
|
3152
3181
|
EVMModal,
|
|
3153
3182
|
{
|
|
3154
3183
|
isOpen: EVMIsOpen && (EVMType == "login" && !overview && !token || EVMType == "bind" && !!token && !!overview),
|
|
@@ -3158,7 +3187,7 @@ function BusinessProvider({ children }) {
|
|
|
3158
3187
|
zIndex: 199
|
|
3159
3188
|
}
|
|
3160
3189
|
),
|
|
3161
|
-
/* @__PURE__ */
|
|
3190
|
+
/* @__PURE__ */ jsx26(
|
|
3162
3191
|
TRONModal,
|
|
3163
3192
|
{
|
|
3164
3193
|
isOpen: TRONIsOpen && (TRONType == "login" && !overview && !token || TRONType == "bind" && !!token && !!overview),
|
|
@@ -3168,7 +3197,7 @@ function BusinessProvider({ children }) {
|
|
|
3168
3197
|
zIndex: 199
|
|
3169
3198
|
}
|
|
3170
3199
|
),
|
|
3171
|
-
/* @__PURE__ */
|
|
3200
|
+
/* @__PURE__ */ jsx26(
|
|
3172
3201
|
TONModal,
|
|
3173
3202
|
{
|
|
3174
3203
|
isOpen: TONIsOpen && (TONType == "login" && !overview && !token || TONType == "bind" && !!token && !!overview),
|
|
@@ -3178,7 +3207,7 @@ function BusinessProvider({ children }) {
|
|
|
3178
3207
|
zIndex: 199
|
|
3179
3208
|
}
|
|
3180
3209
|
),
|
|
3181
|
-
/* @__PURE__ */
|
|
3210
|
+
/* @__PURE__ */ jsx26(
|
|
3182
3211
|
BTCModal,
|
|
3183
3212
|
{
|
|
3184
3213
|
isOpen: BTCIsOpen && (BTCType == "login" && !overview && !token || BTCType == "bind" && !!token && !!overview),
|
|
@@ -3188,7 +3217,7 @@ function BusinessProvider({ children }) {
|
|
|
3188
3217
|
zIndex: 199
|
|
3189
3218
|
}
|
|
3190
3219
|
),
|
|
3191
|
-
/* @__PURE__ */
|
|
3220
|
+
/* @__PURE__ */ jsx26(
|
|
3192
3221
|
CEXBindModal,
|
|
3193
3222
|
{
|
|
3194
3223
|
isOpen: CEXIsOpen && (!!token && !!overview),
|
|
@@ -3197,7 +3226,7 @@ function BusinessProvider({ children }) {
|
|
|
3197
3226
|
zIndex: 199
|
|
3198
3227
|
}
|
|
3199
3228
|
),
|
|
3200
|
-
/* @__PURE__ */
|
|
3229
|
+
/* @__PURE__ */ jsx26(
|
|
3201
3230
|
WalletModal,
|
|
3202
3231
|
{
|
|
3203
3232
|
isOpen: WalletModalStore.isOpen && (WalletModalStore.type == "login" && !overview && !token || WalletModalStore.type == "bind" && !!token && !!overview),
|
|
@@ -3207,14 +3236,22 @@ function BusinessProvider({ children }) {
|
|
|
3207
3236
|
zIndex: 150
|
|
3208
3237
|
}
|
|
3209
3238
|
),
|
|
3239
|
+
/* @__PURE__ */ jsx26(
|
|
3240
|
+
BindEmailModal_default,
|
|
3241
|
+
{
|
|
3242
|
+
isOpen: EmailIsOpen && (EmailType == "bind" && !!token && !!overview),
|
|
3243
|
+
onClose: EmailClose,
|
|
3244
|
+
onLogin: EmailClose
|
|
3245
|
+
}
|
|
3246
|
+
),
|
|
3210
3247
|
children
|
|
3211
3248
|
] });
|
|
3212
3249
|
}
|
|
3213
3250
|
|
|
3214
3251
|
// src/context/index.tsx
|
|
3215
|
-
import { jsx as
|
|
3252
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
3216
3253
|
var Providers = ({ children }) => {
|
|
3217
|
-
return /* @__PURE__ */
|
|
3254
|
+
return /* @__PURE__ */ jsx27(ToastProvider, { children: /* @__PURE__ */ jsx27(ModalProvider, { children: /* @__PURE__ */ jsx27(BusinessProvider, { children }) }) });
|
|
3218
3255
|
};
|
|
3219
3256
|
var context_default = Providers;
|
|
3220
3257
|
|
|
@@ -3687,7 +3724,9 @@ var en_default = {
|
|
|
3687
3724
|
noRequests: "No Requests yet",
|
|
3688
3725
|
noMore: "No more",
|
|
3689
3726
|
Remove: "Remove",
|
|
3690
|
-
removeSuccess: "Remove Successfully"
|
|
3727
|
+
removeSuccess: "Remove Successfully",
|
|
3728
|
+
loginAgreement: "By login, you agree to our <termsLink>Terms of Service</termsLink> and <privacyLink>Privacy Policy</privacyLink>",
|
|
3729
|
+
poweredBy: "Powered by"
|
|
3691
3730
|
};
|
|
3692
3731
|
|
|
3693
3732
|
// src/i18n/zh.json
|
|
@@ -3775,7 +3814,9 @@ var zh_default = {
|
|
|
3775
3814
|
noRequests: "\u6682\u65E0\u8BF7\u6C42",
|
|
3776
3815
|
noMore: "\u6CA1\u6709\u66F4\u591A",
|
|
3777
3816
|
Remove: "\u79FB\u9664",
|
|
3778
|
-
removeSuccess: "\u79FB\u9664\u6210\u529F"
|
|
3817
|
+
removeSuccess: "\u79FB\u9664\u6210\u529F",
|
|
3818
|
+
loginAgreement: "\u767B\u5F55\u5373\u8868\u793A\u60A8\u540C\u610F\u6211\u4EEC\u7684<termsLink>\u670D\u52A1\u6761\u6B3E</termsLink>\u548C<privacyLink>\u9690\u79C1\u653F\u7B56</privacyLink>",
|
|
3819
|
+
poweredBy: "\u7531"
|
|
3779
3820
|
};
|
|
3780
3821
|
|
|
3781
3822
|
// src/i18n/tw.json
|
|
@@ -3863,7 +3904,9 @@ var tw_default = {
|
|
|
3863
3904
|
noRequests: "\u66AB\u7121\u8ACB\u6C42",
|
|
3864
3905
|
noMore: "\u6C92\u6709\u66F4\u591A",
|
|
3865
3906
|
Remove: "\u79FB\u9664",
|
|
3866
|
-
removeSuccess: "\u79FB\u9664\u6210\u529F"
|
|
3907
|
+
removeSuccess: "\u79FB\u9664\u6210\u529F",
|
|
3908
|
+
loginAgreement: "\u767B\u5165\u5373\u8868\u793A\u60A8\u540C\u610F\u6211\u5011\u7684<termsLink>\u670D\u52D9\u689D\u6B3E</termsLink>\u548C<privacyLink>\u96B1\u79C1\u6B0A\u653F\u7B56</privacyLink>",
|
|
3909
|
+
poweredBy: "\u7531"
|
|
3867
3910
|
};
|
|
3868
3911
|
|
|
3869
3912
|
// src/i18n/fr.json
|
|
@@ -3951,7 +3994,9 @@ var fr_default = {
|
|
|
3951
3994
|
noRequests: "Pas encore de demandes",
|
|
3952
3995
|
noMore: "Plus rien",
|
|
3953
3996
|
Remove: "Supprimer",
|
|
3954
|
-
removeSuccess: "Suppression r\xE9ussie"
|
|
3997
|
+
removeSuccess: "Suppression r\xE9ussie",
|
|
3998
|
+
loginAgreement: "En vous connectant, vous acceptez nos <termsLink>Conditions G\xE9n\xE9rales d'Utilisation</termsLink> et notre <privacyLink>Politique de Confidentialit\xE9</privacyLink>",
|
|
3999
|
+
poweredBy: "Par"
|
|
3955
4000
|
};
|
|
3956
4001
|
|
|
3957
4002
|
// src/i18n/ja.json
|
|
@@ -4039,7 +4084,9 @@ var ja_default = {
|
|
|
4039
4084
|
noRequests: "\u307E\u3060\u30EA\u30AF\u30A8\u30B9\u30C8\u304C\u3042\u308A\u307E\u305B\u3093",
|
|
4040
4085
|
noMore: "\u3053\u308C\u4EE5\u4E0A\u3042\u308A\u307E\u305B\u3093",
|
|
4041
4086
|
Remove: "\u524A\u9664",
|
|
4042
|
-
removeSuccess: "\u524A\u9664\u306B\u6210\u529F\u3057\u307E\u3057\u305F"
|
|
4087
|
+
removeSuccess: "\u524A\u9664\u306B\u6210\u529F\u3057\u307E\u3057\u305F",
|
|
4088
|
+
loginAgreement: "\u30ED\u30B0\u30A4\u30F3\u3059\u308B\u3053\u3068\u306B\u3088\u308A\u3001\u5F53\u793E\u306E<termsLink>\u5229\u7528\u898F\u7D04</termsLink>\u304A\u3088\u3073<privacyLink>\u30D7\u30E9\u30A4\u30D0\u30B7\u30FC\u30DD\u30EA\u30B7\u30FC</termsLink>\u306B\u540C\u610F\u3057\u305F\u3082\u306E\u3068\u307F\u306A\u3055\u308C\u307E\u3059",
|
|
4089
|
+
poweredBy: "\u88FD\u9020\u5143"
|
|
4043
4090
|
};
|
|
4044
4091
|
|
|
4045
4092
|
// src/i18n/ko.json
|
|
@@ -4127,7 +4174,9 @@ var ko_default = {
|
|
|
4127
4174
|
noRequests: "\uC544\uC9C1 \uC694\uCCAD\uC774 \uC5C6\uC2B5\uB2C8\uB2E4",
|
|
4128
4175
|
noMore: "\uB354 \uC774\uC0C1 \uC5C6\uC74C",
|
|
4129
4176
|
Remove: "\uC0AD\uC81C",
|
|
4130
|
-
removeSuccess: "\uC0AD\uC81C \uC131\uACF5"
|
|
4177
|
+
removeSuccess: "\uC0AD\uC81C \uC131\uACF5",
|
|
4178
|
+
loginAgreement: "\uB85C\uADF8\uC778\uD568\uC73C\uB85C\uC368 \uB2F9\uC0AC\uC758 <termsLink>\uC11C\uBE44\uC2A4 \uC57D\uAD00</termsLink> \uBC0F <privacyLink>\uAC1C\uC778\uC815\uBCF4 \uCC98\uB9AC\uBC29\uCE68</privacyLink>\uC5D0 \uB3D9\uC758\uD558\uB294 \uAC83\uC73C\uB85C \uAC04\uC8FC\uB429\uB2C8\uB2E4",
|
|
4179
|
+
poweredBy: "\uC81C\uC791"
|
|
4131
4180
|
};
|
|
4132
4181
|
|
|
4133
4182
|
// src/i18n/vi.json
|
|
@@ -4215,7 +4264,9 @@ var vi_default = {
|
|
|
4215
4264
|
noRequests: "Ch\u01B0a c\xF3 y\xEAu c\u1EA7u n\xE0o",
|
|
4216
4265
|
noMore: "Kh\xF4ng c\xF2n n\u1EEFa",
|
|
4217
4266
|
Remove: "X\xF3a",
|
|
4218
|
-
removeSuccess: "X\xF3a th\xE0nh c\xF4ng"
|
|
4267
|
+
removeSuccess: "X\xF3a th\xE0nh c\xF4ng",
|
|
4268
|
+
loginAgreement: "B\u1EB1ng c\xE1ch \u0111\u0103ng nh\u1EADp, b\u1EA1n \u0111\u1ED3ng \xFD v\u1EDBi <termsLink>\u0110i\u1EC1u kho\u1EA3n d\u1ECBch v\u1EE5</termsLink> v\xE0 <privacyLink>Ch\xEDnh s\xE1ch quy\u1EC1n ri\xEAng t\u01B0</privacyLink> c\u1EE7a ch\xFAng t\xF4i",
|
|
4269
|
+
poweredBy: "B\u1EDFi"
|
|
4219
4270
|
};
|
|
4220
4271
|
|
|
4221
4272
|
// src/i18n/es.json
|
|
@@ -4303,7 +4354,9 @@ var es_default = {
|
|
|
4303
4354
|
noRequests: "A\xFAn no hay solicitudes",
|
|
4304
4355
|
noMore: "No hay m\xE1s",
|
|
4305
4356
|
Remove: "Eliminar",
|
|
4306
|
-
removeSuccess: "Eliminado con \xE9xito"
|
|
4357
|
+
removeSuccess: "Eliminado con \xE9xito",
|
|
4358
|
+
loginAgreement: "Al iniciar sesi\xF3n, aceptas nuestros <termsLink>T\xE9rminos de servicio</termsLink> y nuestra <privacyLink>Pol\xEDtica de privacidad</privacyLink>",
|
|
4359
|
+
poweredBy: "Por"
|
|
4307
4360
|
};
|
|
4308
4361
|
|
|
4309
4362
|
// src/i18n/pt.json
|
|
@@ -4391,7 +4444,9 @@ var pt_default = {
|
|
|
4391
4444
|
noRequests: "Ainda sem solicita\xE7\xF5es",
|
|
4392
4445
|
noMore: "N\xE3o h\xE1 mais",
|
|
4393
4446
|
Remove: "Remover",
|
|
4394
|
-
removeSuccess: "Removido com sucesso"
|
|
4447
|
+
removeSuccess: "Removido com sucesso",
|
|
4448
|
+
loginAgreement: "Ao fazer login, voc\xEA concorda com nossos <termsLink>Termos de Servi\xE7o</termsLink> e nossa <privacyLink>Pol\xEDtica de Privacidade</privacyLink>",
|
|
4449
|
+
poweredBy: "Por"
|
|
4395
4450
|
};
|
|
4396
4451
|
|
|
4397
4452
|
// src/i18n/index.ts
|
|
@@ -4418,7 +4473,7 @@ import {
|
|
|
4418
4473
|
} from "@rainbow-me/rainbowkit/wallets";
|
|
4419
4474
|
import { arbitrum, base, bsc, mainnet, optimism, polygon } from "wagmi/chains";
|
|
4420
4475
|
import { WagmiProvider } from "wagmi";
|
|
4421
|
-
import { jsx as
|
|
4476
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
4422
4477
|
var queryClient = new QueryClient();
|
|
4423
4478
|
var wagmiConfig = getDefaultConfig({
|
|
4424
4479
|
appName: "MatchID",
|
|
@@ -4457,7 +4512,7 @@ var MatchProvider = ({
|
|
|
4457
4512
|
useWalletInit({
|
|
4458
4513
|
config: wallet
|
|
4459
4514
|
});
|
|
4460
|
-
return /* @__PURE__ */
|
|
4515
|
+
return /* @__PURE__ */ jsx28(IntlProvider, { locale: realLocale, messages: messages[realLocale], children: /* @__PURE__ */ jsx28(WagmiProvider, { config: wagmiConfig, children: /* @__PURE__ */ jsx28(QueryClientProvider, { client: queryClient, children: /* @__PURE__ */ jsx28(
|
|
4461
4516
|
MatchContext.Provider,
|
|
4462
4517
|
{
|
|
4463
4518
|
value: {
|
|
@@ -4468,7 +4523,7 @@ var MatchProvider = ({
|
|
|
4468
4523
|
theme,
|
|
4469
4524
|
locale: realLocale
|
|
4470
4525
|
},
|
|
4471
|
-
children: /* @__PURE__ */
|
|
4526
|
+
children: /* @__PURE__ */ jsx28(context_default, { children })
|
|
4472
4527
|
}
|
|
4473
4528
|
) }) }) });
|
|
4474
4529
|
};
|
|
@@ -4504,6 +4559,7 @@ function useUserInfo() {
|
|
|
4504
4559
|
const { open: BTCOpen } = useBTCModalStore();
|
|
4505
4560
|
const { open: CEXBindOpen } = useCEXBindModalStore();
|
|
4506
4561
|
const walletModalStore = useWalletModalStore();
|
|
4562
|
+
const emailModalStore = useEmailModalStore();
|
|
4507
4563
|
const getRedirectUri = () => {
|
|
4508
4564
|
return encodeURIComponent(window.location.href);
|
|
4509
4565
|
};
|
|
@@ -4597,6 +4653,7 @@ function useUserInfo() {
|
|
|
4597
4653
|
case "github":
|
|
4598
4654
|
case "linkedin":
|
|
4599
4655
|
case "facebook":
|
|
4656
|
+
case "kakao":
|
|
4600
4657
|
return await loginByMethod(method);
|
|
4601
4658
|
default:
|
|
4602
4659
|
throw new Error("unsupported method");
|
|
@@ -4681,6 +4738,8 @@ function useUserInfo() {
|
|
|
4681
4738
|
return TONOpen("bind");
|
|
4682
4739
|
case "btc":
|
|
4683
4740
|
return BTCOpen("bind");
|
|
4741
|
+
case "email":
|
|
4742
|
+
return emailModalStore.open("bind");
|
|
4684
4743
|
case "telegram":
|
|
4685
4744
|
return await bindTelegram();
|
|
4686
4745
|
case "twitter":
|
|
@@ -4690,6 +4749,7 @@ function useUserInfo() {
|
|
|
4690
4749
|
case "linkedin":
|
|
4691
4750
|
case "facebook":
|
|
4692
4751
|
case "youtube":
|
|
4752
|
+
case "kakao":
|
|
4693
4753
|
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" : ""}`;
|
|
4694
4754
|
matchlog_default.log("link", link);
|
|
4695
4755
|
return window.open(
|
|
@@ -4704,6 +4764,31 @@ function useUserInfo() {
|
|
|
4704
4764
|
const bindCex = (type) => {
|
|
4705
4765
|
return CEXBindOpen(type);
|
|
4706
4766
|
};
|
|
4767
|
+
const bindByEmail = async ({ email, code }) => {
|
|
4768
|
+
try {
|
|
4769
|
+
const obj = {
|
|
4770
|
+
email,
|
|
4771
|
+
verification_key: emailLoginKey,
|
|
4772
|
+
verification_code: code
|
|
4773
|
+
};
|
|
4774
|
+
const res = await verifyEmailCodeApi(obj);
|
|
4775
|
+
if (res && res.data && isSuccess(res)) {
|
|
4776
|
+
events.onBind && events.onBind({
|
|
4777
|
+
type: "email"
|
|
4778
|
+
});
|
|
4779
|
+
eventManager_default.emit("onBind", {
|
|
4780
|
+
type: "email"
|
|
4781
|
+
});
|
|
4782
|
+
return true;
|
|
4783
|
+
} else {
|
|
4784
|
+
throw new Error(res.message);
|
|
4785
|
+
}
|
|
4786
|
+
} catch (error) {
|
|
4787
|
+
console.error("bindByEmail", error);
|
|
4788
|
+
throw error;
|
|
4789
|
+
}
|
|
4790
|
+
return false;
|
|
4791
|
+
};
|
|
4707
4792
|
const getAuthInfo = async (method) => {
|
|
4708
4793
|
const element_id = "auth_iframe";
|
|
4709
4794
|
if (document.getElementById(element_id)) {
|
|
@@ -4772,6 +4857,7 @@ function useUserInfo() {
|
|
|
4772
4857
|
auth,
|
|
4773
4858
|
login: loginMethod,
|
|
4774
4859
|
bind,
|
|
4860
|
+
bindByEmail,
|
|
4775
4861
|
getAuthInfo,
|
|
4776
4862
|
invite
|
|
4777
4863
|
};
|
|
@@ -4780,10 +4866,10 @@ function useUserInfo() {
|
|
|
4780
4866
|
// src/components/EmailModal/StepVerify.tsx
|
|
4781
4867
|
import { useEffect as useEffect20, useMemo as useMemo9, useRef as useRef6, useState as useState18 } from "react";
|
|
4782
4868
|
import { FormattedMessage as FormattedMessage6, useIntl as useIntl7 } from "react-intl";
|
|
4783
|
-
import { jsx as
|
|
4869
|
+
import { jsx as jsx29, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4784
4870
|
function StepVerify(props) {
|
|
4785
4871
|
const intl = useIntl7();
|
|
4786
|
-
const { getLoginEmailCode, loginByEmail } = useUserInfo();
|
|
4872
|
+
const { getLoginEmailCode, loginByEmail, bindByEmail } = useUserInfo();
|
|
4787
4873
|
const [error, setError] = useState18("");
|
|
4788
4874
|
const [code, setCode] = useState18("");
|
|
4789
4875
|
const [sending, setSending] = useState18(false);
|
|
@@ -4843,7 +4929,10 @@ function StepVerify(props) {
|
|
|
4843
4929
|
try {
|
|
4844
4930
|
setError("");
|
|
4845
4931
|
setSubmitting(true);
|
|
4846
|
-
const res = await
|
|
4932
|
+
const res = props.type === "bind" ? await bindByEmail({
|
|
4933
|
+
email: props.email,
|
|
4934
|
+
code
|
|
4935
|
+
}) : await loginByEmail({
|
|
4847
4936
|
email: props.email,
|
|
4848
4937
|
code
|
|
4849
4938
|
});
|
|
@@ -4859,15 +4948,15 @@ function StepVerify(props) {
|
|
|
4859
4948
|
};
|
|
4860
4949
|
return /* @__PURE__ */ jsxs15("div", { className: "matchid-email-verify-box", children: [
|
|
4861
4950
|
/* @__PURE__ */ jsxs15("div", { className: "matchid-email-verify-header", children: [
|
|
4862
|
-
/* @__PURE__ */
|
|
4951
|
+
/* @__PURE__ */ jsx29("div", { className: "matchid-email-verify-header-icon", children: /* @__PURE__ */ jsx29(EmailLineIcon, { size: isDownMd ? 19 : 24 }) }),
|
|
4863
4952
|
/* @__PURE__ */ jsxs15("div", { className: "matchid-email-verify-header-content", children: [
|
|
4864
|
-
/* @__PURE__ */
|
|
4865
|
-
/* @__PURE__ */
|
|
4953
|
+
/* @__PURE__ */ jsx29("div", { className: "matchid-email-verify-header-value", children: props.email }),
|
|
4954
|
+
/* @__PURE__ */ jsx29("div", { className: "matchid-email-verify-header-tips", children: /* @__PURE__ */ jsx29(FormattedMessage6, { id: "sendEmailTips" }) })
|
|
4866
4955
|
] })
|
|
4867
4956
|
] }),
|
|
4868
|
-
/* @__PURE__ */
|
|
4957
|
+
/* @__PURE__ */ jsx29(Field, { label: intl.formatMessage({
|
|
4869
4958
|
id: "verificationCode"
|
|
4870
|
-
}), error, children: /* @__PURE__ */
|
|
4959
|
+
}), error, children: /* @__PURE__ */ jsx29(
|
|
4871
4960
|
Input,
|
|
4872
4961
|
{
|
|
4873
4962
|
placeholder: intl.formatMessage({
|
|
@@ -4877,7 +4966,7 @@ function StepVerify(props) {
|
|
|
4877
4966
|
maxLength: codeLength,
|
|
4878
4967
|
onChange: (e) => setCode(e.target.value),
|
|
4879
4968
|
value: code,
|
|
4880
|
-
after: /* @__PURE__ */
|
|
4969
|
+
after: /* @__PURE__ */ jsx29(
|
|
4881
4970
|
Button,
|
|
4882
4971
|
{
|
|
4883
4972
|
highlight: true,
|
|
@@ -4896,19 +4985,20 @@ function StepVerify(props) {
|
|
|
4896
4985
|
)
|
|
4897
4986
|
}
|
|
4898
4987
|
) }),
|
|
4899
|
-
/* @__PURE__ */
|
|
4988
|
+
/* @__PURE__ */ jsx29(Button, { disabled: !canContinue, loading: submitting, highlight: true, block: true, size: "lg", onClick: onContinue, children: /* @__PURE__ */ jsx29(FormattedMessage6, { id: "continue" }) })
|
|
4900
4989
|
] });
|
|
4901
4990
|
}
|
|
4902
4991
|
|
|
4903
4992
|
// src/components/EmailModal/index.tsx
|
|
4904
4993
|
import { useIntl as useIntl8 } from "react-intl";
|
|
4905
|
-
import { jsx as
|
|
4994
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
4906
4995
|
function EmailModal({
|
|
4907
4996
|
isOpen = false,
|
|
4908
4997
|
width = 480,
|
|
4909
4998
|
onClose,
|
|
4910
4999
|
onBack,
|
|
4911
|
-
onLogin
|
|
5000
|
+
onLogin,
|
|
5001
|
+
type = "login"
|
|
4912
5002
|
}) {
|
|
4913
5003
|
const [step, setStep] = useState19("input");
|
|
4914
5004
|
const [emailVal, setEmailVal] = useState19("");
|
|
@@ -4919,7 +5009,7 @@ function EmailModal({
|
|
|
4919
5009
|
setEmailVal("");
|
|
4920
5010
|
}
|
|
4921
5011
|
}, [isOpen]);
|
|
4922
|
-
return /* @__PURE__ */
|
|
5012
|
+
return /* @__PURE__ */ jsx30(
|
|
4923
5013
|
ModalWithHeader,
|
|
4924
5014
|
{
|
|
4925
5015
|
isOpen,
|
|
@@ -4929,10 +5019,10 @@ function EmailModal({
|
|
|
4929
5019
|
id: "email"
|
|
4930
5020
|
}),
|
|
4931
5021
|
onBack: step == "verify" ? () => setStep("input") : onBack,
|
|
4932
|
-
children: step === "input" ? /* @__PURE__ */
|
|
5022
|
+
children: step === "input" ? /* @__PURE__ */ jsx30(StepEmail, { email: emailVal, onContinue: (email) => {
|
|
4933
5023
|
setEmailVal(email);
|
|
4934
5024
|
setStep("verify");
|
|
4935
|
-
} }) : /* @__PURE__ */
|
|
5025
|
+
} }) : /* @__PURE__ */ jsx30(StepVerify, { type, email: emailVal, onSuccess: onLogin })
|
|
4936
5026
|
}
|
|
4937
5027
|
);
|
|
4938
5028
|
}
|
|
@@ -4962,7 +5052,7 @@ function useAppConfig() {
|
|
|
4962
5052
|
}
|
|
4963
5053
|
|
|
4964
5054
|
// src/components/LoginBox/index.tsx
|
|
4965
|
-
import { Fragment as Fragment5, jsx as
|
|
5055
|
+
import { Fragment as Fragment5, jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4966
5056
|
var RecommendItem = ({
|
|
4967
5057
|
icon,
|
|
4968
5058
|
name,
|
|
@@ -4974,17 +5064,17 @@ var RecommendItem = ({
|
|
|
4974
5064
|
return /* @__PURE__ */ jsxs16("div", { className: "matchid-login-recommend-method", children: [
|
|
4975
5065
|
/* @__PURE__ */ jsxs16("div", { className: "matchid-login-recommend-method-item", onClick, children: [
|
|
4976
5066
|
/* @__PURE__ */ jsxs16("div", { className: "matchid-login-recommend-method-content", children: [
|
|
4977
|
-
/* @__PURE__ */
|
|
4978
|
-
/* @__PURE__ */
|
|
5067
|
+
/* @__PURE__ */ jsx31("div", { className: "matchid-login-recommend-method-icon", children: icon }),
|
|
5068
|
+
/* @__PURE__ */ jsx31("span", { className: "matchid-login-recommend-method-name", children: name })
|
|
4979
5069
|
] }),
|
|
4980
|
-
footer ? footer : children ? /* @__PURE__ */
|
|
5070
|
+
footer ? footer : children ? /* @__PURE__ */ jsx31(
|
|
4981
5071
|
ArrowDownIcon,
|
|
4982
5072
|
{
|
|
4983
5073
|
className: `matchid-login-recommend-method-arrow ${showChildren ? "matchid-login-recommend-method-arrow-active" : ""}`,
|
|
4984
5074
|
size: 20,
|
|
4985
5075
|
color: "var(--matchid-arrow-color)"
|
|
4986
5076
|
}
|
|
4987
|
-
) : /* @__PURE__ */
|
|
5077
|
+
) : /* @__PURE__ */ jsx31(
|
|
4988
5078
|
ArrowRightIcon,
|
|
4989
5079
|
{
|
|
4990
5080
|
className: "matchid-login-recommend-method-arrow",
|
|
@@ -4993,7 +5083,7 @@ var RecommendItem = ({
|
|
|
4993
5083
|
}
|
|
4994
5084
|
)
|
|
4995
5085
|
] }),
|
|
4996
|
-
children && /* @__PURE__ */
|
|
5086
|
+
children && /* @__PURE__ */ jsx31(
|
|
4997
5087
|
"div",
|
|
4998
5088
|
{
|
|
4999
5089
|
className: `matchid-login-recommend-method-popover ${showChildren ? "matchid-login-recommend-method-popover-active" : ""}`,
|
|
@@ -5058,64 +5148,69 @@ function LoginBox({
|
|
|
5058
5148
|
const isDownMd = useDownMd();
|
|
5059
5149
|
const methodMap = {
|
|
5060
5150
|
wallet: {
|
|
5061
|
-
icon: /* @__PURE__ */
|
|
5151
|
+
icon: /* @__PURE__ */ jsx31(WalletIcon, { size: isDownMd ? 36 : 40 }),
|
|
5062
5152
|
name: intl.formatMessage({ id: "wallet" }),
|
|
5063
5153
|
onClick: () => setShowWallet(!showWallet),
|
|
5064
5154
|
type: "wallet"
|
|
5065
5155
|
},
|
|
5066
5156
|
email: {
|
|
5067
|
-
icon: /* @__PURE__ */
|
|
5157
|
+
icon: /* @__PURE__ */ jsx31(EmailIcon, { size: isDownMd ? 36 : 40 }),
|
|
5068
5158
|
name: intl.formatMessage({ id: "email" }),
|
|
5069
5159
|
onClick: () => {
|
|
5070
5160
|
setEmailOpen(true);
|
|
5071
5161
|
}
|
|
5072
5162
|
},
|
|
5073
5163
|
google: {
|
|
5074
|
-
icon: /* @__PURE__ */
|
|
5164
|
+
icon: /* @__PURE__ */ jsx31(GoogleIcon, { size: isDownMd ? 36 : 40 }),
|
|
5075
5165
|
name: "Google",
|
|
5076
5166
|
onClick: () => login("google")
|
|
5077
5167
|
},
|
|
5078
5168
|
twitter: {
|
|
5079
|
-
icon: /* @__PURE__ */
|
|
5169
|
+
icon: /* @__PURE__ */ jsx31(XIcon, { size: isDownMd ? 36 : 40 }),
|
|
5080
5170
|
name: "X",
|
|
5081
5171
|
onClick: () => login("twitter")
|
|
5082
5172
|
},
|
|
5083
5173
|
telegram: {
|
|
5084
|
-
icon: /* @__PURE__ */
|
|
5174
|
+
icon: /* @__PURE__ */ jsx31(TelegramIcon, { size: isDownMd ? 36 : 40 }),
|
|
5085
5175
|
name: "Telegram",
|
|
5086
5176
|
onClick: () => login("telegram")
|
|
5087
5177
|
},
|
|
5088
5178
|
github: {
|
|
5089
|
-
icon: /* @__PURE__ */
|
|
5179
|
+
icon: /* @__PURE__ */ jsx31(GithubIcon, { size: isDownMd ? 36 : 40 }),
|
|
5090
5180
|
name: "Github",
|
|
5091
5181
|
onClick: () => login("github")
|
|
5092
5182
|
},
|
|
5093
5183
|
discord: {
|
|
5094
|
-
icon: /* @__PURE__ */
|
|
5184
|
+
icon: /* @__PURE__ */ jsx31(DiscordIcon, { size: isDownMd ? 36 : 40 }),
|
|
5095
5185
|
name: "Discord",
|
|
5096
5186
|
onClick: () => login("discord")
|
|
5097
5187
|
},
|
|
5098
5188
|
linkedin: {
|
|
5099
|
-
icon: /* @__PURE__ */
|
|
5189
|
+
icon: /* @__PURE__ */ jsx31(LinkedinIcon, { size: isDownMd ? 36 : 40 }),
|
|
5100
5190
|
name: "LinkedIn",
|
|
5101
5191
|
onClick: () => login("linkedin")
|
|
5102
5192
|
},
|
|
5103
5193
|
facebook: {
|
|
5104
|
-
icon: /* @__PURE__ */
|
|
5194
|
+
icon: /* @__PURE__ */ jsx31(FacebookIcon, { size: isDownMd ? 36 : 40 }),
|
|
5105
5195
|
name: "Facebook",
|
|
5106
5196
|
onClick: () => login("facebook")
|
|
5107
5197
|
},
|
|
5108
5198
|
youtube: {
|
|
5109
|
-
icon: /* @__PURE__ */
|
|
5199
|
+
icon: /* @__PURE__ */ jsx31(YoutubeIcon, { size: isDownMd ? 36 : 40 }),
|
|
5110
5200
|
name: "Youtube",
|
|
5111
5201
|
onClick: () => login("youtube")
|
|
5202
|
+
},
|
|
5203
|
+
kakao: {
|
|
5204
|
+
icon: /* @__PURE__ */ jsx31(KakaoIcon, { size: isDownMd ? 36 : 40 }),
|
|
5205
|
+
name: "Kakao",
|
|
5206
|
+
onClick: () => login("kakao")
|
|
5112
5207
|
}
|
|
5113
5208
|
};
|
|
5114
5209
|
const { walletMap } = useWalletConfig();
|
|
5115
5210
|
return /* @__PURE__ */ jsxs16(Fragment5, { children: [
|
|
5116
5211
|
(!inModal || !emailOpen) && /* @__PURE__ */ jsxs16("div", { className: "matchid-login-box", children: [
|
|
5117
|
-
/* @__PURE__ */
|
|
5118
|
-
return /* @__PURE__ */
|
|
5212
|
+
/* @__PURE__ */ jsx31("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
|
|
5213
|
+
return /* @__PURE__ */ jsx31(
|
|
5119
5214
|
RecommendItem,
|
|
5120
5215
|
{
|
|
5121
5216
|
icon: methodMap[m]?.icon,
|
|
@@ -5123,8 +5218,8 @@ function LoginBox({
|
|
|
5123
5218
|
onClick: methodMap[m]?.onClick,
|
|
5124
5219
|
showChildren: m == "wallet" && showWallet,
|
|
5125
5220
|
children: m == "wallet" && /* @__PURE__ */ jsxs16(Fragment5, { children: [
|
|
5126
|
-
/* @__PURE__ */
|
|
5127
|
-
/* @__PURE__ */
|
|
5221
|
+
/* @__PURE__ */ jsx31("div", { className: "matchid-login-recommend-wallet-divider" }),
|
|
5222
|
+
/* @__PURE__ */ jsx31("div", { className: "matchid-login-recommend-wallet-list", children: methodConfig.walletMethods.map((n) => {
|
|
5128
5223
|
const m2 = walletMap[n];
|
|
5129
5224
|
return /* @__PURE__ */ jsxs16(
|
|
5130
5225
|
"div",
|
|
@@ -5135,15 +5230,15 @@ function LoginBox({
|
|
|
5135
5230
|
},
|
|
5136
5231
|
children: [
|
|
5137
5232
|
/* @__PURE__ */ jsxs16("div", { className: "matchid-login-recommend-wallet-item-content", children: [
|
|
5138
|
-
/* @__PURE__ */
|
|
5139
|
-
/* @__PURE__ */
|
|
5233
|
+
/* @__PURE__ */ jsx31("div", { className: "matchid-login-recommend-wallet-item-icon", children: m2.icon }),
|
|
5234
|
+
/* @__PURE__ */ jsx31(
|
|
5140
5235
|
"div",
|
|
5141
5236
|
{
|
|
5142
5237
|
className: "matchid-login-recommend-wallet-item-hover-icon",
|
|
5143
5238
|
children: m2.activeIcon
|
|
5144
5239
|
}
|
|
5145
5240
|
),
|
|
5146
|
-
/* @__PURE__ */
|
|
5241
|
+
/* @__PURE__ */ jsx31(
|
|
5147
5242
|
"span",
|
|
5148
5243
|
{
|
|
5149
5244
|
className: "matchid-login-recommend-wallet-item-name",
|
|
@@ -5151,7 +5246,7 @@ function LoginBox({
|
|
|
5151
5246
|
}
|
|
5152
5247
|
)
|
|
5153
5248
|
] }),
|
|
5154
|
-
/* @__PURE__ */
|
|
5249
|
+
/* @__PURE__ */ jsx31(
|
|
5155
5250
|
ArrowRightIcon,
|
|
5156
5251
|
{
|
|
5157
5252
|
className: "matchid-login-recommend-wallet-item-arrow",
|
|
@@ -5169,10 +5264,48 @@ function LoginBox({
|
|
|
5169
5264
|
m
|
|
5170
5265
|
);
|
|
5171
5266
|
}) }),
|
|
5267
|
+
/* @__PURE__ */ jsxs16("div", { className: "matchid-privacy-policy", children: [
|
|
5268
|
+
/* @__PURE__ */ jsx31("div", { className: "matchid-privacy-policy-content", children: /* @__PURE__ */ jsx31(
|
|
5269
|
+
FormattedMessage7,
|
|
5270
|
+
{
|
|
5271
|
+
id: "loginAgreement",
|
|
5272
|
+
values: {
|
|
5273
|
+
termsLink: (chunks) => /* @__PURE__ */ jsx31(
|
|
5274
|
+
"a",
|
|
5275
|
+
{
|
|
5276
|
+
href: TERMS_OF_SERVICE_URL,
|
|
5277
|
+
target: "_blank",
|
|
5278
|
+
rel: "noopener noreferrer",
|
|
5279
|
+
className: "matchid-privacy-policy-content-link",
|
|
5280
|
+
children: chunks
|
|
5281
|
+
}
|
|
5282
|
+
),
|
|
5283
|
+
privacyLink: (chunks) => /* @__PURE__ */ jsx31(
|
|
5284
|
+
"a",
|
|
5285
|
+
{
|
|
5286
|
+
href: PRIVACY_POLICY_URL,
|
|
5287
|
+
target: "_blank",
|
|
5288
|
+
rel: "noopener noreferrer",
|
|
5289
|
+
className: "matchid-privacy-policy-content-link",
|
|
5290
|
+
children: chunks
|
|
5291
|
+
}
|
|
5292
|
+
)
|
|
5293
|
+
}
|
|
5294
|
+
}
|
|
5295
|
+
) }),
|
|
5296
|
+
/* @__PURE__ */ jsxs16("div", { className: "matchid-privacy-policy-powered-by", children: [
|
|
5297
|
+
/* @__PURE__ */ jsx31(FormattedMessage7, { id: "poweredBy" }),
|
|
5298
|
+
/* @__PURE__ */ jsx31(MatchIdIcon_default, {})
|
|
5299
|
+
] })
|
|
5300
|
+
] }),
|
|
5172
5301
|
methodConfig.methods.length > 0 && /* @__PURE__ */ jsxs16("div", { className: "matchid-login-other", children: [
|
|
5173
|
-
/* @__PURE__ */
|
|
5174
|
-
|
|
5175
|
-
|
|
5302
|
+
/* @__PURE__ */ jsxs16("div", { className: "matchid-login-other-line-box", children: [
|
|
5303
|
+
/* @__PURE__ */ jsx31("div", { className: "matchid-login-other-line" }),
|
|
5304
|
+
/* @__PURE__ */ jsx31("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ jsx31(FormattedMessage7, { id: "otherLoginMethods" }) }),
|
|
5305
|
+
/* @__PURE__ */ jsx31("div", { className: "matchid-login-other-line" })
|
|
5306
|
+
] }),
|
|
5307
|
+
/* @__PURE__ */ jsx31("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
|
|
5308
|
+
return /* @__PURE__ */ jsx31(
|
|
5176
5309
|
"div",
|
|
5177
5310
|
{
|
|
5178
5311
|
className: "matchid-login-method-item",
|
|
@@ -5185,7 +5318,7 @@ function LoginBox({
|
|
|
5185
5318
|
}) })
|
|
5186
5319
|
] })
|
|
5187
5320
|
] }),
|
|
5188
|
-
/* @__PURE__ */
|
|
5321
|
+
/* @__PURE__ */ jsx31(
|
|
5189
5322
|
EmailModal,
|
|
5190
5323
|
{
|
|
5191
5324
|
isOpen: emailOpen,
|
|
@@ -5205,7 +5338,7 @@ import { useState as useState22 } from "react";
|
|
|
5205
5338
|
|
|
5206
5339
|
// src/components/LoginPanel/index.tsx
|
|
5207
5340
|
import { FormattedMessage as FormattedMessage8 } from "react-intl";
|
|
5208
|
-
import { jsx as
|
|
5341
|
+
import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
5209
5342
|
function LoginPanel({
|
|
5210
5343
|
header,
|
|
5211
5344
|
onClose,
|
|
@@ -5215,30 +5348,30 @@ function LoginPanel({
|
|
|
5215
5348
|
return /* @__PURE__ */ jsxs17("div", { className: "matchid-login-panel", children: [
|
|
5216
5349
|
header ? header : /* @__PURE__ */ jsxs17("div", { className: "matchid-login-panel-header", children: [
|
|
5217
5350
|
/* @__PURE__ */ jsxs17("div", { className: "matchid-login-panel-header-content", children: [
|
|
5218
|
-
/* @__PURE__ */
|
|
5219
|
-
/* @__PURE__ */
|
|
5351
|
+
/* @__PURE__ */ jsx32("div", { className: "matchid-login-panel-header-title", children: /* @__PURE__ */ jsx32(FormattedMessage8, { id: "loginTitle" }) }),
|
|
5352
|
+
/* @__PURE__ */ jsx32("div", { className: "matchid-login-panel-header-subtilte", children: /* @__PURE__ */ jsx32(FormattedMessage8, { id: "loginTips" }) })
|
|
5220
5353
|
] }),
|
|
5221
|
-
onClose && /* @__PURE__ */
|
|
5354
|
+
onClose && /* @__PURE__ */ jsx32("div", { className: "matchid-login-panel-header-close", onClick: onClose, children: /* @__PURE__ */ jsx32(CloseRoundIcon, { size: isDownMd ? 24 : 30 }) })
|
|
5222
5355
|
] }),
|
|
5223
|
-
/* @__PURE__ */
|
|
5224
|
-
/* @__PURE__ */
|
|
5356
|
+
/* @__PURE__ */ jsx32("div", { className: "matchid-login-panel-divide" }),
|
|
5357
|
+
/* @__PURE__ */ jsx32("div", { className: "matchid-login-panel-box", children: /* @__PURE__ */ jsx32(LoginBox, { ...props }) })
|
|
5225
5358
|
] });
|
|
5226
5359
|
}
|
|
5227
5360
|
|
|
5228
5361
|
// src/components/LoginModal/index.tsx
|
|
5229
|
-
import { jsx as
|
|
5362
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
5230
5363
|
function LoginModal({
|
|
5231
5364
|
isOpen = false,
|
|
5232
5365
|
width = 480,
|
|
5233
5366
|
...props
|
|
5234
5367
|
}) {
|
|
5235
5368
|
const { isLogin } = useUserInfo();
|
|
5236
|
-
return /* @__PURE__ */
|
|
5369
|
+
return /* @__PURE__ */ jsx33(
|
|
5237
5370
|
Modal,
|
|
5238
5371
|
{
|
|
5239
5372
|
isOpen: isOpen && !isLogin,
|
|
5240
5373
|
width,
|
|
5241
|
-
children: /* @__PURE__ */
|
|
5374
|
+
children: /* @__PURE__ */ jsx33(LoginPanel, { ...props, inModal: true })
|
|
5242
5375
|
}
|
|
5243
5376
|
);
|
|
5244
5377
|
}
|
|
@@ -5247,10 +5380,10 @@ function LoginModal({
|
|
|
5247
5380
|
import { useState as useState21 } from "react";
|
|
5248
5381
|
|
|
5249
5382
|
// src/assets/icon/ProfileIcon.tsx
|
|
5250
|
-
import { jsx as
|
|
5383
|
+
import { jsx as jsx34, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
5251
5384
|
function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
5252
5385
|
return /* @__PURE__ */ jsxs18("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
5253
|
-
/* @__PURE__ */
|
|
5386
|
+
/* @__PURE__ */ jsx34(
|
|
5254
5387
|
"path",
|
|
5255
5388
|
{
|
|
5256
5389
|
fillRule: "evenodd",
|
|
@@ -5259,7 +5392,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
5259
5392
|
fill: color
|
|
5260
5393
|
}
|
|
5261
5394
|
),
|
|
5262
|
-
/* @__PURE__ */
|
|
5395
|
+
/* @__PURE__ */ jsx34(
|
|
5263
5396
|
"path",
|
|
5264
5397
|
{
|
|
5265
5398
|
fillRule: "evenodd",
|
|
@@ -5273,7 +5406,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
5273
5406
|
|
|
5274
5407
|
// src/components/UserPopover/index.tsx
|
|
5275
5408
|
import { FormattedMessage as FormattedMessage9, useIntl as useIntl10 } from "react-intl";
|
|
5276
|
-
import { jsx as
|
|
5409
|
+
import { jsx as jsx35, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
5277
5410
|
function UserContent() {
|
|
5278
5411
|
const { logout, address, username } = useUserInfo();
|
|
5279
5412
|
const [logouting, setLogouting] = useState21(false);
|
|
@@ -5297,31 +5430,31 @@ function UserContent() {
|
|
|
5297
5430
|
return /* @__PURE__ */ jsxs19("div", { className: "matchid-user-popover-item", onClick, children: [
|
|
5298
5431
|
/* @__PURE__ */ jsxs19("div", { className: `matchid-user-popover-item-content`, children: [
|
|
5299
5432
|
icon,
|
|
5300
|
-
/* @__PURE__ */
|
|
5433
|
+
/* @__PURE__ */ jsx35("div", { className: "matchid-user-popover-item-text", children })
|
|
5301
5434
|
] }),
|
|
5302
5435
|
rightIcon
|
|
5303
5436
|
] });
|
|
5304
5437
|
};
|
|
5305
5438
|
const UserDivider = () => {
|
|
5306
|
-
return /* @__PURE__ */
|
|
5439
|
+
return /* @__PURE__ */ jsx35("div", { className: `matchid-user-popover-divider` });
|
|
5307
5440
|
};
|
|
5308
5441
|
const [usernameOpen, setUsernameOpen] = useState21(false);
|
|
5309
5442
|
const [copied, setCopied] = useCopyClipboard();
|
|
5310
5443
|
const intl = useIntl10();
|
|
5311
5444
|
return /* @__PURE__ */ jsxs19("div", { className: "matchid-user-popover-content", children: [
|
|
5312
5445
|
/* @__PURE__ */ jsxs19("div", { className: "matchid-user-popover-list", children: [
|
|
5313
|
-
/* @__PURE__ */
|
|
5446
|
+
/* @__PURE__ */ jsx35(UserItem, { onClick: () => {
|
|
5314
5447
|
setCopied(address);
|
|
5315
|
-
}, icon: copied ? /* @__PURE__ */
|
|
5316
|
-
/* @__PURE__ */
|
|
5317
|
-
/* @__PURE__ */
|
|
5448
|
+
}, icon: copied ? /* @__PURE__ */ jsx35(CheckIcon, { size: 20, color: "#0ecb81" }) : /* @__PURE__ */ jsx35(CopyIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ jsx35(CheckIcon, { size: 20, color: "var(--icon-color)" }), children: truncateAddress(address) }),
|
|
5449
|
+
/* @__PURE__ */ jsx35(UserDivider, {}),
|
|
5450
|
+
/* @__PURE__ */ jsx35(UserItem, { onClick: () => {
|
|
5318
5451
|
setUsernameOpen(true);
|
|
5319
|
-
}, icon: /* @__PURE__ */
|
|
5452
|
+
}, icon: /* @__PURE__ */ jsx35(ProfileIcon, { size: 20, color: "var(--icon-color)" }), rightIcon: /* @__PURE__ */ jsx35(ArrowRightIcon, { size: 20, color: "var(--icon-color)" }), children: username || intl.formatMessage({
|
|
5320
5453
|
id: "setUsername"
|
|
5321
5454
|
}) })
|
|
5322
5455
|
] }),
|
|
5323
|
-
/* @__PURE__ */
|
|
5324
|
-
/* @__PURE__ */
|
|
5456
|
+
/* @__PURE__ */ jsx35(Button, { onClick: onLogout, loading: logouting, children: /* @__PURE__ */ jsx35(FormattedMessage9, { id: "disconnect" }) }),
|
|
5457
|
+
/* @__PURE__ */ jsx35(UsernameModal, { isOpen: usernameOpen, onClose: () => {
|
|
5325
5458
|
setUsernameOpen(false);
|
|
5326
5459
|
}, onSuccess: () => {
|
|
5327
5460
|
setUsernameOpen(false);
|
|
@@ -5332,12 +5465,12 @@ function UserPopover({
|
|
|
5332
5465
|
children,
|
|
5333
5466
|
...props
|
|
5334
5467
|
}) {
|
|
5335
|
-
return /* @__PURE__ */
|
|
5468
|
+
return /* @__PURE__ */ jsx35(Popover, { ...props, content: /* @__PURE__ */ jsx35(UserContent, {}), children });
|
|
5336
5469
|
}
|
|
5337
5470
|
|
|
5338
5471
|
// src/components/LoginButton/index.tsx
|
|
5339
5472
|
import { FormattedMessage as FormattedMessage10, useIntl as useIntl11 } from "react-intl";
|
|
5340
|
-
import { Fragment as Fragment6, jsx as
|
|
5473
|
+
import { Fragment as Fragment6, jsx as jsx36, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5341
5474
|
function LoginButton({
|
|
5342
5475
|
loginRender,
|
|
5343
5476
|
methods,
|
|
@@ -5354,7 +5487,7 @@ function LoginButton({
|
|
|
5354
5487
|
const [loginOpen, setLoginOpen] = useState22(false);
|
|
5355
5488
|
if (!isLogin) {
|
|
5356
5489
|
return /* @__PURE__ */ jsxs20(Fragment6, { children: [
|
|
5357
|
-
/* @__PURE__ */
|
|
5490
|
+
/* @__PURE__ */ jsx36(
|
|
5358
5491
|
LoginModal,
|
|
5359
5492
|
{
|
|
5360
5493
|
methods,
|
|
@@ -5365,14 +5498,14 @@ function LoginButton({
|
|
|
5365
5498
|
}
|
|
5366
5499
|
),
|
|
5367
5500
|
/* @__PURE__ */ jsxs20(Button, { className: "matchid-unlogin-btn", ...props, highlight: true, onClick: () => setLoginOpen(true), children: [
|
|
5368
|
-
/* @__PURE__ */
|
|
5369
|
-
/* @__PURE__ */
|
|
5501
|
+
/* @__PURE__ */ jsx36(UnLoginIcon_default, {}),
|
|
5502
|
+
/* @__PURE__ */ jsx36("span", { children: /* @__PURE__ */ jsx36(FormattedMessage10, { id: "login" }) })
|
|
5370
5503
|
] })
|
|
5371
5504
|
] });
|
|
5372
5505
|
}
|
|
5373
|
-
return loginRender ? /* @__PURE__ */
|
|
5374
|
-
/* @__PURE__ */
|
|
5375
|
-
/* @__PURE__ */
|
|
5506
|
+
return loginRender ? /* @__PURE__ */ jsx36(Fragment6, { children: loginRender }) : /* @__PURE__ */ jsx36(UserPopover, { position: popoverPosition, type: popoverType, gap: popoverGap, children: /* @__PURE__ */ jsxs20(Button, { onClick: onLoginClick, className: "matchid-login-btn", ...props, children: [
|
|
5507
|
+
/* @__PURE__ */ jsx36(LoginIcon_default, {}),
|
|
5508
|
+
/* @__PURE__ */ jsx36("span", { children: username ? truncateAddress(username) : "MatchID " + intl.formatMessage({
|
|
5376
5509
|
id: "user"
|
|
5377
5510
|
}) })
|
|
5378
5511
|
] }) });
|
|
@@ -5381,15 +5514,15 @@ function LoginButton({
|
|
|
5381
5514
|
// src/components/UsernameModal/index.tsx
|
|
5382
5515
|
import { useEffect as useEffect22, useMemo as useMemo11, useState as useState23 } from "react";
|
|
5383
5516
|
import { FormattedMessage as FormattedMessage11, useIntl as useIntl12 } from "react-intl";
|
|
5384
|
-
import { jsx as
|
|
5517
|
+
import { jsx as jsx37, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5385
5518
|
var ValidItem = ({
|
|
5386
5519
|
success = false,
|
|
5387
5520
|
text
|
|
5388
5521
|
}) => {
|
|
5389
5522
|
const isDownMd = useDownMd();
|
|
5390
5523
|
return /* @__PURE__ */ jsxs21("div", { className: `matchid-valid-status-item matchid-valid-status-${success ? "success" : "error"}`, children: [
|
|
5391
|
-
success ? /* @__PURE__ */
|
|
5392
|
-
/* @__PURE__ */
|
|
5524
|
+
success ? /* @__PURE__ */ jsx37(CheckRoundIcon, { size: isDownMd ? 12 : 16 }) : /* @__PURE__ */ jsx37(InfoLineIcon, { size: isDownMd ? 12 : 16 }),
|
|
5525
|
+
/* @__PURE__ */ jsx37("span", { children: text })
|
|
5393
5526
|
] });
|
|
5394
5527
|
};
|
|
5395
5528
|
function UsernameModal({
|
|
@@ -5437,12 +5570,12 @@ function UsernameModal({
|
|
|
5437
5570
|
}
|
|
5438
5571
|
};
|
|
5439
5572
|
const intl = useIntl12();
|
|
5440
|
-
return /* @__PURE__ */
|
|
5573
|
+
return /* @__PURE__ */ jsx37(ModalWithHeader, { isOpen: isOpen && isLogin, ...props, title: title || intl.formatMessage({
|
|
5441
5574
|
id: username ? "editUsernameTitle" : "setUsernameTitle"
|
|
5442
5575
|
}), children: /* @__PURE__ */ jsxs21("div", { className: "matchid-username-box", children: [
|
|
5443
|
-
/* @__PURE__ */
|
|
5576
|
+
/* @__PURE__ */ jsx37(Field, { label: intl.formatMessage({
|
|
5444
5577
|
id: "username"
|
|
5445
|
-
}), error, children: /* @__PURE__ */
|
|
5578
|
+
}), error, children: /* @__PURE__ */ jsx37(
|
|
5446
5579
|
Input,
|
|
5447
5580
|
{
|
|
5448
5581
|
placeholder: intl.formatMessage({
|
|
@@ -5456,7 +5589,7 @@ function UsernameModal({
|
|
|
5456
5589
|
}
|
|
5457
5590
|
) }),
|
|
5458
5591
|
/* @__PURE__ */ jsxs21("div", { className: "matchid-valid", children: [
|
|
5459
|
-
/* @__PURE__ */
|
|
5592
|
+
/* @__PURE__ */ jsx37(
|
|
5460
5593
|
ValidItem,
|
|
5461
5594
|
{
|
|
5462
5595
|
success: isValid,
|
|
@@ -5465,16 +5598,16 @@ function UsernameModal({
|
|
|
5465
5598
|
})
|
|
5466
5599
|
}
|
|
5467
5600
|
),
|
|
5468
|
-
/* @__PURE__ */
|
|
5601
|
+
/* @__PURE__ */ jsx37(ValidItem, { success: isLength, text: intl.formatMessage({
|
|
5469
5602
|
id: "usernameLengthError"
|
|
5470
5603
|
}) })
|
|
5471
5604
|
] }),
|
|
5472
|
-
/* @__PURE__ */
|
|
5605
|
+
/* @__PURE__ */ jsx37(Button, { disabled: !isSafe, loading: isSubmitting, style: {
|
|
5473
5606
|
marginTop: isDownMd ? "36px" : "64px"
|
|
5474
|
-
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */
|
|
5475
|
-
/* @__PURE__ */
|
|
5607
|
+
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ jsx37(FormattedMessage11, { id: "confirm" }) }),
|
|
5608
|
+
/* @__PURE__ */ jsx37(Button, { style: {
|
|
5476
5609
|
marginTop: isDownMd ? "12px" : "24px"
|
|
5477
|
-
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */
|
|
5610
|
+
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ jsx37(FormattedMessage11, { id: "cancel" }) })
|
|
5478
5611
|
] }) });
|
|
5479
5612
|
}
|
|
5480
5613
|
|
|
@@ -5493,7 +5626,7 @@ var walletConnectImage = wallet_default;
|
|
|
5493
5626
|
var walletSigningImage = signing_default;
|
|
5494
5627
|
|
|
5495
5628
|
// src/components/WalletModalContent/index.tsx
|
|
5496
|
-
import { jsx as
|
|
5629
|
+
import { jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5497
5630
|
function WalletModalContent({
|
|
5498
5631
|
status,
|
|
5499
5632
|
error,
|
|
@@ -5563,15 +5696,15 @@ function WalletModalContent({
|
|
|
5563
5696
|
statusImage: walletConnectImage
|
|
5564
5697
|
};
|
|
5565
5698
|
}, [visible, connected, status, error, address]);
|
|
5566
|
-
return /* @__PURE__ */
|
|
5699
|
+
return /* @__PURE__ */ jsx38("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ jsxs22("div", { className: `matchid-wallet-box`, children: [
|
|
5567
5700
|
/* @__PURE__ */ jsxs22("div", { className: `matchid-wallet-content`, children: [
|
|
5568
|
-
/* @__PURE__ */
|
|
5701
|
+
/* @__PURE__ */ jsx38(Lottie_default, { animationData: pageData.statusImage, style: {
|
|
5569
5702
|
width: 128,
|
|
5570
5703
|
height: 128
|
|
5571
5704
|
} }),
|
|
5572
|
-
/* @__PURE__ */
|
|
5705
|
+
/* @__PURE__ */ jsx38("div", { className: pageData.isError ? "matchid-error" : "", children: pageData.text })
|
|
5573
5706
|
] }),
|
|
5574
|
-
/* @__PURE__ */
|
|
5707
|
+
/* @__PURE__ */ jsx38(
|
|
5575
5708
|
Button,
|
|
5576
5709
|
{
|
|
5577
5710
|
block: true,
|
|
@@ -5647,15 +5780,15 @@ function WalletModalContentV2(props) {
|
|
|
5647
5780
|
statusImage: walletConnectImage
|
|
5648
5781
|
};
|
|
5649
5782
|
}, [props, submitting]);
|
|
5650
|
-
return /* @__PURE__ */
|
|
5783
|
+
return /* @__PURE__ */ jsx38("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ jsxs22("div", { className: `matchid-wallet-box`, children: [
|
|
5651
5784
|
/* @__PURE__ */ jsxs22("div", { className: `matchid-wallet-content`, children: [
|
|
5652
|
-
/* @__PURE__ */
|
|
5785
|
+
/* @__PURE__ */ jsx38(Lottie_default, { animationData: pageData.statusImage, style: {
|
|
5653
5786
|
width: 128,
|
|
5654
5787
|
height: 128
|
|
5655
5788
|
} }),
|
|
5656
|
-
/* @__PURE__ */
|
|
5789
|
+
/* @__PURE__ */ jsx38("div", { className: props.status == "error" ? "matchid-error" : "", children: pageData.text })
|
|
5657
5790
|
] }),
|
|
5658
|
-
/* @__PURE__ */
|
|
5791
|
+
/* @__PURE__ */ jsx38(
|
|
5659
5792
|
Button,
|
|
5660
5793
|
{
|
|
5661
5794
|
block: true,
|
|
@@ -5719,7 +5852,7 @@ import { useWalletClient } from "wagmi";
|
|
|
5719
5852
|
import { providers } from "ethers";
|
|
5720
5853
|
|
|
5721
5854
|
// node_modules/@wagmi/core/dist/esm/version.js
|
|
5722
|
-
var version = "2.
|
|
5855
|
+
var version = "2.17.1";
|
|
5723
5856
|
|
|
5724
5857
|
// node_modules/@wagmi/core/dist/esm/utils/getVersion.js
|
|
5725
5858
|
var getVersion2 = () => `@wagmi/core@${version}`;
|
|
@@ -5937,7 +6070,7 @@ async function getEthersSigner(config, { chainId } = {}) {
|
|
|
5937
6070
|
// src/components/EVMModal/index.tsx
|
|
5938
6071
|
import { SiweMessage } from "siwe";
|
|
5939
6072
|
import "@rainbow-me/rainbowkit/styles.css";
|
|
5940
|
-
import { jsx as
|
|
6073
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
5941
6074
|
function WalletContent({
|
|
5942
6075
|
onSuccess,
|
|
5943
6076
|
type
|
|
@@ -6095,7 +6228,7 @@ function WalletContent({
|
|
|
6095
6228
|
setNonce(void 0);
|
|
6096
6229
|
setStatus("start");
|
|
6097
6230
|
};
|
|
6098
|
-
return /* @__PURE__ */
|
|
6231
|
+
return /* @__PURE__ */ jsx39(
|
|
6099
6232
|
WalletModalContentV2,
|
|
6100
6233
|
{
|
|
6101
6234
|
status,
|
|
@@ -6113,14 +6246,14 @@ function EVMConnectModal({
|
|
|
6113
6246
|
...props
|
|
6114
6247
|
}) {
|
|
6115
6248
|
const intl = useIntl13();
|
|
6116
|
-
return /* @__PURE__ */
|
|
6249
|
+
return /* @__PURE__ */ jsx39(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
6117
6250
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
6118
6251
|
}, {
|
|
6119
6252
|
name: "EVM"
|
|
6120
|
-
}), children: /* @__PURE__ */
|
|
6253
|
+
}), children: /* @__PURE__ */ jsx39(WalletContent, { onSuccess, type }) });
|
|
6121
6254
|
}
|
|
6122
6255
|
function EVMModal(props) {
|
|
6123
|
-
return props.isOpen && /* @__PURE__ */
|
|
6256
|
+
return props.isOpen && /* @__PURE__ */ jsx39(RainbowKitProvider2, { children: /* @__PURE__ */ jsx39(EVMConnectModal, { ...props }) });
|
|
6124
6257
|
}
|
|
6125
6258
|
|
|
6126
6259
|
// src/components/TRONModal/index.tsx
|
|
@@ -6235,7 +6368,7 @@ var useTRONWallet = () => {
|
|
|
6235
6368
|
};
|
|
6236
6369
|
|
|
6237
6370
|
// src/components/TRONModal/index.tsx
|
|
6238
|
-
import { jsx as
|
|
6371
|
+
import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6239
6372
|
function TRONConnectModal({
|
|
6240
6373
|
type = "login",
|
|
6241
6374
|
onSuccess,
|
|
@@ -6245,9 +6378,9 @@ function TRONConnectModal({
|
|
|
6245
6378
|
const intl = useIntl14();
|
|
6246
6379
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useTRONWallet();
|
|
6247
6380
|
const iconMaps = {
|
|
6248
|
-
tronlink: /* @__PURE__ */
|
|
6249
|
-
bitget: /* @__PURE__ */
|
|
6250
|
-
okx: /* @__PURE__ */
|
|
6381
|
+
tronlink: /* @__PURE__ */ jsx40(TronLinkIcon, { size: isDownMd ? 36 : 40 }),
|
|
6382
|
+
bitget: /* @__PURE__ */ jsx40(BitgetIcon, { size: isDownMd ? 36 : 40 }),
|
|
6383
|
+
okx: /* @__PURE__ */ jsx40(OKXIcon, { size: isDownMd ? 36 : 40 })
|
|
6251
6384
|
};
|
|
6252
6385
|
const { events, login } = useMatch();
|
|
6253
6386
|
const [status, setStatus] = useState28("");
|
|
@@ -6339,11 +6472,11 @@ function TRONConnectModal({
|
|
|
6339
6472
|
disconnect();
|
|
6340
6473
|
}
|
|
6341
6474
|
}, [props.isOpen]);
|
|
6342
|
-
return /* @__PURE__ */
|
|
6475
|
+
return /* @__PURE__ */ jsx40(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
6343
6476
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
6344
6477
|
}, {
|
|
6345
6478
|
name: "TRON"
|
|
6346
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */
|
|
6479
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ jsx40(
|
|
6347
6480
|
WalletModalContent,
|
|
6348
6481
|
{
|
|
6349
6482
|
error,
|
|
@@ -6356,9 +6489,9 @@ function TRONConnectModal({
|
|
|
6356
6489
|
setVisible: () => {
|
|
6357
6490
|
}
|
|
6358
6491
|
}
|
|
6359
|
-
) : /* @__PURE__ */
|
|
6492
|
+
) : /* @__PURE__ */ jsx40("div", { className: "matchid-login-box", children: /* @__PURE__ */ jsxs23("div", { className: "matchid-login-recommend-list", children: [
|
|
6360
6493
|
installedWallets.map((wallet2) => {
|
|
6361
|
-
return /* @__PURE__ */
|
|
6494
|
+
return /* @__PURE__ */ jsx40(
|
|
6362
6495
|
RecommendItem,
|
|
6363
6496
|
{
|
|
6364
6497
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -6371,14 +6504,14 @@ function TRONConnectModal({
|
|
|
6371
6504
|
);
|
|
6372
6505
|
}),
|
|
6373
6506
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
6374
|
-
return /* @__PURE__ */
|
|
6507
|
+
return /* @__PURE__ */ jsx40(
|
|
6375
6508
|
RecommendItem,
|
|
6376
6509
|
{
|
|
6377
6510
|
icon: iconMaps[wallet2.walletKey],
|
|
6378
6511
|
name: wallet2.name,
|
|
6379
6512
|
onClick: () => {
|
|
6380
6513
|
},
|
|
6381
|
-
footer: /* @__PURE__ */
|
|
6514
|
+
footer: /* @__PURE__ */ jsx40(Button, { size: "sm", onClick: () => {
|
|
6382
6515
|
window.open(wallet2.website);
|
|
6383
6516
|
}, children: "Install" })
|
|
6384
6517
|
},
|
|
@@ -6388,7 +6521,7 @@ function TRONConnectModal({
|
|
|
6388
6521
|
] }) }) });
|
|
6389
6522
|
}
|
|
6390
6523
|
function TRONModal(props) {
|
|
6391
|
-
return props.isOpen && /* @__PURE__ */
|
|
6524
|
+
return props.isOpen && /* @__PURE__ */ jsx40(TRONConnectModal, { ...props, type: props.type });
|
|
6392
6525
|
}
|
|
6393
6526
|
|
|
6394
6527
|
// src/components/TONModal/index.tsx
|
|
@@ -6401,7 +6534,7 @@ import {
|
|
|
6401
6534
|
useTonConnectUI,
|
|
6402
6535
|
useTonWallet
|
|
6403
6536
|
} from "@tonconnect/ui-react";
|
|
6404
|
-
import { jsx as
|
|
6537
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
6405
6538
|
function WalletContent2({
|
|
6406
6539
|
onSuccess,
|
|
6407
6540
|
type
|
|
@@ -6528,7 +6661,7 @@ function WalletContent2({
|
|
|
6528
6661
|
}
|
|
6529
6662
|
}
|
|
6530
6663
|
}, [state]);
|
|
6531
|
-
return /* @__PURE__ */
|
|
6664
|
+
return /* @__PURE__ */ jsx41(
|
|
6532
6665
|
WalletModalContent,
|
|
6533
6666
|
{
|
|
6534
6667
|
connected,
|
|
@@ -6562,20 +6695,20 @@ function TONConnectModal({
|
|
|
6562
6695
|
const intl = useIntl15();
|
|
6563
6696
|
const { endpoints, appid } = useLocalStore_default();
|
|
6564
6697
|
const manifestUrl = `${endpoints.back}api/v1/wallet/ton?appid=${appid}&url=` + encodeURIComponent(window.location.origin);
|
|
6565
|
-
return /* @__PURE__ */
|
|
6698
|
+
return /* @__PURE__ */ jsx41(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
6566
6699
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
6567
6700
|
}, {
|
|
6568
6701
|
name: "TON"
|
|
6569
|
-
}), children: /* @__PURE__ */
|
|
6702
|
+
}), children: /* @__PURE__ */ jsx41(
|
|
6570
6703
|
TonConnectUIProvider,
|
|
6571
6704
|
{
|
|
6572
6705
|
manifestUrl,
|
|
6573
|
-
children: /* @__PURE__ */
|
|
6706
|
+
children: /* @__PURE__ */ jsx41(WalletContent2, { onSuccess, type })
|
|
6574
6707
|
}
|
|
6575
6708
|
) });
|
|
6576
6709
|
}
|
|
6577
6710
|
function TONModal(props) {
|
|
6578
|
-
return props.isOpen && /* @__PURE__ */
|
|
6711
|
+
return props.isOpen && /* @__PURE__ */ jsx41(TONConnectModal, { ...props });
|
|
6579
6712
|
}
|
|
6580
6713
|
|
|
6581
6714
|
// src/components/BTCModal/index.tsx
|
|
@@ -6804,7 +6937,7 @@ var useBTCWallet = () => {
|
|
|
6804
6937
|
};
|
|
6805
6938
|
|
|
6806
6939
|
// src/components/BTCModal/index.tsx
|
|
6807
|
-
import { jsx as
|
|
6940
|
+
import { jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6808
6941
|
function BTCConnectModal({
|
|
6809
6942
|
type = "login",
|
|
6810
6943
|
onSuccess,
|
|
@@ -6814,10 +6947,10 @@ function BTCConnectModal({
|
|
|
6814
6947
|
const intl = useIntl16();
|
|
6815
6948
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useBTCWallet();
|
|
6816
6949
|
const iconMaps = {
|
|
6817
|
-
leather: /* @__PURE__ */
|
|
6818
|
-
unisat: /* @__PURE__ */
|
|
6819
|
-
xverse: /* @__PURE__ */
|
|
6820
|
-
phantom: /* @__PURE__ */
|
|
6950
|
+
leather: /* @__PURE__ */ jsx42(LeatherIcon, { size: isDownMd ? 36 : 40 }),
|
|
6951
|
+
unisat: /* @__PURE__ */ jsx42(UnisatIcon, { size: isDownMd ? 36 : 40 }),
|
|
6952
|
+
xverse: /* @__PURE__ */ jsx42(XverseIcon, { size: isDownMd ? 36 : 40 }),
|
|
6953
|
+
phantom: /* @__PURE__ */ jsx42(PhantomIcon, { size: isDownMd ? 36 : 40 })
|
|
6821
6954
|
};
|
|
6822
6955
|
const { events, login } = useMatch();
|
|
6823
6956
|
const [status, setStatus] = useState31("");
|
|
@@ -6917,11 +7050,11 @@ function BTCConnectModal({
|
|
|
6917
7050
|
statusRef.current = "";
|
|
6918
7051
|
setError("");
|
|
6919
7052
|
};
|
|
6920
|
-
return /* @__PURE__ */
|
|
7053
|
+
return /* @__PURE__ */ jsx42(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
6921
7054
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
6922
7055
|
}, {
|
|
6923
7056
|
name: "BTC"
|
|
6924
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */
|
|
7057
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ jsx42(
|
|
6925
7058
|
WalletModalContent,
|
|
6926
7059
|
{
|
|
6927
7060
|
error,
|
|
@@ -6934,9 +7067,9 @@ function BTCConnectModal({
|
|
|
6934
7067
|
setVisible: () => {
|
|
6935
7068
|
}
|
|
6936
7069
|
}
|
|
6937
|
-
) : /* @__PURE__ */
|
|
7070
|
+
) : /* @__PURE__ */ jsx42("div", { className: "matchid-login-box", children: /* @__PURE__ */ jsxs24("div", { className: "matchid-login-recommend-list", children: [
|
|
6938
7071
|
installedWallets.map((wallet2) => {
|
|
6939
|
-
return /* @__PURE__ */
|
|
7072
|
+
return /* @__PURE__ */ jsx42(
|
|
6940
7073
|
RecommendItem,
|
|
6941
7074
|
{
|
|
6942
7075
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -6949,14 +7082,14 @@ function BTCConnectModal({
|
|
|
6949
7082
|
);
|
|
6950
7083
|
}),
|
|
6951
7084
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
6952
|
-
return /* @__PURE__ */
|
|
7085
|
+
return /* @__PURE__ */ jsx42(
|
|
6953
7086
|
RecommendItem,
|
|
6954
7087
|
{
|
|
6955
7088
|
icon: iconMaps[wallet2.walletKey],
|
|
6956
7089
|
name: wallet2.name,
|
|
6957
7090
|
onClick: () => {
|
|
6958
7091
|
},
|
|
6959
|
-
footer: /* @__PURE__ */
|
|
7092
|
+
footer: /* @__PURE__ */ jsx42(Button, { size: "sm", onClick: () => {
|
|
6960
7093
|
window.open(wallet2.website);
|
|
6961
7094
|
}, children: "Install" })
|
|
6962
7095
|
},
|
|
@@ -6966,13 +7099,13 @@ function BTCConnectModal({
|
|
|
6966
7099
|
] }) }) });
|
|
6967
7100
|
}
|
|
6968
7101
|
function BTCModal(props) {
|
|
6969
|
-
return props.isOpen && /* @__PURE__ */
|
|
7102
|
+
return props.isOpen && /* @__PURE__ */ jsx42(BTCConnectModal, { ...props });
|
|
6970
7103
|
}
|
|
6971
7104
|
|
|
6972
7105
|
// src/components/WalletModal/index.tsx
|
|
6973
7106
|
import { useMemo as useMemo16 } from "react";
|
|
6974
7107
|
import { useIntl as useIntl17 } from "react-intl";
|
|
6975
|
-
import { jsx as
|
|
7108
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
6976
7109
|
function WalletConnectModal({
|
|
6977
7110
|
type,
|
|
6978
7111
|
methods: _methods,
|
|
@@ -6990,13 +7123,13 @@ function WalletConnectModal({
|
|
|
6990
7123
|
const platform = config.platform.map((p) => p.toLowerCase());
|
|
6991
7124
|
return WALLET_METHODS.filter((m) => platform.includes(m));
|
|
6992
7125
|
}, [config.platform, _methods]);
|
|
6993
|
-
return /* @__PURE__ */
|
|
7126
|
+
return /* @__PURE__ */ jsx43(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
6994
7127
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
6995
7128
|
}, {
|
|
6996
7129
|
name: ""
|
|
6997
|
-
}), children: /* @__PURE__ */
|
|
7130
|
+
}), children: /* @__PURE__ */ jsx43("div", { className: "matchid-login-box", children: /* @__PURE__ */ jsx43("div", { className: "matchid-login-recommend-list", children: methods.map((method, index) => {
|
|
6998
7131
|
const m = walletMap[method];
|
|
6999
|
-
return /* @__PURE__ */
|
|
7132
|
+
return /* @__PURE__ */ jsx43(
|
|
7000
7133
|
RecommendItem,
|
|
7001
7134
|
{
|
|
7002
7135
|
icon: m?.icon,
|
|
@@ -7010,12 +7143,12 @@ function WalletConnectModal({
|
|
|
7010
7143
|
}) }) }) });
|
|
7011
7144
|
}
|
|
7012
7145
|
function WalletModal(props) {
|
|
7013
|
-
return props.isOpen && /* @__PURE__ */
|
|
7146
|
+
return props.isOpen && /* @__PURE__ */ jsx43(WalletConnectModal, { ...props });
|
|
7014
7147
|
}
|
|
7015
7148
|
|
|
7016
7149
|
// src/components/AlphaAvatar/index.tsx
|
|
7017
7150
|
import { useEffect as useEffect30, useState as useState32 } from "react";
|
|
7018
|
-
import { jsx as
|
|
7151
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
7019
7152
|
function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
7020
7153
|
const [avatar, setAvatar] = useState32(void 0);
|
|
7021
7154
|
useEffect30(() => {
|
|
@@ -7024,7 +7157,7 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
|
7024
7157
|
setAvatar(char);
|
|
7025
7158
|
}
|
|
7026
7159
|
}, [name]);
|
|
7027
|
-
return /* @__PURE__ */
|
|
7160
|
+
return /* @__PURE__ */ jsx44("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
7028
7161
|
width: size,
|
|
7029
7162
|
height: size,
|
|
7030
7163
|
fontSize: Math.ceil(size / 2)
|
|
@@ -7032,7 +7165,7 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
|
7032
7165
|
}
|
|
7033
7166
|
|
|
7034
7167
|
// src/components/WalletAsset/index.tsx
|
|
7035
|
-
import { jsx as
|
|
7168
|
+
import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
7036
7169
|
function WalletAsset({
|
|
7037
7170
|
onAssetClick,
|
|
7038
7171
|
matchWalletAssetsOptions
|
|
@@ -7042,7 +7175,7 @@ function WalletAsset({
|
|
|
7042
7175
|
list: walletAssets.mergedAssets
|
|
7043
7176
|
});
|
|
7044
7177
|
const { list } = useMatchChain();
|
|
7045
|
-
return /* @__PURE__ */
|
|
7178
|
+
return /* @__PURE__ */ jsx45("div", { className: "matchid-wallet-asset-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
7046
7179
|
const clickFunc = onAssetClick && onAssetClick(n);
|
|
7047
7180
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
7048
7181
|
const getFooterColor = () => {
|
|
@@ -7061,7 +7194,7 @@ function WalletAsset({
|
|
|
7061
7194
|
cursor: clickFunc ? "pointer" : "default"
|
|
7062
7195
|
}, children: [
|
|
7063
7196
|
/* @__PURE__ */ jsxs25("div", { className: "matchid-wallet-asset-logo", title: n.symbol || n.name || "", children: [
|
|
7064
|
-
n.icon ? /* @__PURE__ */
|
|
7197
|
+
n.icon ? /* @__PURE__ */ jsx45("img", { src: n.icon, alt: n.symbol, className: `matchid-wallet-asset-icon` }) : /* @__PURE__ */ jsx45(
|
|
7065
7198
|
AlphaAvatar2,
|
|
7066
7199
|
{
|
|
7067
7200
|
className: `matchid-wallet-asset-icon`,
|
|
@@ -7069,12 +7202,12 @@ function WalletAsset({
|
|
|
7069
7202
|
name: n.symbol || n.name || ""
|
|
7070
7203
|
}
|
|
7071
7204
|
),
|
|
7072
|
-
chain?.iconUrl && /* @__PURE__ */
|
|
7205
|
+
chain?.iconUrl && /* @__PURE__ */ jsx45("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-wallet-asset-chain` })
|
|
7073
7206
|
] }),
|
|
7074
7207
|
/* @__PURE__ */ jsxs25("div", { className: `matchid-wallet-asset-info`, children: [
|
|
7075
|
-
/* @__PURE__ */
|
|
7208
|
+
/* @__PURE__ */ jsx45("div", { className: `matchid-wallet-asset-name`, children: n.symbol }),
|
|
7076
7209
|
"price" in n && /* @__PURE__ */ jsxs25("div", { className: `matchid-wallet-asset-content`, children: [
|
|
7077
|
-
/* @__PURE__ */
|
|
7210
|
+
/* @__PURE__ */ jsx45("div", { className: "matchid-wallet-asset-price", children: /* @__PURE__ */ jsx45(
|
|
7078
7211
|
NumberFormatter,
|
|
7079
7212
|
{
|
|
7080
7213
|
value: n.price,
|
|
@@ -7082,7 +7215,7 @@ function WalletAsset({
|
|
|
7082
7215
|
tFixNum: 2
|
|
7083
7216
|
}
|
|
7084
7217
|
) }),
|
|
7085
|
-
/* @__PURE__ */
|
|
7218
|
+
/* @__PURE__ */ jsx45("div", { className: "matchid-wallet-asset-value", children: /* @__PURE__ */ jsx45(
|
|
7086
7219
|
NumberFormatter,
|
|
7087
7220
|
{
|
|
7088
7221
|
value: n.value,
|
|
@@ -7092,14 +7225,14 @@ function WalletAsset({
|
|
|
7092
7225
|
) })
|
|
7093
7226
|
] }),
|
|
7094
7227
|
/* @__PURE__ */ jsxs25("div", { className: `matchid-wallet-asset-footer`, children: [
|
|
7095
|
-
/* @__PURE__ */
|
|
7228
|
+
/* @__PURE__ */ jsx45("div", { className: `matchid-wallet-asset-balance`, children: /* @__PURE__ */ jsx45(
|
|
7096
7229
|
NumberFormatter,
|
|
7097
7230
|
{
|
|
7098
7231
|
value: n.balance,
|
|
7099
7232
|
tFixNum: 3
|
|
7100
7233
|
}
|
|
7101
7234
|
) }),
|
|
7102
|
-
"price_change_24h" in n && /* @__PURE__ */
|
|
7235
|
+
"price_change_24h" in n && /* @__PURE__ */ jsx45("div", { className: `matchid-wallet-asset-change ${getFooterColor()}`, children: /* @__PURE__ */ jsx45(
|
|
7103
7236
|
NumberFormatter,
|
|
7104
7237
|
{
|
|
7105
7238
|
prefix: `${(n?.price_change_24h || 0) < 0 ? "-" : "+"} `,
|
|
@@ -7118,7 +7251,7 @@ function WalletAsset({
|
|
|
7118
7251
|
import { useEffect as useEffect31, useMemo as useMemo17, useState as useState33 } from "react";
|
|
7119
7252
|
import { defineChain as defineChain4, encodeFunctionData as encodeFunctionData2, erc20Abi as erc20Abi3, http as http8, parseUnits as parseUnits2 } from "viem";
|
|
7120
7253
|
import { FormattedMessage as FormattedMessage12, useIntl as useIntl18 } from "react-intl";
|
|
7121
|
-
import { jsx as
|
|
7254
|
+
import { jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
7122
7255
|
function Input2({
|
|
7123
7256
|
onChange,
|
|
7124
7257
|
placeholder,
|
|
@@ -7129,7 +7262,7 @@ function Input2({
|
|
|
7129
7262
|
size = "df"
|
|
7130
7263
|
}) {
|
|
7131
7264
|
return /* @__PURE__ */ jsxs26("div", { className: `matchid-token-input-box ${"matchid-token-input-" + size}`, children: [
|
|
7132
|
-
/* @__PURE__ */
|
|
7265
|
+
/* @__PURE__ */ jsx46(
|
|
7133
7266
|
"input",
|
|
7134
7267
|
{
|
|
7135
7268
|
placeholder,
|
|
@@ -7140,7 +7273,7 @@ function Input2({
|
|
|
7140
7273
|
className: `matchid-token-input ${error ? "matchid-token-input-error" : ""}`
|
|
7141
7274
|
}
|
|
7142
7275
|
),
|
|
7143
|
-
error && /* @__PURE__ */
|
|
7276
|
+
error && /* @__PURE__ */ jsx46("div", { className: "matchid-token-input-error-text", children: error })
|
|
7144
7277
|
] });
|
|
7145
7278
|
}
|
|
7146
7279
|
function TokenSend({
|
|
@@ -7268,24 +7401,24 @@ function TokenSend({
|
|
|
7268
7401
|
window.removeEventListener("message", receiveMessage);
|
|
7269
7402
|
};
|
|
7270
7403
|
}, []);
|
|
7271
|
-
return /* @__PURE__ */
|
|
7404
|
+
return /* @__PURE__ */ jsx46(ModalDrawer, { isOpen: true, onClose, zIndex, title: /* @__PURE__ */ jsx46(FormattedMessage12, { id: "send" }), onBack, children: /* @__PURE__ */ jsxs26("div", { className: `matchid-token-send-box`, children: [
|
|
7272
7405
|
/* @__PURE__ */ jsxs26("div", { className: "matchid-token-send-content", children: [
|
|
7273
7406
|
/* @__PURE__ */ jsxs26("div", { className: `matchid-token-amount-content`, children: [
|
|
7274
7407
|
/* @__PURE__ */ jsxs26("div", { className: `matchid-token-amount-header`, children: [
|
|
7275
|
-
/* @__PURE__ */
|
|
7408
|
+
/* @__PURE__ */ jsx46("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ jsx46(FormattedMessage12, { id: "amount" }) }),
|
|
7276
7409
|
/* @__PURE__ */ jsxs26("div", { className: `matchid-token-amount-chain`, children: [
|
|
7277
|
-
token.icon ? /* @__PURE__ */
|
|
7410
|
+
token.icon ? /* @__PURE__ */ jsx46(
|
|
7278
7411
|
"img",
|
|
7279
7412
|
{
|
|
7280
7413
|
src: token?.icon,
|
|
7281
7414
|
alt: token?.symbol,
|
|
7282
7415
|
className: `matchid-token-amount-chain-icon`
|
|
7283
7416
|
}
|
|
7284
|
-
) : /* @__PURE__ */
|
|
7285
|
-
/* @__PURE__ */
|
|
7417
|
+
) : /* @__PURE__ */ jsx46(AlphaAvatar, { name: token.symbol || token.name || "", size: 16 }),
|
|
7418
|
+
/* @__PURE__ */ jsx46("span", { children: token?.symbol })
|
|
7286
7419
|
] })
|
|
7287
7420
|
] }),
|
|
7288
|
-
/* @__PURE__ */
|
|
7421
|
+
/* @__PURE__ */ jsx46(
|
|
7289
7422
|
Input2,
|
|
7290
7423
|
{
|
|
7291
7424
|
type: "text",
|
|
@@ -7300,16 +7433,16 @@ function TokenSend({
|
|
|
7300
7433
|
),
|
|
7301
7434
|
/* @__PURE__ */ jsxs26("div", { className: `matchid-token-amount-footer`, children: [
|
|
7302
7435
|
/* @__PURE__ */ jsxs26("div", { className: `matchid-token-amount-title`, children: [
|
|
7303
|
-
/* @__PURE__ */
|
|
7436
|
+
/* @__PURE__ */ jsx46(FormattedMessage12, { id: "balance" }),
|
|
7304
7437
|
":"
|
|
7305
7438
|
] }),
|
|
7306
|
-
/* @__PURE__ */
|
|
7439
|
+
/* @__PURE__ */ jsx46("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ jsx46(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
|
|
7307
7440
|
] }),
|
|
7308
|
-
/* @__PURE__ */
|
|
7441
|
+
/* @__PURE__ */ jsx46(TransferIcon, { className: "matchid-token-amount-transfer" })
|
|
7309
7442
|
] }),
|
|
7310
7443
|
/* @__PURE__ */ jsxs26("div", { className: `matchid-token-address-content`, children: [
|
|
7311
|
-
/* @__PURE__ */
|
|
7312
|
-
/* @__PURE__ */
|
|
7444
|
+
/* @__PURE__ */ jsx46("div", { className: `matchid-token-address-header`, children: /* @__PURE__ */ jsx46("div", { className: `matchid-token-address-title`, children: /* @__PURE__ */ jsx46(FormattedMessage12, { id: "receiveTitle" }) }) }),
|
|
7445
|
+
/* @__PURE__ */ jsx46(
|
|
7313
7446
|
Input2,
|
|
7314
7447
|
{
|
|
7315
7448
|
type: "text",
|
|
@@ -7325,7 +7458,7 @@ function TokenSend({
|
|
|
7325
7458
|
)
|
|
7326
7459
|
] })
|
|
7327
7460
|
] }),
|
|
7328
|
-
/* @__PURE__ */
|
|
7461
|
+
/* @__PURE__ */ jsx46(
|
|
7329
7462
|
Button,
|
|
7330
7463
|
{
|
|
7331
7464
|
size: "lg",
|
|
@@ -7334,7 +7467,7 @@ function TokenSend({
|
|
|
7334
7467
|
disabled: !canSend || !!txError,
|
|
7335
7468
|
onClick: onNext,
|
|
7336
7469
|
loading: loading || sending,
|
|
7337
|
-
children: /* @__PURE__ */
|
|
7470
|
+
children: /* @__PURE__ */ jsx46(FormattedMessage12, { id: "next" })
|
|
7338
7471
|
}
|
|
7339
7472
|
)
|
|
7340
7473
|
] }) });
|
|
@@ -7342,7 +7475,7 @@ function TokenSend({
|
|
|
7342
7475
|
|
|
7343
7476
|
// src/components/TokenDetail/index.tsx
|
|
7344
7477
|
import { FormattedMessage as FormattedMessage13, useIntl as useIntl19 } from "react-intl";
|
|
7345
|
-
import { jsx as
|
|
7478
|
+
import { jsx as jsx47, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
7346
7479
|
function TokenDetail({
|
|
7347
7480
|
onClose,
|
|
7348
7481
|
token
|
|
@@ -7352,41 +7485,41 @@ function TokenDetail({
|
|
|
7352
7485
|
const chain = chainList?.find((m) => m.id.toString() === token.chain_id);
|
|
7353
7486
|
const onSend = () => {
|
|
7354
7487
|
modal.show((props) => {
|
|
7355
|
-
return /* @__PURE__ */
|
|
7488
|
+
return /* @__PURE__ */ jsx47(TokenSend, { onClose: () => {
|
|
7356
7489
|
props.close();
|
|
7357
7490
|
onClose();
|
|
7358
7491
|
}, onBack: props.close, zIndex: props.zIndex, token });
|
|
7359
7492
|
});
|
|
7360
7493
|
};
|
|
7361
7494
|
const intl = useIntl19();
|
|
7362
|
-
return /* @__PURE__ */
|
|
7495
|
+
return /* @__PURE__ */ jsx47(ModalDrawer, { isOpen: true, title: intl.formatMessage({
|
|
7363
7496
|
id: "tokenDetails"
|
|
7364
7497
|
}), onClose, children: /* @__PURE__ */ jsxs27("div", { className: `matchid-token-detail`, children: [
|
|
7365
7498
|
/* @__PURE__ */ jsxs27("div", { className: `matchid-token-main`, children: [
|
|
7366
7499
|
/* @__PURE__ */ jsxs27("div", { className: `matchid-token-info`, children: [
|
|
7367
7500
|
/* @__PURE__ */ jsxs27("div", { className: `matchid-token-logo`, children: [
|
|
7368
|
-
token.icon ? /* @__PURE__ */
|
|
7369
|
-
chain?.iconUrl && /* @__PURE__ */
|
|
7501
|
+
token.icon ? /* @__PURE__ */ jsx47("img", { src: token.icon, alt: token.symbol, className: `matchid-token-icon` }) : /* @__PURE__ */ jsx47(AlphaAvatar, { className: `matchid-token-icon`, size: 48, name: token.symbol || token.name || "" }),
|
|
7502
|
+
chain?.iconUrl && /* @__PURE__ */ jsx47("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-token-chain` })
|
|
7370
7503
|
] }),
|
|
7371
7504
|
/* @__PURE__ */ jsxs27("div", { className: `matchid-token-name`, children: [
|
|
7372
|
-
/* @__PURE__ */
|
|
7505
|
+
/* @__PURE__ */ jsx47(NumberFormatter, { value: token.balance, tFixNum: 10 }),
|
|
7373
7506
|
" ",
|
|
7374
7507
|
token.symbol
|
|
7375
7508
|
] })
|
|
7376
7509
|
] }),
|
|
7377
7510
|
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ jsxs27("div", { className: `matchid-token-contract`, children: [
|
|
7378
|
-
/* @__PURE__ */
|
|
7379
|
-
/* @__PURE__ */
|
|
7511
|
+
/* @__PURE__ */ jsx47("div", { className: "matchid-token-contract-title", children: "Contract address" }),
|
|
7512
|
+
/* @__PURE__ */ jsx47("div", { className: "matchid-token-contract-address", children: token.address })
|
|
7380
7513
|
] })
|
|
7381
7514
|
] }),
|
|
7382
|
-
/* @__PURE__ */
|
|
7515
|
+
/* @__PURE__ */ jsx47(Button, { size: "lg", block: true, highlight: true, onClick: onSend, children: /* @__PURE__ */ jsx47(FormattedMessage13, { id: "send" }) })
|
|
7383
7516
|
] }) });
|
|
7384
7517
|
}
|
|
7385
7518
|
|
|
7386
7519
|
// src/components/TokenSendList/index.tsx
|
|
7387
7520
|
import { useState as useState34 } from "react";
|
|
7388
7521
|
import { FormattedMessage as FormattedMessage14 } from "react-intl";
|
|
7389
|
-
import { jsx as
|
|
7522
|
+
import { jsx as jsx48, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
7390
7523
|
function TokenSendList({ close }) {
|
|
7391
7524
|
const isDownMd = useDownMd();
|
|
7392
7525
|
const walletAssets = useMatchWalletAssets();
|
|
@@ -7398,14 +7531,14 @@ function TokenSendList({ close }) {
|
|
|
7398
7531
|
const modal = useModal();
|
|
7399
7532
|
const onNext = () => {
|
|
7400
7533
|
checked && modal.show((props) => {
|
|
7401
|
-
return /* @__PURE__ */
|
|
7534
|
+
return /* @__PURE__ */ jsx48(TokenSend, { onClose: () => {
|
|
7402
7535
|
props.close();
|
|
7403
7536
|
close();
|
|
7404
7537
|
}, onBack: props.close, zIndex: props.zIndex, token: checked });
|
|
7405
7538
|
});
|
|
7406
7539
|
};
|
|
7407
7540
|
return /* @__PURE__ */ jsxs28("div", { className: "matchid-token-send-list-box", children: [
|
|
7408
|
-
/* @__PURE__ */
|
|
7541
|
+
/* @__PURE__ */ jsx48("div", { className: "matchid-token-send-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
7409
7542
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
7410
7543
|
return /* @__PURE__ */ jsxs28(
|
|
7411
7544
|
"div",
|
|
@@ -7415,10 +7548,10 @@ function TokenSendList({ close }) {
|
|
|
7415
7548
|
setChecked(n);
|
|
7416
7549
|
},
|
|
7417
7550
|
children: [
|
|
7418
|
-
/* @__PURE__ */
|
|
7551
|
+
/* @__PURE__ */ jsx48(Radio, { checked: checked?.address == n.address, size: isDownMd ? 18 : 24 }),
|
|
7419
7552
|
/* @__PURE__ */ jsxs28("div", { className: "matchid-token-send-content", children: [
|
|
7420
7553
|
/* @__PURE__ */ jsxs28("div", { className: "matchid-token-send-logo", children: [
|
|
7421
|
-
n.icon ? /* @__PURE__ */
|
|
7554
|
+
n.icon ? /* @__PURE__ */ jsx48("img", { src: n.icon, alt: n.symbol, className: `matchid-token-send-icon` }) : /* @__PURE__ */ jsx48(
|
|
7422
7555
|
AlphaAvatar2,
|
|
7423
7556
|
{
|
|
7424
7557
|
className: `matchid-token-send-icon`,
|
|
@@ -7426,7 +7559,7 @@ function TokenSendList({ close }) {
|
|
|
7426
7559
|
name: n.symbol || n.name || ""
|
|
7427
7560
|
}
|
|
7428
7561
|
),
|
|
7429
|
-
chain?.iconUrl && /* @__PURE__ */
|
|
7562
|
+
chain?.iconUrl && /* @__PURE__ */ jsx48(
|
|
7430
7563
|
"img",
|
|
7431
7564
|
{
|
|
7432
7565
|
src: chain.iconUrl,
|
|
@@ -7436,8 +7569,8 @@ function TokenSendList({ close }) {
|
|
|
7436
7569
|
)
|
|
7437
7570
|
] }),
|
|
7438
7571
|
/* @__PURE__ */ jsxs28("div", { className: `matchid-token-send-info`, children: [
|
|
7439
|
-
/* @__PURE__ */
|
|
7440
|
-
/* @__PURE__ */
|
|
7572
|
+
/* @__PURE__ */ jsx48("div", { className: `matchid-token-send-name`, children: n.symbol }),
|
|
7573
|
+
/* @__PURE__ */ jsx48("div", { className: `matchid-token-send-balance`, children: /* @__PURE__ */ jsx48(NumberFormatter, { value: n.balance, tFixNum: 3 }) })
|
|
7441
7574
|
] })
|
|
7442
7575
|
] })
|
|
7443
7576
|
]
|
|
@@ -7445,7 +7578,7 @@ function TokenSendList({ close }) {
|
|
|
7445
7578
|
index
|
|
7446
7579
|
);
|
|
7447
7580
|
}) }),
|
|
7448
|
-
/* @__PURE__ */
|
|
7581
|
+
/* @__PURE__ */ jsx48(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ jsx48(FormattedMessage14, { id: "next" }) })
|
|
7449
7582
|
] });
|
|
7450
7583
|
}
|
|
7451
7584
|
|
|
@@ -7455,7 +7588,7 @@ import { useEffect as useEffect32, useMemo as useMemo18, useState as useState35
|
|
|
7455
7588
|
import { decodeFunctionData, defineChain as defineChain5, formatUnits as formatUnits3 } from "viem";
|
|
7456
7589
|
import { erc20Abi as erc20Abi4 } from "viem";
|
|
7457
7590
|
import { FormattedMessage as FormattedMessage15 } from "react-intl";
|
|
7458
|
-
import { jsx as
|
|
7591
|
+
import { jsx as jsx49, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
7459
7592
|
var Item = ({ data }) => {
|
|
7460
7593
|
const { address } = useWallet();
|
|
7461
7594
|
const isOut = data.from.toLowerCase() == address.toLowerCase();
|
|
@@ -7550,10 +7683,10 @@ var Item = ({ data }) => {
|
|
|
7550
7683
|
className: `matchid-transaction-item`,
|
|
7551
7684
|
children: [
|
|
7552
7685
|
/* @__PURE__ */ jsxs29("div", { className: `matchid-transacton-item-container`, children: [
|
|
7553
|
-
/* @__PURE__ */
|
|
7686
|
+
/* @__PURE__ */ jsx49("div", { className: "matchid-transaction-item-icon", children: /* @__PURE__ */ jsx49(ArrowSendIcon, { className: !isOut ? "rotate-180" : "" }) }),
|
|
7554
7687
|
/* @__PURE__ */ jsxs29("div", { className: `matchid-transaction-item-details`, children: [
|
|
7555
|
-
/* @__PURE__ */
|
|
7556
|
-
/* @__PURE__ */
|
|
7688
|
+
/* @__PURE__ */ jsx49("div", { className: `matchid-transaction-item-address`, children: formatAddress(to, 6, 4) }),
|
|
7689
|
+
/* @__PURE__ */ jsx49(
|
|
7557
7690
|
"div",
|
|
7558
7691
|
{
|
|
7559
7692
|
className: `matchid-transaction-item-timestamp`,
|
|
@@ -7563,10 +7696,10 @@ var Item = ({ data }) => {
|
|
|
7563
7696
|
] })
|
|
7564
7697
|
] }),
|
|
7565
7698
|
/* @__PURE__ */ jsxs29("div", { className: `matchid-transaction-item-amount ${"matchid-transaction-item-" + status}`, children: [
|
|
7566
|
-
/* @__PURE__ */
|
|
7567
|
-
status == "loading" && /* @__PURE__ */
|
|
7568
|
-
status == "success" && /* @__PURE__ */
|
|
7569
|
-
status == "error" && /* @__PURE__ */
|
|
7699
|
+
/* @__PURE__ */ jsx49(NumberFormatter, { value: amount, tFixNum: 6, prefix: isOut ? "-" : "+", suffix: " " + symbol }),
|
|
7700
|
+
status == "loading" && /* @__PURE__ */ jsx49(LoadingIcon_default, { color: "#000000", size: 16, rotate: true }),
|
|
7701
|
+
status == "success" && /* @__PURE__ */ jsx49(CheckRoundIcon, { size: 16 }),
|
|
7702
|
+
status == "error" && /* @__PURE__ */ jsx49(InfoRoundIcon, { size: 16 })
|
|
7570
7703
|
] })
|
|
7571
7704
|
]
|
|
7572
7705
|
}
|
|
@@ -7576,7 +7709,7 @@ function TransactionList({
|
|
|
7576
7709
|
scrollableTarget
|
|
7577
7710
|
}) {
|
|
7578
7711
|
const { fetchMoreData, hasMore, items } = useMatchWalletRecords();
|
|
7579
|
-
return /* @__PURE__ */
|
|
7712
|
+
return /* @__PURE__ */ jsx49(
|
|
7580
7713
|
InfiniteScroll,
|
|
7581
7714
|
{
|
|
7582
7715
|
scrollableTarget,
|
|
@@ -7584,11 +7717,11 @@ function TransactionList({
|
|
|
7584
7717
|
next: fetchMoreData,
|
|
7585
7718
|
hasMore,
|
|
7586
7719
|
loader: /* @__PURE__ */ jsxs29("div", { className: "matchid-list-nomore", children: [
|
|
7587
|
-
/* @__PURE__ */
|
|
7720
|
+
/* @__PURE__ */ jsx49(LoadingIcon_default, { rotate: true, size: 16, color: "black" }),
|
|
7588
7721
|
"Loading..."
|
|
7589
7722
|
] }),
|
|
7590
|
-
endMessage: items.length > 0 ? /* @__PURE__ */
|
|
7591
|
-
children: items.length == 0 && !hasMore ? /* @__PURE__ */
|
|
7723
|
+
endMessage: items.length > 0 ? /* @__PURE__ */ jsx49("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ jsx49(FormattedMessage15, { id: "noMoreRecords" }) }) : /* @__PURE__ */ jsx49("div", { className: `matchid-list-nomore`, children: /* @__PURE__ */ jsx49(FormattedMessage15, { id: "noRecords" }) }),
|
|
7724
|
+
children: items.length == 0 && !hasMore ? /* @__PURE__ */ jsx49("div", { className: "mt-[150px]" }) : /* @__PURE__ */ jsx49("div", { className: `matchid-transaction-list`, children: items.map((item, index) => /* @__PURE__ */ jsx49(Item, { data: item }, index)) })
|
|
7592
7725
|
}
|
|
7593
7726
|
);
|
|
7594
7727
|
}
|
|
@@ -7663,4 +7796,4 @@ export {
|
|
|
7663
7796
|
MatchProvider,
|
|
7664
7797
|
useMatch
|
|
7665
7798
|
};
|
|
7666
|
-
//# sourceMappingURL=chunk-
|
|
7799
|
+
//# sourceMappingURL=chunk-QMV4FDUH.mjs.map
|