@matchain/matchid-sdk-react 0.1.56-alpha.12 → 0.1.56-alpha.13
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 +83 -44
- package/dist/api.js.map +1 -1
- package/dist/api.mjs +2 -2
- package/dist/{chunk-44JQQ34F.mjs → chunk-7K4E64WH.mjs} +2 -2
- package/dist/{chunk-DUSDBXBT.mjs → chunk-RPATABCS.mjs} +164 -124
- package/dist/chunk-RPATABCS.mjs.map +1 -0
- package/dist/components.d.mts +3 -3
- package/dist/components.d.ts +3 -3
- package/dist/components.js +151 -122
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +1 -1
- package/dist/hooks.d.mts +2 -2
- package/dist/hooks.d.ts +2 -2
- package/dist/hooks.js +39 -0
- package/dist/hooks.js.map +1 -1
- package/dist/hooks.mjs +1 -1
- package/dist/icon.d.mts +2 -2
- package/dist/icon.d.ts +2 -2
- package/dist/{index-DxHhOW24.d.mts → index-BLjGmf9p.d.mts} +2 -2
- package/dist/{index-BNqdFiOo.d.ts → index-BXhXRggh.d.ts} +1 -1
- package/dist/{index-uB9jBjgs.d.mts → index-Bjb30oE3.d.mts} +35 -31
- package/dist/{index-hz9v-CNJ.d.ts → index-CPnKc6o4.d.ts} +35 -31
- package/dist/{index-CcVHENNv.d.ts → index-CpJtux-G.d.ts} +1 -1
- package/dist/{index-DVlulZhE.d.mts → index-CqHlL6ue.d.mts} +3 -3
- package/dist/{index-DkijpM5Q.d.mts → index-CzCkxwOm.d.mts} +1 -1
- package/dist/{index-84CqVi2I.d.mts → index-DCyE39bg.d.mts} +1 -1
- package/dist/{index-BctnHnJp.d.ts → index-DGsB7f2H.d.ts} +1 -1
- package/dist/{index-Cqdz_5bE.d.ts → index-DQYg6bEA.d.ts} +2 -2
- package/dist/{index-qmC4zt6V.d.ts → index-DZpXCByF.d.ts} +3 -3
- package/dist/{index-Car1jFyN.d.mts → index-De8efmdb.d.mts} +1 -1
- package/dist/{index-BqI0PEIi.d.mts → index-DuCefmJ0.d.mts} +1 -1
- package/dist/{index-CvzpMw3N.d.ts → index-m2bn_W3Y.d.ts} +1 -1
- package/dist/index.d.mts +8 -8
- package/dist/index.d.ts +8 -8
- package/dist/index.js +163 -123
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +2 -2
- package/dist/{types-BrVeC0c8.d.mts → types-C8FLH1yn.d.mts} +1 -0
- package/dist/{types-BrVeC0c8.d.ts → types-C8FLH1yn.d.ts} +1 -0
- 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 +6 -0
- package/dist/ui.js.map +1 -1
- package/dist/ui.mjs +1 -1
- package/example/src/App.tsx +61 -61
- package/example/src/config/index.ts +8 -6
- package/example/src/pages/Home.tsx +15 -15
- package/example/src/store/useLocalStore.ts +19 -19
- package/example/yarn.lock +1384 -0
- package/package.json +1 -1
- package/dist/chunk-DUSDBXBT.mjs.map +0 -1
- /package/dist/{chunk-44JQQ34F.mjs.map → chunk-7K4E64WH.mjs.map} +0 -0
package/dist/index.js
CHANGED
|
@@ -2171,6 +2171,12 @@ var useWalletModalStore = (0, import_zustand2.create)((set) => ({
|
|
|
2171
2171
|
open: (type, methods = DEFAULT_WALLET_METHODS) => set({ isOpen: true, type, methods }),
|
|
2172
2172
|
close: () => set({ isOpen: false })
|
|
2173
2173
|
}));
|
|
2174
|
+
var useEmailModalStore = (0, import_zustand2.create)((set) => ({
|
|
2175
|
+
isOpen: false,
|
|
2176
|
+
type: "login",
|
|
2177
|
+
open: (type) => set({ isOpen: true, type }),
|
|
2178
|
+
close: () => set({ isOpen: false })
|
|
2179
|
+
}));
|
|
2174
2180
|
|
|
2175
2181
|
// src/store/useStore.ts
|
|
2176
2182
|
var import_zustand3 = require("zustand");
|
|
@@ -2207,6 +2213,7 @@ function useUserInfo() {
|
|
|
2207
2213
|
const { open: TONOpen } = useTONModalStore();
|
|
2208
2214
|
const { open: BTCOpen } = useBTCModalStore();
|
|
2209
2215
|
const { open: CEXBindOpen } = useCEXBindModalStore();
|
|
2216
|
+
const { open: EmailOpen } = useEmailModalStore();
|
|
2210
2217
|
const walletModalStore = useWalletModalStore();
|
|
2211
2218
|
const getRedirectUri = () => {
|
|
2212
2219
|
return encodeURIComponent(window.location.href);
|
|
@@ -2341,6 +2348,34 @@ function useUserInfo() {
|
|
|
2341
2348
|
}
|
|
2342
2349
|
return false;
|
|
2343
2350
|
};
|
|
2351
|
+
const bindByEmail = async ({
|
|
2352
|
+
email,
|
|
2353
|
+
code
|
|
2354
|
+
}) => {
|
|
2355
|
+
try {
|
|
2356
|
+
const obj = {
|
|
2357
|
+
email,
|
|
2358
|
+
verification_key: emailLoginKey,
|
|
2359
|
+
verification_code: code
|
|
2360
|
+
};
|
|
2361
|
+
const res = await verifyEmailCodeApi(obj);
|
|
2362
|
+
if (res && res.data && isSuccess(res)) {
|
|
2363
|
+
events.onBind && events.onBind({
|
|
2364
|
+
type: "email"
|
|
2365
|
+
});
|
|
2366
|
+
eventManager_default.emit("onBind", {
|
|
2367
|
+
type: "email"
|
|
2368
|
+
});
|
|
2369
|
+
return true;
|
|
2370
|
+
} else {
|
|
2371
|
+
throw new Error(res.message);
|
|
2372
|
+
}
|
|
2373
|
+
} catch (error) {
|
|
2374
|
+
console.error("bindByEmail", error);
|
|
2375
|
+
throw error;
|
|
2376
|
+
}
|
|
2377
|
+
return false;
|
|
2378
|
+
};
|
|
2344
2379
|
const bindWallet = async () => {
|
|
2345
2380
|
if (!token) {
|
|
2346
2381
|
throw new Error("You must login first");
|
|
@@ -2388,12 +2423,15 @@ function useUserInfo() {
|
|
|
2388
2423
|
return BTCOpen("bind");
|
|
2389
2424
|
case "telegram":
|
|
2390
2425
|
return await bindTelegram();
|
|
2426
|
+
case "email":
|
|
2427
|
+
return EmailOpen("bind");
|
|
2391
2428
|
case "twitter":
|
|
2392
2429
|
case "google":
|
|
2393
2430
|
case "discord":
|
|
2394
2431
|
case "github":
|
|
2395
2432
|
case "linkedin":
|
|
2396
2433
|
case "facebook":
|
|
2434
|
+
case "kakao":
|
|
2397
2435
|
case "youtube":
|
|
2398
2436
|
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" : ""}`;
|
|
2399
2437
|
matchlog_default.log("link", link);
|
|
@@ -2477,6 +2515,7 @@ function useUserInfo() {
|
|
|
2477
2515
|
auth,
|
|
2478
2516
|
login: loginMethod,
|
|
2479
2517
|
bind,
|
|
2518
|
+
bindByEmail,
|
|
2480
2519
|
getAuthInfo,
|
|
2481
2520
|
invite
|
|
2482
2521
|
};
|
|
@@ -2820,7 +2859,7 @@ var import_react_intl2 = require("react-intl");
|
|
|
2820
2859
|
var import_jsx_runtime64 = require("react/jsx-runtime");
|
|
2821
2860
|
function StepVerify(props) {
|
|
2822
2861
|
const intl = (0, import_react_intl2.useIntl)();
|
|
2823
|
-
const { getLoginEmailCode, loginByEmail } = useUserInfo();
|
|
2862
|
+
const { getLoginEmailCode, bindByEmail, loginByEmail } = useUserInfo();
|
|
2824
2863
|
const [error, setError] = (0, import_react7.useState)("");
|
|
2825
2864
|
const [code, setCode] = (0, import_react7.useState)("");
|
|
2826
2865
|
const [sending, setSending] = (0, import_react7.useState)(false);
|
|
@@ -2880,7 +2919,10 @@ function StepVerify(props) {
|
|
|
2880
2919
|
try {
|
|
2881
2920
|
setError("");
|
|
2882
2921
|
setSubmitting(true);
|
|
2883
|
-
const res = await
|
|
2922
|
+
const res = props.type === "bind" ? await bindByEmail({
|
|
2923
|
+
email: props.email,
|
|
2924
|
+
code
|
|
2925
|
+
}) : await loginByEmail({
|
|
2884
2926
|
email: props.email,
|
|
2885
2927
|
code
|
|
2886
2928
|
});
|
|
@@ -2942,6 +2984,7 @@ var import_react_intl3 = require("react-intl");
|
|
|
2942
2984
|
var import_jsx_runtime65 = require("react/jsx-runtime");
|
|
2943
2985
|
function EmailModal({
|
|
2944
2986
|
isOpen = false,
|
|
2987
|
+
type = "login",
|
|
2945
2988
|
width = 480,
|
|
2946
2989
|
onClose,
|
|
2947
2990
|
onBack,
|
|
@@ -2969,7 +3012,7 @@ function EmailModal({
|
|
|
2969
3012
|
children: step === "input" ? /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(StepEmail, { email: emailVal, onContinue: (email) => {
|
|
2970
3013
|
setEmailVal(email);
|
|
2971
3014
|
setStep("verify");
|
|
2972
|
-
} }) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(StepVerify, { email: emailVal, onSuccess: onLogin })
|
|
3015
|
+
} }) : /* @__PURE__ */ (0, import_jsx_runtime65.jsx)(StepVerify, { email: emailVal, type, onSuccess: onLogin })
|
|
2973
3016
|
}
|
|
2974
3017
|
);
|
|
2975
3018
|
}
|
|
@@ -3119,7 +3162,7 @@ function LoginBox({
|
|
|
3119
3162
|
walletMethods: walletMethodList
|
|
3120
3163
|
};
|
|
3121
3164
|
}, [config.platform, recommendMethods, methods, walletMethods]);
|
|
3122
|
-
const
|
|
3165
|
+
const { open: emailOpen } = useEmailModalStore();
|
|
3123
3166
|
const { login } = useUserInfo();
|
|
3124
3167
|
const [showWallet, setShowWallet] = (0, import_react10.useState)(false);
|
|
3125
3168
|
const intl = (0, import_react_intl4.useIntl)();
|
|
@@ -3135,7 +3178,7 @@ function LoginBox({
|
|
|
3135
3178
|
icon: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(EmailIcon, { size: isDownMd ? 36 : 40 }),
|
|
3136
3179
|
name: intl.formatMessage({ id: "email" }),
|
|
3137
3180
|
onClick: () => {
|
|
3138
|
-
|
|
3181
|
+
emailOpen("login");
|
|
3139
3182
|
}
|
|
3140
3183
|
},
|
|
3141
3184
|
google: {
|
|
@@ -3185,130 +3228,116 @@ function LoginBox({
|
|
|
3185
3228
|
}
|
|
3186
3229
|
};
|
|
3187
3230
|
const { walletMap } = useWalletConfig();
|
|
3188
|
-
return /* @__PURE__ */ (0, import_jsx_runtime67.
|
|
3189
|
-
|
|
3190
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3191
|
-
|
|
3192
|
-
|
|
3193
|
-
|
|
3194
|
-
|
|
3195
|
-
|
|
3196
|
-
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
children: [
|
|
3210
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
3214
|
-
|
|
3215
|
-
|
|
3216
|
-
|
|
3217
|
-
|
|
3218
|
-
),
|
|
3219
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3220
|
-
"span",
|
|
3221
|
-
{
|
|
3222
|
-
className: "matchid-login-recommend-wallet-item-name",
|
|
3223
|
-
children: m2.name
|
|
3224
|
-
}
|
|
3225
|
-
)
|
|
3226
|
-
] }),
|
|
3231
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_jsx_runtime67.Fragment, { children: (!inModal || !emailOpen) && /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-login-box", children: [
|
|
3232
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
|
|
3233
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3234
|
+
RecommendItem,
|
|
3235
|
+
{
|
|
3236
|
+
icon: methodMap[m]?.icon,
|
|
3237
|
+
name: methodMap[m]?.name,
|
|
3238
|
+
onClick: methodMap[m]?.onClick,
|
|
3239
|
+
showChildren: m == "wallet" && showWallet,
|
|
3240
|
+
children: m == "wallet" && /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(import_jsx_runtime67.Fragment, { children: [
|
|
3241
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-recommend-wallet-divider" }),
|
|
3242
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-recommend-wallet-list", children: methodConfig.walletMethods.map((n) => {
|
|
3243
|
+
const m2 = walletMap[n];
|
|
3244
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)(
|
|
3245
|
+
"div",
|
|
3246
|
+
{
|
|
3247
|
+
className: "matchid-login-recommend-wallet-item",
|
|
3248
|
+
onClick: () => {
|
|
3249
|
+
login(m2.method);
|
|
3250
|
+
},
|
|
3251
|
+
children: [
|
|
3252
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-login-recommend-wallet-item-content", children: [
|
|
3253
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-recommend-wallet-item-icon", children: m2.icon }),
|
|
3254
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3255
|
+
"div",
|
|
3256
|
+
{
|
|
3257
|
+
className: "matchid-login-recommend-wallet-item-hover-icon",
|
|
3258
|
+
children: m2.activeIcon
|
|
3259
|
+
}
|
|
3260
|
+
),
|
|
3227
3261
|
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3228
|
-
|
|
3262
|
+
"span",
|
|
3229
3263
|
{
|
|
3230
|
-
className: "matchid-login-recommend-wallet-item-
|
|
3231
|
-
|
|
3232
|
-
color: "var(--matchid-arrow-color)"
|
|
3264
|
+
className: "matchid-login-recommend-wallet-item-name",
|
|
3265
|
+
children: m2.name
|
|
3233
3266
|
}
|
|
3234
3267
|
)
|
|
3235
|
-
]
|
|
3236
|
-
|
|
3237
|
-
|
|
3238
|
-
|
|
3239
|
-
|
|
3240
|
-
|
|
3241
|
-
|
|
3242
|
-
|
|
3243
|
-
|
|
3244
|
-
|
|
3245
|
-
|
|
3246
|
-
|
|
3247
|
-
|
|
3248
|
-
|
|
3249
|
-
|
|
3250
|
-
|
|
3251
|
-
|
|
3252
|
-
|
|
3253
|
-
|
|
3254
|
-
|
|
3255
|
-
|
|
3256
|
-
|
|
3257
|
-
|
|
3258
|
-
|
|
3259
|
-
|
|
3260
|
-
|
|
3261
|
-
|
|
3262
|
-
|
|
3263
|
-
|
|
3264
|
-
|
|
3265
|
-
|
|
3266
|
-
|
|
3267
|
-
|
|
3268
|
-
|
|
3269
|
-
|
|
3270
|
-
|
|
3271
|
-
|
|
3268
|
+
] }),
|
|
3269
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3270
|
+
ArrowRightIcon,
|
|
3271
|
+
{
|
|
3272
|
+
className: "matchid-login-recommend-wallet-item-arrow",
|
|
3273
|
+
size: 20,
|
|
3274
|
+
color: "var(--matchid-arrow-color)"
|
|
3275
|
+
}
|
|
3276
|
+
)
|
|
3277
|
+
]
|
|
3278
|
+
},
|
|
3279
|
+
m2.name
|
|
3280
|
+
);
|
|
3281
|
+
}) })
|
|
3282
|
+
] })
|
|
3283
|
+
},
|
|
3284
|
+
m
|
|
3285
|
+
);
|
|
3286
|
+
}) }),
|
|
3287
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-privacy-policy", children: [
|
|
3288
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-privacy-policy-content", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3289
|
+
import_react_intl4.FormattedMessage,
|
|
3290
|
+
{
|
|
3291
|
+
id: "loginAgreement",
|
|
3292
|
+
values: {
|
|
3293
|
+
termsLink: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3294
|
+
"a",
|
|
3295
|
+
{
|
|
3296
|
+
href: TERMS_OF_SERVICE_URL,
|
|
3297
|
+
target: "_blank",
|
|
3298
|
+
rel: "noopener noreferrer",
|
|
3299
|
+
className: "matchid-privacy-policy-content-link",
|
|
3300
|
+
children: chunks
|
|
3301
|
+
}
|
|
3302
|
+
),
|
|
3303
|
+
privacyLink: (chunks) => /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3304
|
+
"a",
|
|
3305
|
+
{
|
|
3306
|
+
href: PRIVACY_POLICY_URL,
|
|
3307
|
+
target: "_blank",
|
|
3308
|
+
rel: "noopener noreferrer",
|
|
3309
|
+
className: "matchid-privacy-policy-content-link",
|
|
3310
|
+
children: chunks
|
|
3311
|
+
}
|
|
3312
|
+
)
|
|
3272
3313
|
}
|
|
3273
|
-
|
|
3274
|
-
|
|
3275
|
-
|
|
3276
|
-
|
|
3277
|
-
|
|
3278
|
-
] }),
|
|
3279
|
-
methodConfig.methods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-login-other", children: [
|
|
3280
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-login-other-line-box", children: [
|
|
3281
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-other-line" }),
|
|
3282
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react_intl4.FormattedMessage, { id: "otherLoginMethods" }) }),
|
|
3283
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-other-line" })
|
|
3284
|
-
] }),
|
|
3285
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
|
|
3286
|
-
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3287
|
-
"div",
|
|
3288
|
-
{
|
|
3289
|
-
className: "matchid-login-method-item",
|
|
3290
|
-
onClick: methodMap[m]?.onClick,
|
|
3291
|
-
title: methodMap[m]?.name,
|
|
3292
|
-
children: methodMap[m]?.icon
|
|
3293
|
-
},
|
|
3294
|
-
m
|
|
3295
|
-
);
|
|
3296
|
-
}) })
|
|
3314
|
+
}
|
|
3315
|
+
) }),
|
|
3316
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-privacy-policy-powered-by", children: [
|
|
3317
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react_intl4.FormattedMessage, { id: "poweredBy" }),
|
|
3318
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)(MatchIdIcon_default, {})
|
|
3297
3319
|
] })
|
|
3298
3320
|
] }),
|
|
3299
|
-
/* @__PURE__ */ (0, import_jsx_runtime67.
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3310
|
-
|
|
3311
|
-
|
|
3321
|
+
methodConfig.methods.length > 0 && /* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-login-other", children: [
|
|
3322
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsxs)("div", { className: "matchid-login-other-line-box", children: [
|
|
3323
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-other-line" }),
|
|
3324
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-other-text", children: /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(import_react_intl4.FormattedMessage, { id: "otherLoginMethods" }) }),
|
|
3325
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-other-line" })
|
|
3326
|
+
] }),
|
|
3327
|
+
/* @__PURE__ */ (0, import_jsx_runtime67.jsx)("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
|
|
3328
|
+
return /* @__PURE__ */ (0, import_jsx_runtime67.jsx)(
|
|
3329
|
+
"div",
|
|
3330
|
+
{
|
|
3331
|
+
className: "matchid-login-method-item",
|
|
3332
|
+
onClick: methodMap[m]?.onClick,
|
|
3333
|
+
title: methodMap[m]?.name,
|
|
3334
|
+
children: methodMap[m]?.icon
|
|
3335
|
+
},
|
|
3336
|
+
m
|
|
3337
|
+
);
|
|
3338
|
+
}) })
|
|
3339
|
+
] })
|
|
3340
|
+
] }) });
|
|
3312
3341
|
}
|
|
3313
3342
|
|
|
3314
3343
|
// src/components/LoginButton/index.tsx
|
|
@@ -7665,7 +7694,7 @@ function CEXBindModal({
|
|
|
7665
7694
|
const [secret, setSecret] = (0, import_react39.useState)("");
|
|
7666
7695
|
const [error, setError] = (0, import_react39.useState)("");
|
|
7667
7696
|
const needPassphrase = (0, import_react39.useMemo)(() => {
|
|
7668
|
-
return ["bitget", "okx"].includes(type.toLowerCase());
|
|
7697
|
+
return ["bitget", "okx", "kucoin"].includes(type.toLowerCase());
|
|
7669
7698
|
}, [type]);
|
|
7670
7699
|
(0, import_react39.useEffect)(() => {
|
|
7671
7700
|
if (isOpen) {
|
|
@@ -7770,6 +7799,7 @@ function BusinessProvider({ children }) {
|
|
|
7770
7799
|
const { type: BTCType, isOpen: BTCIsOpen, close: BTCClose } = useBTCModalStore();
|
|
7771
7800
|
const { type: CEXType, isOpen: CEXIsOpen, close: CEXClose } = useCEXBindModalStore();
|
|
7772
7801
|
const WalletModalStore = useWalletModalStore();
|
|
7802
|
+
const EmailModalStore = useEmailModalStore();
|
|
7773
7803
|
const { tgAppAuthCode, setTgAppAuthCode } = useStore_default();
|
|
7774
7804
|
const { login } = useMatch();
|
|
7775
7805
|
const walletModalClose = (func) => {
|
|
@@ -7855,6 +7885,16 @@ function BusinessProvider({ children }) {
|
|
|
7855
7885
|
zIndex: 150
|
|
7856
7886
|
}
|
|
7857
7887
|
),
|
|
7888
|
+
/* @__PURE__ */ (0, import_jsx_runtime102.jsx)(
|
|
7889
|
+
EmailModal,
|
|
7890
|
+
{
|
|
7891
|
+
isOpen: EmailModalStore.isOpen && (EmailModalStore.type == "login" && !overview && !token || EmailModalStore.type == "bind" && !!token && !!overview),
|
|
7892
|
+
onClose: EmailModalStore.close,
|
|
7893
|
+
onLogin: () => EmailModalStore.close,
|
|
7894
|
+
type: EmailModalStore.type,
|
|
7895
|
+
zIndex: 199
|
|
7896
|
+
}
|
|
7897
|
+
),
|
|
7858
7898
|
children
|
|
7859
7899
|
] });
|
|
7860
7900
|
}
|