@matchain/matchid-sdk-react 0.1.56-alpha.9 → 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.js +44 -3
- package/dist/api.js.map +1 -1
- package/dist/api.mjs +3 -3
- package/dist/{chunk-FQ6PYZPD.mjs → chunk-7SUDHG7S.mjs} +1 -1
- package/dist/chunk-7SUDHG7S.mjs.map +1 -0
- package/dist/{chunk-JCMQBWWW.mjs → chunk-EUG3QRAG.mjs} +2 -2
- package/dist/{chunk-LOZCAT7A.mjs → chunk-QMV4FDUH.mjs} +283 -216
- package/dist/chunk-QMV4FDUH.mjs.map +1 -0
- package/dist/components.d.mts +1 -1
- package/dist/components.d.ts +1 -1
- package/dist/components.js +306 -261
- package/dist/components.js.map +1 -1
- package/dist/components.mjs +2 -2
- package/dist/hooks.d.mts +1 -1
- package/dist/hooks.d.ts +1 -1
- package/dist/hooks.js +81 -42
- package/dist/hooks.js.map +1 -1
- package/dist/hooks.mjs +2 -2
- package/dist/icon.js.map +1 -1
- package/dist/icon.mjs +1 -1
- package/dist/{index-DwmrgZa2.d.ts → index-B70k4Jpk.d.ts} +4 -0
- package/dist/{index-D2E53ZMV.d.mts → index-BJJ0Gb6v.d.mts} +4 -0
- package/dist/{index-qmC4zt6V.d.ts → index-C2hr7zlN.d.ts} +3 -1
- package/dist/{index-DVlulZhE.d.mts → index-CTHpnEoB.d.mts} +3 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +87 -20
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +3 -3
- package/dist/ui.js +81 -70
- package/dist/ui.js.map +1 -1
- package/dist/ui.mjs +2 -2
- package/example/package-lock.json +2965 -0
- package/example/package.json +2 -1
- package/example/src/App.tsx +65 -60
- package/example/src/config/index.ts +8 -6
- package/example/src/pages/Wallet/index.tsx +2 -4
- package/example/yarn.lock +27 -2251
- package/package.json +3 -6
- package/dist/chunk-FQ6PYZPD.mjs.map +0 -1
- package/dist/chunk-LOZCAT7A.mjs.map +0 -1
- /package/dist/{chunk-JCMQBWWW.mjs.map → chunk-EUG3QRAG.mjs.map} +0 -0
|
@@ -68,7 +68,7 @@ import {
|
|
|
68
68
|
XIcon,
|
|
69
69
|
XverseIcon,
|
|
70
70
|
YoutubeIcon
|
|
71
|
-
} from "./chunk-
|
|
71
|
+
} from "./chunk-7SUDHG7S.mjs";
|
|
72
72
|
import {
|
|
73
73
|
confirm_default,
|
|
74
74
|
connecting_default,
|
|
@@ -3001,6 +3001,12 @@ var useWalletModalStore = create5((set) => ({
|
|
|
3001
3001
|
open: (type, methods = DEFAULT_WALLET_METHODS) => set({ isOpen: true, type, methods }),
|
|
3002
3002
|
close: () => set({ isOpen: false })
|
|
3003
3003
|
}));
|
|
3004
|
+
var useEmailModalStore = create5((set) => ({
|
|
3005
|
+
isOpen: false,
|
|
3006
|
+
type: "",
|
|
3007
|
+
open: (type) => set({ isOpen: true, type }),
|
|
3008
|
+
close: () => set({ isOpen: false })
|
|
3009
|
+
}));
|
|
3004
3010
|
|
|
3005
3011
|
// src/components/CEXBindModal/index.tsx
|
|
3006
3012
|
import { useEffect as useEffect16, useMemo as useMemo7, useState as useState16 } from "react";
|
|
@@ -3021,7 +3027,7 @@ function CEXBindModal({
|
|
|
3021
3027
|
const [secret, setSecret] = useState16("");
|
|
3022
3028
|
const [error, setError] = useState16("");
|
|
3023
3029
|
const needPassphrase = useMemo7(() => {
|
|
3024
|
-
return ["bitget", "okx"].includes(type.toLowerCase());
|
|
3030
|
+
return ["bitget", "okx", "kucoin"].includes(type.toLowerCase());
|
|
3025
3031
|
}, [type]);
|
|
3026
3032
|
useEffect16(() => {
|
|
3027
3033
|
if (isOpen) {
|
|
@@ -3117,7 +3123,25 @@ function CEXBindModal({
|
|
|
3117
3123
|
|
|
3118
3124
|
// src/context/BusinessProvider.tsx
|
|
3119
3125
|
import { useQuery as useQuery7 } from "@tanstack/react-query";
|
|
3120
|
-
|
|
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";
|
|
3121
3145
|
function BusinessProvider({ children }) {
|
|
3122
3146
|
const { overview, token } = useUserInfo();
|
|
3123
3147
|
const { type: EVMType, isOpen: EVMIsOpen, close: EVMClose } = useEVMModalStore();
|
|
@@ -3125,6 +3149,7 @@ function BusinessProvider({ children }) {
|
|
|
3125
3149
|
const { type: TRONType, isOpen: TRONIsOpen, close: TRONClose } = useTRONModalStore();
|
|
3126
3150
|
const { type: BTCType, isOpen: BTCIsOpen, close: BTCClose } = useBTCModalStore();
|
|
3127
3151
|
const { type: CEXType, isOpen: CEXIsOpen, close: CEXClose } = useCEXBindModalStore();
|
|
3152
|
+
const { type: EmailType, isOpen: EmailIsOpen, close: EmailClose } = useEmailModalStore();
|
|
3128
3153
|
const WalletModalStore = useWalletModalStore();
|
|
3129
3154
|
const { tgAppAuthCode, setTgAppAuthCode } = useStore_default();
|
|
3130
3155
|
const { login } = useMatch();
|
|
@@ -3152,7 +3177,7 @@ function BusinessProvider({ children }) {
|
|
|
3152
3177
|
refetchInterval: 1e3 * 5
|
|
3153
3178
|
});
|
|
3154
3179
|
return /* @__PURE__ */ jsxs14(Fragment4, { children: [
|
|
3155
|
-
/* @__PURE__ */
|
|
3180
|
+
/* @__PURE__ */ jsx26(
|
|
3156
3181
|
EVMModal,
|
|
3157
3182
|
{
|
|
3158
3183
|
isOpen: EVMIsOpen && (EVMType == "login" && !overview && !token || EVMType == "bind" && !!token && !!overview),
|
|
@@ -3162,7 +3187,7 @@ function BusinessProvider({ children }) {
|
|
|
3162
3187
|
zIndex: 199
|
|
3163
3188
|
}
|
|
3164
3189
|
),
|
|
3165
|
-
/* @__PURE__ */
|
|
3190
|
+
/* @__PURE__ */ jsx26(
|
|
3166
3191
|
TRONModal,
|
|
3167
3192
|
{
|
|
3168
3193
|
isOpen: TRONIsOpen && (TRONType == "login" && !overview && !token || TRONType == "bind" && !!token && !!overview),
|
|
@@ -3172,7 +3197,7 @@ function BusinessProvider({ children }) {
|
|
|
3172
3197
|
zIndex: 199
|
|
3173
3198
|
}
|
|
3174
3199
|
),
|
|
3175
|
-
/* @__PURE__ */
|
|
3200
|
+
/* @__PURE__ */ jsx26(
|
|
3176
3201
|
TONModal,
|
|
3177
3202
|
{
|
|
3178
3203
|
isOpen: TONIsOpen && (TONType == "login" && !overview && !token || TONType == "bind" && !!token && !!overview),
|
|
@@ -3182,7 +3207,7 @@ function BusinessProvider({ children }) {
|
|
|
3182
3207
|
zIndex: 199
|
|
3183
3208
|
}
|
|
3184
3209
|
),
|
|
3185
|
-
/* @__PURE__ */
|
|
3210
|
+
/* @__PURE__ */ jsx26(
|
|
3186
3211
|
BTCModal,
|
|
3187
3212
|
{
|
|
3188
3213
|
isOpen: BTCIsOpen && (BTCType == "login" && !overview && !token || BTCType == "bind" && !!token && !!overview),
|
|
@@ -3192,7 +3217,7 @@ function BusinessProvider({ children }) {
|
|
|
3192
3217
|
zIndex: 199
|
|
3193
3218
|
}
|
|
3194
3219
|
),
|
|
3195
|
-
/* @__PURE__ */
|
|
3220
|
+
/* @__PURE__ */ jsx26(
|
|
3196
3221
|
CEXBindModal,
|
|
3197
3222
|
{
|
|
3198
3223
|
isOpen: CEXIsOpen && (!!token && !!overview),
|
|
@@ -3201,7 +3226,7 @@ function BusinessProvider({ children }) {
|
|
|
3201
3226
|
zIndex: 199
|
|
3202
3227
|
}
|
|
3203
3228
|
),
|
|
3204
|
-
/* @__PURE__ */
|
|
3229
|
+
/* @__PURE__ */ jsx26(
|
|
3205
3230
|
WalletModal,
|
|
3206
3231
|
{
|
|
3207
3232
|
isOpen: WalletModalStore.isOpen && (WalletModalStore.type == "login" && !overview && !token || WalletModalStore.type == "bind" && !!token && !!overview),
|
|
@@ -3211,14 +3236,22 @@ function BusinessProvider({ children }) {
|
|
|
3211
3236
|
zIndex: 150
|
|
3212
3237
|
}
|
|
3213
3238
|
),
|
|
3239
|
+
/* @__PURE__ */ jsx26(
|
|
3240
|
+
BindEmailModal_default,
|
|
3241
|
+
{
|
|
3242
|
+
isOpen: EmailIsOpen && (EmailType == "bind" && !!token && !!overview),
|
|
3243
|
+
onClose: EmailClose,
|
|
3244
|
+
onLogin: EmailClose
|
|
3245
|
+
}
|
|
3246
|
+
),
|
|
3214
3247
|
children
|
|
3215
3248
|
] });
|
|
3216
3249
|
}
|
|
3217
3250
|
|
|
3218
3251
|
// src/context/index.tsx
|
|
3219
|
-
import { jsx as
|
|
3252
|
+
import { jsx as jsx27 } from "react/jsx-runtime";
|
|
3220
3253
|
var Providers = ({ children }) => {
|
|
3221
|
-
return /* @__PURE__ */
|
|
3254
|
+
return /* @__PURE__ */ jsx27(ToastProvider, { children: /* @__PURE__ */ jsx27(ModalProvider, { children: /* @__PURE__ */ jsx27(BusinessProvider, { children }) }) });
|
|
3222
3255
|
};
|
|
3223
3256
|
var context_default = Providers;
|
|
3224
3257
|
|
|
@@ -3692,7 +3725,7 @@ var en_default = {
|
|
|
3692
3725
|
noMore: "No more",
|
|
3693
3726
|
Remove: "Remove",
|
|
3694
3727
|
removeSuccess: "Remove Successfully",
|
|
3695
|
-
loginAgreement: "By
|
|
3728
|
+
loginAgreement: "By login, you agree to our <termsLink>Terms of Service</termsLink> and <privacyLink>Privacy Policy</privacyLink>",
|
|
3696
3729
|
poweredBy: "Powered by"
|
|
3697
3730
|
};
|
|
3698
3731
|
|
|
@@ -4440,7 +4473,7 @@ import {
|
|
|
4440
4473
|
} from "@rainbow-me/rainbowkit/wallets";
|
|
4441
4474
|
import { arbitrum, base, bsc, mainnet, optimism, polygon } from "wagmi/chains";
|
|
4442
4475
|
import { WagmiProvider } from "wagmi";
|
|
4443
|
-
import { jsx as
|
|
4476
|
+
import { jsx as jsx28 } from "react/jsx-runtime";
|
|
4444
4477
|
var queryClient = new QueryClient();
|
|
4445
4478
|
var wagmiConfig = getDefaultConfig({
|
|
4446
4479
|
appName: "MatchID",
|
|
@@ -4479,7 +4512,7 @@ var MatchProvider = ({
|
|
|
4479
4512
|
useWalletInit({
|
|
4480
4513
|
config: wallet
|
|
4481
4514
|
});
|
|
4482
|
-
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(
|
|
4483
4516
|
MatchContext.Provider,
|
|
4484
4517
|
{
|
|
4485
4518
|
value: {
|
|
@@ -4490,7 +4523,7 @@ var MatchProvider = ({
|
|
|
4490
4523
|
theme,
|
|
4491
4524
|
locale: realLocale
|
|
4492
4525
|
},
|
|
4493
|
-
children: /* @__PURE__ */
|
|
4526
|
+
children: /* @__PURE__ */ jsx28(context_default, { children })
|
|
4494
4527
|
}
|
|
4495
4528
|
) }) }) });
|
|
4496
4529
|
};
|
|
@@ -4526,6 +4559,7 @@ function useUserInfo() {
|
|
|
4526
4559
|
const { open: BTCOpen } = useBTCModalStore();
|
|
4527
4560
|
const { open: CEXBindOpen } = useCEXBindModalStore();
|
|
4528
4561
|
const walletModalStore = useWalletModalStore();
|
|
4562
|
+
const emailModalStore = useEmailModalStore();
|
|
4529
4563
|
const getRedirectUri = () => {
|
|
4530
4564
|
return encodeURIComponent(window.location.href);
|
|
4531
4565
|
};
|
|
@@ -4618,8 +4652,8 @@ function useUserInfo() {
|
|
|
4618
4652
|
case "discord":
|
|
4619
4653
|
case "github":
|
|
4620
4654
|
case "linkedin":
|
|
4621
|
-
case "kakao":
|
|
4622
4655
|
case "facebook":
|
|
4656
|
+
case "kakao":
|
|
4623
4657
|
return await loginByMethod(method);
|
|
4624
4658
|
default:
|
|
4625
4659
|
throw new Error("unsupported method");
|
|
@@ -4704,6 +4738,8 @@ function useUserInfo() {
|
|
|
4704
4738
|
return TONOpen("bind");
|
|
4705
4739
|
case "btc":
|
|
4706
4740
|
return BTCOpen("bind");
|
|
4741
|
+
case "email":
|
|
4742
|
+
return emailModalStore.open("bind");
|
|
4707
4743
|
case "telegram":
|
|
4708
4744
|
return await bindTelegram();
|
|
4709
4745
|
case "twitter":
|
|
@@ -4713,6 +4749,7 @@ function useUserInfo() {
|
|
|
4713
4749
|
case "linkedin":
|
|
4714
4750
|
case "facebook":
|
|
4715
4751
|
case "youtube":
|
|
4752
|
+
case "kakao":
|
|
4716
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" : ""}`;
|
|
4717
4754
|
matchlog_default.log("link", link);
|
|
4718
4755
|
return window.open(
|
|
@@ -4727,6 +4764,31 @@ function useUserInfo() {
|
|
|
4727
4764
|
const bindCex = (type) => {
|
|
4728
4765
|
return CEXBindOpen(type);
|
|
4729
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
|
+
};
|
|
4730
4792
|
const getAuthInfo = async (method) => {
|
|
4731
4793
|
const element_id = "auth_iframe";
|
|
4732
4794
|
if (document.getElementById(element_id)) {
|
|
@@ -4795,6 +4857,7 @@ function useUserInfo() {
|
|
|
4795
4857
|
auth,
|
|
4796
4858
|
login: loginMethod,
|
|
4797
4859
|
bind,
|
|
4860
|
+
bindByEmail,
|
|
4798
4861
|
getAuthInfo,
|
|
4799
4862
|
invite
|
|
4800
4863
|
};
|
|
@@ -4803,10 +4866,10 @@ function useUserInfo() {
|
|
|
4803
4866
|
// src/components/EmailModal/StepVerify.tsx
|
|
4804
4867
|
import { useEffect as useEffect20, useMemo as useMemo9, useRef as useRef6, useState as useState18 } from "react";
|
|
4805
4868
|
import { FormattedMessage as FormattedMessage6, useIntl as useIntl7 } from "react-intl";
|
|
4806
|
-
import { jsx as
|
|
4869
|
+
import { jsx as jsx29, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
4807
4870
|
function StepVerify(props) {
|
|
4808
4871
|
const intl = useIntl7();
|
|
4809
|
-
const { getLoginEmailCode, loginByEmail } = useUserInfo();
|
|
4872
|
+
const { getLoginEmailCode, loginByEmail, bindByEmail } = useUserInfo();
|
|
4810
4873
|
const [error, setError] = useState18("");
|
|
4811
4874
|
const [code, setCode] = useState18("");
|
|
4812
4875
|
const [sending, setSending] = useState18(false);
|
|
@@ -4866,7 +4929,10 @@ function StepVerify(props) {
|
|
|
4866
4929
|
try {
|
|
4867
4930
|
setError("");
|
|
4868
4931
|
setSubmitting(true);
|
|
4869
|
-
const res = await
|
|
4932
|
+
const res = props.type === "bind" ? await bindByEmail({
|
|
4933
|
+
email: props.email,
|
|
4934
|
+
code
|
|
4935
|
+
}) : await loginByEmail({
|
|
4870
4936
|
email: props.email,
|
|
4871
4937
|
code
|
|
4872
4938
|
});
|
|
@@ -4882,15 +4948,15 @@ function StepVerify(props) {
|
|
|
4882
4948
|
};
|
|
4883
4949
|
return /* @__PURE__ */ jsxs15("div", { className: "matchid-email-verify-box", children: [
|
|
4884
4950
|
/* @__PURE__ */ jsxs15("div", { className: "matchid-email-verify-header", children: [
|
|
4885
|
-
/* @__PURE__ */
|
|
4951
|
+
/* @__PURE__ */ jsx29("div", { className: "matchid-email-verify-header-icon", children: /* @__PURE__ */ jsx29(EmailLineIcon, { size: isDownMd ? 19 : 24 }) }),
|
|
4886
4952
|
/* @__PURE__ */ jsxs15("div", { className: "matchid-email-verify-header-content", children: [
|
|
4887
|
-
/* @__PURE__ */
|
|
4888
|
-
/* @__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" }) })
|
|
4889
4955
|
] })
|
|
4890
4956
|
] }),
|
|
4891
|
-
/* @__PURE__ */
|
|
4957
|
+
/* @__PURE__ */ jsx29(Field, { label: intl.formatMessage({
|
|
4892
4958
|
id: "verificationCode"
|
|
4893
|
-
}), error, children: /* @__PURE__ */
|
|
4959
|
+
}), error, children: /* @__PURE__ */ jsx29(
|
|
4894
4960
|
Input,
|
|
4895
4961
|
{
|
|
4896
4962
|
placeholder: intl.formatMessage({
|
|
@@ -4900,7 +4966,7 @@ function StepVerify(props) {
|
|
|
4900
4966
|
maxLength: codeLength,
|
|
4901
4967
|
onChange: (e) => setCode(e.target.value),
|
|
4902
4968
|
value: code,
|
|
4903
|
-
after: /* @__PURE__ */
|
|
4969
|
+
after: /* @__PURE__ */ jsx29(
|
|
4904
4970
|
Button,
|
|
4905
4971
|
{
|
|
4906
4972
|
highlight: true,
|
|
@@ -4919,19 +4985,20 @@ function StepVerify(props) {
|
|
|
4919
4985
|
)
|
|
4920
4986
|
}
|
|
4921
4987
|
) }),
|
|
4922
|
-
/* @__PURE__ */
|
|
4988
|
+
/* @__PURE__ */ jsx29(Button, { disabled: !canContinue, loading: submitting, highlight: true, block: true, size: "lg", onClick: onContinue, children: /* @__PURE__ */ jsx29(FormattedMessage6, { id: "continue" }) })
|
|
4923
4989
|
] });
|
|
4924
4990
|
}
|
|
4925
4991
|
|
|
4926
4992
|
// src/components/EmailModal/index.tsx
|
|
4927
4993
|
import { useIntl as useIntl8 } from "react-intl";
|
|
4928
|
-
import { jsx as
|
|
4994
|
+
import { jsx as jsx30 } from "react/jsx-runtime";
|
|
4929
4995
|
function EmailModal({
|
|
4930
4996
|
isOpen = false,
|
|
4931
4997
|
width = 480,
|
|
4932
4998
|
onClose,
|
|
4933
4999
|
onBack,
|
|
4934
|
-
onLogin
|
|
5000
|
+
onLogin,
|
|
5001
|
+
type = "login"
|
|
4935
5002
|
}) {
|
|
4936
5003
|
const [step, setStep] = useState19("input");
|
|
4937
5004
|
const [emailVal, setEmailVal] = useState19("");
|
|
@@ -4942,7 +5009,7 @@ function EmailModal({
|
|
|
4942
5009
|
setEmailVal("");
|
|
4943
5010
|
}
|
|
4944
5011
|
}, [isOpen]);
|
|
4945
|
-
return /* @__PURE__ */
|
|
5012
|
+
return /* @__PURE__ */ jsx30(
|
|
4946
5013
|
ModalWithHeader,
|
|
4947
5014
|
{
|
|
4948
5015
|
isOpen,
|
|
@@ -4952,10 +5019,10 @@ function EmailModal({
|
|
|
4952
5019
|
id: "email"
|
|
4953
5020
|
}),
|
|
4954
5021
|
onBack: step == "verify" ? () => setStep("input") : onBack,
|
|
4955
|
-
children: step === "input" ? /* @__PURE__ */
|
|
5022
|
+
children: step === "input" ? /* @__PURE__ */ jsx30(StepEmail, { email: emailVal, onContinue: (email) => {
|
|
4956
5023
|
setEmailVal(email);
|
|
4957
5024
|
setStep("verify");
|
|
4958
|
-
} }) : /* @__PURE__ */
|
|
5025
|
+
} }) : /* @__PURE__ */ jsx30(StepVerify, { type, email: emailVal, onSuccess: onLogin })
|
|
4959
5026
|
}
|
|
4960
5027
|
);
|
|
4961
5028
|
}
|
|
@@ -4985,7 +5052,7 @@ function useAppConfig() {
|
|
|
4985
5052
|
}
|
|
4986
5053
|
|
|
4987
5054
|
// src/components/LoginBox/index.tsx
|
|
4988
|
-
import { Fragment as Fragment5, jsx as
|
|
5055
|
+
import { Fragment as Fragment5, jsx as jsx31, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
4989
5056
|
var RecommendItem = ({
|
|
4990
5057
|
icon,
|
|
4991
5058
|
name,
|
|
@@ -4997,17 +5064,17 @@ var RecommendItem = ({
|
|
|
4997
5064
|
return /* @__PURE__ */ jsxs16("div", { className: "matchid-login-recommend-method", children: [
|
|
4998
5065
|
/* @__PURE__ */ jsxs16("div", { className: "matchid-login-recommend-method-item", onClick, children: [
|
|
4999
5066
|
/* @__PURE__ */ jsxs16("div", { className: "matchid-login-recommend-method-content", children: [
|
|
5000
|
-
/* @__PURE__ */
|
|
5001
|
-
/* @__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 })
|
|
5002
5069
|
] }),
|
|
5003
|
-
footer ? footer : children ? /* @__PURE__ */
|
|
5070
|
+
footer ? footer : children ? /* @__PURE__ */ jsx31(
|
|
5004
5071
|
ArrowDownIcon,
|
|
5005
5072
|
{
|
|
5006
5073
|
className: `matchid-login-recommend-method-arrow ${showChildren ? "matchid-login-recommend-method-arrow-active" : ""}`,
|
|
5007
5074
|
size: 20,
|
|
5008
5075
|
color: "var(--matchid-arrow-color)"
|
|
5009
5076
|
}
|
|
5010
|
-
) : /* @__PURE__ */
|
|
5077
|
+
) : /* @__PURE__ */ jsx31(
|
|
5011
5078
|
ArrowRightIcon,
|
|
5012
5079
|
{
|
|
5013
5080
|
className: "matchid-login-recommend-method-arrow",
|
|
@@ -5016,7 +5083,7 @@ var RecommendItem = ({
|
|
|
5016
5083
|
}
|
|
5017
5084
|
)
|
|
5018
5085
|
] }),
|
|
5019
|
-
children && /* @__PURE__ */
|
|
5086
|
+
children && /* @__PURE__ */ jsx31(
|
|
5020
5087
|
"div",
|
|
5021
5088
|
{
|
|
5022
5089
|
className: `matchid-login-recommend-method-popover ${showChildren ? "matchid-login-recommend-method-popover-active" : ""}`,
|
|
@@ -5053,7 +5120,7 @@ function LoginBox({
|
|
|
5053
5120
|
}
|
|
5054
5121
|
return p.toLowerCase();
|
|
5055
5122
|
});
|
|
5056
|
-
console.log("
|
|
5123
|
+
console.log("platform", platform);
|
|
5057
5124
|
const walletMethodList = WALLET_METHODS.filter((m) => platform.includes(m));
|
|
5058
5125
|
let recommendMethodList = walletMethodList.length > 0 ? ["wallet"] : [];
|
|
5059
5126
|
let methodList = [];
|
|
@@ -5081,60 +5148,60 @@ function LoginBox({
|
|
|
5081
5148
|
const isDownMd = useDownMd();
|
|
5082
5149
|
const methodMap = {
|
|
5083
5150
|
wallet: {
|
|
5084
|
-
icon: /* @__PURE__ */
|
|
5151
|
+
icon: /* @__PURE__ */ jsx31(WalletIcon, { size: isDownMd ? 36 : 40 }),
|
|
5085
5152
|
name: intl.formatMessage({ id: "wallet" }),
|
|
5086
5153
|
onClick: () => setShowWallet(!showWallet),
|
|
5087
5154
|
type: "wallet"
|
|
5088
5155
|
},
|
|
5089
5156
|
email: {
|
|
5090
|
-
icon: /* @__PURE__ */
|
|
5157
|
+
icon: /* @__PURE__ */ jsx31(EmailIcon, { size: isDownMd ? 36 : 40 }),
|
|
5091
5158
|
name: intl.formatMessage({ id: "email" }),
|
|
5092
5159
|
onClick: () => {
|
|
5093
5160
|
setEmailOpen(true);
|
|
5094
5161
|
}
|
|
5095
5162
|
},
|
|
5096
5163
|
google: {
|
|
5097
|
-
icon: /* @__PURE__ */
|
|
5164
|
+
icon: /* @__PURE__ */ jsx31(GoogleIcon, { size: isDownMd ? 36 : 40 }),
|
|
5098
5165
|
name: "Google",
|
|
5099
5166
|
onClick: () => login("google")
|
|
5100
5167
|
},
|
|
5101
5168
|
twitter: {
|
|
5102
|
-
icon: /* @__PURE__ */
|
|
5169
|
+
icon: /* @__PURE__ */ jsx31(XIcon, { size: isDownMd ? 36 : 40 }),
|
|
5103
5170
|
name: "X",
|
|
5104
5171
|
onClick: () => login("twitter")
|
|
5105
5172
|
},
|
|
5106
5173
|
telegram: {
|
|
5107
|
-
icon: /* @__PURE__ */
|
|
5174
|
+
icon: /* @__PURE__ */ jsx31(TelegramIcon, { size: isDownMd ? 36 : 40 }),
|
|
5108
5175
|
name: "Telegram",
|
|
5109
5176
|
onClick: () => login("telegram")
|
|
5110
5177
|
},
|
|
5111
5178
|
github: {
|
|
5112
|
-
icon: /* @__PURE__ */
|
|
5179
|
+
icon: /* @__PURE__ */ jsx31(GithubIcon, { size: isDownMd ? 36 : 40 }),
|
|
5113
5180
|
name: "Github",
|
|
5114
5181
|
onClick: () => login("github")
|
|
5115
5182
|
},
|
|
5116
5183
|
discord: {
|
|
5117
|
-
icon: /* @__PURE__ */
|
|
5184
|
+
icon: /* @__PURE__ */ jsx31(DiscordIcon, { size: isDownMd ? 36 : 40 }),
|
|
5118
5185
|
name: "Discord",
|
|
5119
5186
|
onClick: () => login("discord")
|
|
5120
5187
|
},
|
|
5121
5188
|
linkedin: {
|
|
5122
|
-
icon: /* @__PURE__ */
|
|
5189
|
+
icon: /* @__PURE__ */ jsx31(LinkedinIcon, { size: isDownMd ? 36 : 40 }),
|
|
5123
5190
|
name: "LinkedIn",
|
|
5124
5191
|
onClick: () => login("linkedin")
|
|
5125
5192
|
},
|
|
5126
5193
|
facebook: {
|
|
5127
|
-
icon: /* @__PURE__ */
|
|
5194
|
+
icon: /* @__PURE__ */ jsx31(FacebookIcon, { size: isDownMd ? 36 : 40 }),
|
|
5128
5195
|
name: "Facebook",
|
|
5129
5196
|
onClick: () => login("facebook")
|
|
5130
5197
|
},
|
|
5131
5198
|
youtube: {
|
|
5132
|
-
icon: /* @__PURE__ */
|
|
5199
|
+
icon: /* @__PURE__ */ jsx31(YoutubeIcon, { size: isDownMd ? 36 : 40 }),
|
|
5133
5200
|
name: "Youtube",
|
|
5134
5201
|
onClick: () => login("youtube")
|
|
5135
5202
|
},
|
|
5136
5203
|
kakao: {
|
|
5137
|
-
icon: /* @__PURE__ */
|
|
5204
|
+
icon: /* @__PURE__ */ jsx31(KakaoIcon, { size: isDownMd ? 36 : 40 }),
|
|
5138
5205
|
name: "Kakao",
|
|
5139
5206
|
onClick: () => login("kakao")
|
|
5140
5207
|
}
|
|
@@ -5142,8 +5209,8 @@ function LoginBox({
|
|
|
5142
5209
|
const { walletMap } = useWalletConfig();
|
|
5143
5210
|
return /* @__PURE__ */ jsxs16(Fragment5, { children: [
|
|
5144
5211
|
(!inModal || !emailOpen) && /* @__PURE__ */ jsxs16("div", { className: "matchid-login-box", children: [
|
|
5145
|
-
/* @__PURE__ */
|
|
5146
|
-
return /* @__PURE__ */
|
|
5212
|
+
/* @__PURE__ */ jsx31("div", { className: "matchid-login-recommend-list", children: methodConfig.recommendMethods.map((m) => {
|
|
5213
|
+
return /* @__PURE__ */ jsx31(
|
|
5147
5214
|
RecommendItem,
|
|
5148
5215
|
{
|
|
5149
5216
|
icon: methodMap[m]?.icon,
|
|
@@ -5151,8 +5218,8 @@ function LoginBox({
|
|
|
5151
5218
|
onClick: methodMap[m]?.onClick,
|
|
5152
5219
|
showChildren: m == "wallet" && showWallet,
|
|
5153
5220
|
children: m == "wallet" && /* @__PURE__ */ jsxs16(Fragment5, { children: [
|
|
5154
|
-
/* @__PURE__ */
|
|
5155
|
-
/* @__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) => {
|
|
5156
5223
|
const m2 = walletMap[n];
|
|
5157
5224
|
return /* @__PURE__ */ jsxs16(
|
|
5158
5225
|
"div",
|
|
@@ -5163,15 +5230,15 @@ function LoginBox({
|
|
|
5163
5230
|
},
|
|
5164
5231
|
children: [
|
|
5165
5232
|
/* @__PURE__ */ jsxs16("div", { className: "matchid-login-recommend-wallet-item-content", children: [
|
|
5166
|
-
/* @__PURE__ */
|
|
5167
|
-
/* @__PURE__ */
|
|
5233
|
+
/* @__PURE__ */ jsx31("div", { className: "matchid-login-recommend-wallet-item-icon", children: m2.icon }),
|
|
5234
|
+
/* @__PURE__ */ jsx31(
|
|
5168
5235
|
"div",
|
|
5169
5236
|
{
|
|
5170
5237
|
className: "matchid-login-recommend-wallet-item-hover-icon",
|
|
5171
5238
|
children: m2.activeIcon
|
|
5172
5239
|
}
|
|
5173
5240
|
),
|
|
5174
|
-
/* @__PURE__ */
|
|
5241
|
+
/* @__PURE__ */ jsx31(
|
|
5175
5242
|
"span",
|
|
5176
5243
|
{
|
|
5177
5244
|
className: "matchid-login-recommend-wallet-item-name",
|
|
@@ -5179,7 +5246,7 @@ function LoginBox({
|
|
|
5179
5246
|
}
|
|
5180
5247
|
)
|
|
5181
5248
|
] }),
|
|
5182
|
-
/* @__PURE__ */
|
|
5249
|
+
/* @__PURE__ */ jsx31(
|
|
5183
5250
|
ArrowRightIcon,
|
|
5184
5251
|
{
|
|
5185
5252
|
className: "matchid-login-recommend-wallet-item-arrow",
|
|
@@ -5198,12 +5265,12 @@ function LoginBox({
|
|
|
5198
5265
|
);
|
|
5199
5266
|
}) }),
|
|
5200
5267
|
/* @__PURE__ */ jsxs16("div", { className: "matchid-privacy-policy", children: [
|
|
5201
|
-
/* @__PURE__ */
|
|
5268
|
+
/* @__PURE__ */ jsx31("div", { className: "matchid-privacy-policy-content", children: /* @__PURE__ */ jsx31(
|
|
5202
5269
|
FormattedMessage7,
|
|
5203
5270
|
{
|
|
5204
5271
|
id: "loginAgreement",
|
|
5205
5272
|
values: {
|
|
5206
|
-
termsLink: (chunks) => /* @__PURE__ */
|
|
5273
|
+
termsLink: (chunks) => /* @__PURE__ */ jsx31(
|
|
5207
5274
|
"a",
|
|
5208
5275
|
{
|
|
5209
5276
|
href: TERMS_OF_SERVICE_URL,
|
|
@@ -5213,7 +5280,7 @@ function LoginBox({
|
|
|
5213
5280
|
children: chunks
|
|
5214
5281
|
}
|
|
5215
5282
|
),
|
|
5216
|
-
privacyLink: (chunks) => /* @__PURE__ */
|
|
5283
|
+
privacyLink: (chunks) => /* @__PURE__ */ jsx31(
|
|
5217
5284
|
"a",
|
|
5218
5285
|
{
|
|
5219
5286
|
href: PRIVACY_POLICY_URL,
|
|
@@ -5227,18 +5294,18 @@ function LoginBox({
|
|
|
5227
5294
|
}
|
|
5228
5295
|
) }),
|
|
5229
5296
|
/* @__PURE__ */ jsxs16("div", { className: "matchid-privacy-policy-powered-by", children: [
|
|
5230
|
-
/* @__PURE__ */
|
|
5231
|
-
/* @__PURE__ */
|
|
5297
|
+
/* @__PURE__ */ jsx31(FormattedMessage7, { id: "poweredBy" }),
|
|
5298
|
+
/* @__PURE__ */ jsx31(MatchIdIcon_default, {})
|
|
5232
5299
|
] })
|
|
5233
5300
|
] }),
|
|
5234
5301
|
methodConfig.methods.length > 0 && /* @__PURE__ */ jsxs16("div", { className: "matchid-login-other", children: [
|
|
5235
5302
|
/* @__PURE__ */ jsxs16("div", { className: "matchid-login-other-line-box", children: [
|
|
5236
|
-
/* @__PURE__ */
|
|
5237
|
-
/* @__PURE__ */
|
|
5238
|
-
/* @__PURE__ */
|
|
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" })
|
|
5239
5306
|
] }),
|
|
5240
|
-
/* @__PURE__ */
|
|
5241
|
-
return /* @__PURE__ */
|
|
5307
|
+
/* @__PURE__ */ jsx31("div", { className: "matchid-login-method-box", children: methodConfig.methods.map((m) => {
|
|
5308
|
+
return /* @__PURE__ */ jsx31(
|
|
5242
5309
|
"div",
|
|
5243
5310
|
{
|
|
5244
5311
|
className: "matchid-login-method-item",
|
|
@@ -5251,7 +5318,7 @@ function LoginBox({
|
|
|
5251
5318
|
}) })
|
|
5252
5319
|
] })
|
|
5253
5320
|
] }),
|
|
5254
|
-
/* @__PURE__ */
|
|
5321
|
+
/* @__PURE__ */ jsx31(
|
|
5255
5322
|
EmailModal,
|
|
5256
5323
|
{
|
|
5257
5324
|
isOpen: emailOpen,
|
|
@@ -5271,7 +5338,7 @@ import { useState as useState22 } from "react";
|
|
|
5271
5338
|
|
|
5272
5339
|
// src/components/LoginPanel/index.tsx
|
|
5273
5340
|
import { FormattedMessage as FormattedMessage8 } from "react-intl";
|
|
5274
|
-
import { jsx as
|
|
5341
|
+
import { jsx as jsx32, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
5275
5342
|
function LoginPanel({
|
|
5276
5343
|
header,
|
|
5277
5344
|
onClose,
|
|
@@ -5281,30 +5348,30 @@ function LoginPanel({
|
|
|
5281
5348
|
return /* @__PURE__ */ jsxs17("div", { className: "matchid-login-panel", children: [
|
|
5282
5349
|
header ? header : /* @__PURE__ */ jsxs17("div", { className: "matchid-login-panel-header", children: [
|
|
5283
5350
|
/* @__PURE__ */ jsxs17("div", { className: "matchid-login-panel-header-content", children: [
|
|
5284
|
-
/* @__PURE__ */
|
|
5285
|
-
/* @__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" }) })
|
|
5286
5353
|
] }),
|
|
5287
|
-
onClose && /* @__PURE__ */
|
|
5354
|
+
onClose && /* @__PURE__ */ jsx32("div", { className: "matchid-login-panel-header-close", onClick: onClose, children: /* @__PURE__ */ jsx32(CloseRoundIcon, { size: isDownMd ? 24 : 30 }) })
|
|
5288
5355
|
] }),
|
|
5289
|
-
/* @__PURE__ */
|
|
5290
|
-
/* @__PURE__ */
|
|
5356
|
+
/* @__PURE__ */ jsx32("div", { className: "matchid-login-panel-divide" }),
|
|
5357
|
+
/* @__PURE__ */ jsx32("div", { className: "matchid-login-panel-box", children: /* @__PURE__ */ jsx32(LoginBox, { ...props }) })
|
|
5291
5358
|
] });
|
|
5292
5359
|
}
|
|
5293
5360
|
|
|
5294
5361
|
// src/components/LoginModal/index.tsx
|
|
5295
|
-
import { jsx as
|
|
5362
|
+
import { jsx as jsx33 } from "react/jsx-runtime";
|
|
5296
5363
|
function LoginModal({
|
|
5297
5364
|
isOpen = false,
|
|
5298
5365
|
width = 480,
|
|
5299
5366
|
...props
|
|
5300
5367
|
}) {
|
|
5301
5368
|
const { isLogin } = useUserInfo();
|
|
5302
|
-
return /* @__PURE__ */
|
|
5369
|
+
return /* @__PURE__ */ jsx33(
|
|
5303
5370
|
Modal,
|
|
5304
5371
|
{
|
|
5305
5372
|
isOpen: isOpen && !isLogin,
|
|
5306
5373
|
width,
|
|
5307
|
-
children: /* @__PURE__ */
|
|
5374
|
+
children: /* @__PURE__ */ jsx33(LoginPanel, { ...props, inModal: true })
|
|
5308
5375
|
}
|
|
5309
5376
|
);
|
|
5310
5377
|
}
|
|
@@ -5313,10 +5380,10 @@ function LoginModal({
|
|
|
5313
5380
|
import { useState as useState21 } from "react";
|
|
5314
5381
|
|
|
5315
5382
|
// src/assets/icon/ProfileIcon.tsx
|
|
5316
|
-
import { jsx as
|
|
5383
|
+
import { jsx as jsx34, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
5317
5384
|
function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
5318
5385
|
return /* @__PURE__ */ jsxs18("svg", { width: size, height: size, viewBox: "0 0 24 24", fill: "none", xmlns: "http://www.w3.org/2000/svg", children: [
|
|
5319
|
-
/* @__PURE__ */
|
|
5386
|
+
/* @__PURE__ */ jsx34(
|
|
5320
5387
|
"path",
|
|
5321
5388
|
{
|
|
5322
5389
|
fillRule: "evenodd",
|
|
@@ -5325,7 +5392,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
5325
5392
|
fill: color
|
|
5326
5393
|
}
|
|
5327
5394
|
),
|
|
5328
|
-
/* @__PURE__ */
|
|
5395
|
+
/* @__PURE__ */ jsx34(
|
|
5329
5396
|
"path",
|
|
5330
5397
|
{
|
|
5331
5398
|
fillRule: "evenodd",
|
|
@@ -5339,7 +5406,7 @@ function ProfileIcon({ size = 24, color = "black", ...props }) {
|
|
|
5339
5406
|
|
|
5340
5407
|
// src/components/UserPopover/index.tsx
|
|
5341
5408
|
import { FormattedMessage as FormattedMessage9, useIntl as useIntl10 } from "react-intl";
|
|
5342
|
-
import { jsx as
|
|
5409
|
+
import { jsx as jsx35, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
5343
5410
|
function UserContent() {
|
|
5344
5411
|
const { logout, address, username } = useUserInfo();
|
|
5345
5412
|
const [logouting, setLogouting] = useState21(false);
|
|
@@ -5363,31 +5430,31 @@ function UserContent() {
|
|
|
5363
5430
|
return /* @__PURE__ */ jsxs19("div", { className: "matchid-user-popover-item", onClick, children: [
|
|
5364
5431
|
/* @__PURE__ */ jsxs19("div", { className: `matchid-user-popover-item-content`, children: [
|
|
5365
5432
|
icon,
|
|
5366
|
-
/* @__PURE__ */
|
|
5433
|
+
/* @__PURE__ */ jsx35("div", { className: "matchid-user-popover-item-text", children })
|
|
5367
5434
|
] }),
|
|
5368
5435
|
rightIcon
|
|
5369
5436
|
] });
|
|
5370
5437
|
};
|
|
5371
5438
|
const UserDivider = () => {
|
|
5372
|
-
return /* @__PURE__ */
|
|
5439
|
+
return /* @__PURE__ */ jsx35("div", { className: `matchid-user-popover-divider` });
|
|
5373
5440
|
};
|
|
5374
5441
|
const [usernameOpen, setUsernameOpen] = useState21(false);
|
|
5375
5442
|
const [copied, setCopied] = useCopyClipboard();
|
|
5376
5443
|
const intl = useIntl10();
|
|
5377
5444
|
return /* @__PURE__ */ jsxs19("div", { className: "matchid-user-popover-content", children: [
|
|
5378
5445
|
/* @__PURE__ */ jsxs19("div", { className: "matchid-user-popover-list", children: [
|
|
5379
|
-
/* @__PURE__ */
|
|
5446
|
+
/* @__PURE__ */ jsx35(UserItem, { onClick: () => {
|
|
5380
5447
|
setCopied(address);
|
|
5381
|
-
}, icon: copied ? /* @__PURE__ */
|
|
5382
|
-
/* @__PURE__ */
|
|
5383
|
-
/* @__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: () => {
|
|
5384
5451
|
setUsernameOpen(true);
|
|
5385
|
-
}, 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({
|
|
5386
5453
|
id: "setUsername"
|
|
5387
5454
|
}) })
|
|
5388
5455
|
] }),
|
|
5389
|
-
/* @__PURE__ */
|
|
5390
|
-
/* @__PURE__ */
|
|
5456
|
+
/* @__PURE__ */ jsx35(Button, { onClick: onLogout, loading: logouting, children: /* @__PURE__ */ jsx35(FormattedMessage9, { id: "disconnect" }) }),
|
|
5457
|
+
/* @__PURE__ */ jsx35(UsernameModal, { isOpen: usernameOpen, onClose: () => {
|
|
5391
5458
|
setUsernameOpen(false);
|
|
5392
5459
|
}, onSuccess: () => {
|
|
5393
5460
|
setUsernameOpen(false);
|
|
@@ -5398,12 +5465,12 @@ function UserPopover({
|
|
|
5398
5465
|
children,
|
|
5399
5466
|
...props
|
|
5400
5467
|
}) {
|
|
5401
|
-
return /* @__PURE__ */
|
|
5468
|
+
return /* @__PURE__ */ jsx35(Popover, { ...props, content: /* @__PURE__ */ jsx35(UserContent, {}), children });
|
|
5402
5469
|
}
|
|
5403
5470
|
|
|
5404
5471
|
// src/components/LoginButton/index.tsx
|
|
5405
5472
|
import { FormattedMessage as FormattedMessage10, useIntl as useIntl11 } from "react-intl";
|
|
5406
|
-
import { Fragment as Fragment6, jsx as
|
|
5473
|
+
import { Fragment as Fragment6, jsx as jsx36, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
5407
5474
|
function LoginButton({
|
|
5408
5475
|
loginRender,
|
|
5409
5476
|
methods,
|
|
@@ -5420,7 +5487,7 @@ function LoginButton({
|
|
|
5420
5487
|
const [loginOpen, setLoginOpen] = useState22(false);
|
|
5421
5488
|
if (!isLogin) {
|
|
5422
5489
|
return /* @__PURE__ */ jsxs20(Fragment6, { children: [
|
|
5423
|
-
/* @__PURE__ */
|
|
5490
|
+
/* @__PURE__ */ jsx36(
|
|
5424
5491
|
LoginModal,
|
|
5425
5492
|
{
|
|
5426
5493
|
methods,
|
|
@@ -5431,14 +5498,14 @@ function LoginButton({
|
|
|
5431
5498
|
}
|
|
5432
5499
|
),
|
|
5433
5500
|
/* @__PURE__ */ jsxs20(Button, { className: "matchid-unlogin-btn", ...props, highlight: true, onClick: () => setLoginOpen(true), children: [
|
|
5434
|
-
/* @__PURE__ */
|
|
5435
|
-
/* @__PURE__ */
|
|
5501
|
+
/* @__PURE__ */ jsx36(UnLoginIcon_default, {}),
|
|
5502
|
+
/* @__PURE__ */ jsx36("span", { children: /* @__PURE__ */ jsx36(FormattedMessage10, { id: "login" }) })
|
|
5436
5503
|
] })
|
|
5437
5504
|
] });
|
|
5438
5505
|
}
|
|
5439
|
-
return loginRender ? /* @__PURE__ */
|
|
5440
|
-
/* @__PURE__ */
|
|
5441
|
-
/* @__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({
|
|
5442
5509
|
id: "user"
|
|
5443
5510
|
}) })
|
|
5444
5511
|
] }) });
|
|
@@ -5447,15 +5514,15 @@ function LoginButton({
|
|
|
5447
5514
|
// src/components/UsernameModal/index.tsx
|
|
5448
5515
|
import { useEffect as useEffect22, useMemo as useMemo11, useState as useState23 } from "react";
|
|
5449
5516
|
import { FormattedMessage as FormattedMessage11, useIntl as useIntl12 } from "react-intl";
|
|
5450
|
-
import { jsx as
|
|
5517
|
+
import { jsx as jsx37, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
5451
5518
|
var ValidItem = ({
|
|
5452
5519
|
success = false,
|
|
5453
5520
|
text
|
|
5454
5521
|
}) => {
|
|
5455
5522
|
const isDownMd = useDownMd();
|
|
5456
5523
|
return /* @__PURE__ */ jsxs21("div", { className: `matchid-valid-status-item matchid-valid-status-${success ? "success" : "error"}`, children: [
|
|
5457
|
-
success ? /* @__PURE__ */
|
|
5458
|
-
/* @__PURE__ */
|
|
5524
|
+
success ? /* @__PURE__ */ jsx37(CheckRoundIcon, { size: isDownMd ? 12 : 16 }) : /* @__PURE__ */ jsx37(InfoLineIcon, { size: isDownMd ? 12 : 16 }),
|
|
5525
|
+
/* @__PURE__ */ jsx37("span", { children: text })
|
|
5459
5526
|
] });
|
|
5460
5527
|
};
|
|
5461
5528
|
function UsernameModal({
|
|
@@ -5503,12 +5570,12 @@ function UsernameModal({
|
|
|
5503
5570
|
}
|
|
5504
5571
|
};
|
|
5505
5572
|
const intl = useIntl12();
|
|
5506
|
-
return /* @__PURE__ */
|
|
5573
|
+
return /* @__PURE__ */ jsx37(ModalWithHeader, { isOpen: isOpen && isLogin, ...props, title: title || intl.formatMessage({
|
|
5507
5574
|
id: username ? "editUsernameTitle" : "setUsernameTitle"
|
|
5508
5575
|
}), children: /* @__PURE__ */ jsxs21("div", { className: "matchid-username-box", children: [
|
|
5509
|
-
/* @__PURE__ */
|
|
5576
|
+
/* @__PURE__ */ jsx37(Field, { label: intl.formatMessage({
|
|
5510
5577
|
id: "username"
|
|
5511
|
-
}), error, children: /* @__PURE__ */
|
|
5578
|
+
}), error, children: /* @__PURE__ */ jsx37(
|
|
5512
5579
|
Input,
|
|
5513
5580
|
{
|
|
5514
5581
|
placeholder: intl.formatMessage({
|
|
@@ -5522,7 +5589,7 @@ function UsernameModal({
|
|
|
5522
5589
|
}
|
|
5523
5590
|
) }),
|
|
5524
5591
|
/* @__PURE__ */ jsxs21("div", { className: "matchid-valid", children: [
|
|
5525
|
-
/* @__PURE__ */
|
|
5592
|
+
/* @__PURE__ */ jsx37(
|
|
5526
5593
|
ValidItem,
|
|
5527
5594
|
{
|
|
5528
5595
|
success: isValid,
|
|
@@ -5531,16 +5598,16 @@ function UsernameModal({
|
|
|
5531
5598
|
})
|
|
5532
5599
|
}
|
|
5533
5600
|
),
|
|
5534
|
-
/* @__PURE__ */
|
|
5601
|
+
/* @__PURE__ */ jsx37(ValidItem, { success: isLength, text: intl.formatMessage({
|
|
5535
5602
|
id: "usernameLengthError"
|
|
5536
5603
|
}) })
|
|
5537
5604
|
] }),
|
|
5538
|
-
/* @__PURE__ */
|
|
5605
|
+
/* @__PURE__ */ jsx37(Button, { disabled: !isSafe, loading: isSubmitting, style: {
|
|
5539
5606
|
marginTop: isDownMd ? "36px" : "64px"
|
|
5540
|
-
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */
|
|
5541
|
-
/* @__PURE__ */
|
|
5607
|
+
}, onClick: onSubmit, size: "lg", block: true, highlight: true, children: /* @__PURE__ */ jsx37(FormattedMessage11, { id: "confirm" }) }),
|
|
5608
|
+
/* @__PURE__ */ jsx37(Button, { style: {
|
|
5542
5609
|
marginTop: isDownMd ? "12px" : "24px"
|
|
5543
|
-
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */
|
|
5610
|
+
}, onClick: props.onClose, size: "lg", block: true, children: /* @__PURE__ */ jsx37(FormattedMessage11, { id: "cancel" }) })
|
|
5544
5611
|
] }) });
|
|
5545
5612
|
}
|
|
5546
5613
|
|
|
@@ -5559,7 +5626,7 @@ var walletConnectImage = wallet_default;
|
|
|
5559
5626
|
var walletSigningImage = signing_default;
|
|
5560
5627
|
|
|
5561
5628
|
// src/components/WalletModalContent/index.tsx
|
|
5562
|
-
import { jsx as
|
|
5629
|
+
import { jsx as jsx38, jsxs as jsxs22 } from "react/jsx-runtime";
|
|
5563
5630
|
function WalletModalContent({
|
|
5564
5631
|
status,
|
|
5565
5632
|
error,
|
|
@@ -5629,15 +5696,15 @@ function WalletModalContent({
|
|
|
5629
5696
|
statusImage: walletConnectImage
|
|
5630
5697
|
};
|
|
5631
5698
|
}, [visible, connected, status, error, address]);
|
|
5632
|
-
return /* @__PURE__ */
|
|
5699
|
+
return /* @__PURE__ */ jsx38("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ jsxs22("div", { className: `matchid-wallet-box`, children: [
|
|
5633
5700
|
/* @__PURE__ */ jsxs22("div", { className: `matchid-wallet-content`, children: [
|
|
5634
|
-
/* @__PURE__ */
|
|
5701
|
+
/* @__PURE__ */ jsx38(Lottie_default, { animationData: pageData.statusImage, style: {
|
|
5635
5702
|
width: 128,
|
|
5636
5703
|
height: 128
|
|
5637
5704
|
} }),
|
|
5638
|
-
/* @__PURE__ */
|
|
5705
|
+
/* @__PURE__ */ jsx38("div", { className: pageData.isError ? "matchid-error" : "", children: pageData.text })
|
|
5639
5706
|
] }),
|
|
5640
|
-
/* @__PURE__ */
|
|
5707
|
+
/* @__PURE__ */ jsx38(
|
|
5641
5708
|
Button,
|
|
5642
5709
|
{
|
|
5643
5710
|
block: true,
|
|
@@ -5713,15 +5780,15 @@ function WalletModalContentV2(props) {
|
|
|
5713
5780
|
statusImage: walletConnectImage
|
|
5714
5781
|
};
|
|
5715
5782
|
}, [props, submitting]);
|
|
5716
|
-
return /* @__PURE__ */
|
|
5783
|
+
return /* @__PURE__ */ jsx38("div", { className: "matchid-wallet-container", children: /* @__PURE__ */ jsxs22("div", { className: `matchid-wallet-box`, children: [
|
|
5717
5784
|
/* @__PURE__ */ jsxs22("div", { className: `matchid-wallet-content`, children: [
|
|
5718
|
-
/* @__PURE__ */
|
|
5785
|
+
/* @__PURE__ */ jsx38(Lottie_default, { animationData: pageData.statusImage, style: {
|
|
5719
5786
|
width: 128,
|
|
5720
5787
|
height: 128
|
|
5721
5788
|
} }),
|
|
5722
|
-
/* @__PURE__ */
|
|
5789
|
+
/* @__PURE__ */ jsx38("div", { className: props.status == "error" ? "matchid-error" : "", children: pageData.text })
|
|
5723
5790
|
] }),
|
|
5724
|
-
/* @__PURE__ */
|
|
5791
|
+
/* @__PURE__ */ jsx38(
|
|
5725
5792
|
Button,
|
|
5726
5793
|
{
|
|
5727
5794
|
block: true,
|
|
@@ -6003,7 +6070,7 @@ async function getEthersSigner(config, { chainId } = {}) {
|
|
|
6003
6070
|
// src/components/EVMModal/index.tsx
|
|
6004
6071
|
import { SiweMessage } from "siwe";
|
|
6005
6072
|
import "@rainbow-me/rainbowkit/styles.css";
|
|
6006
|
-
import { jsx as
|
|
6073
|
+
import { jsx as jsx39 } from "react/jsx-runtime";
|
|
6007
6074
|
function WalletContent({
|
|
6008
6075
|
onSuccess,
|
|
6009
6076
|
type
|
|
@@ -6161,7 +6228,7 @@ function WalletContent({
|
|
|
6161
6228
|
setNonce(void 0);
|
|
6162
6229
|
setStatus("start");
|
|
6163
6230
|
};
|
|
6164
|
-
return /* @__PURE__ */
|
|
6231
|
+
return /* @__PURE__ */ jsx39(
|
|
6165
6232
|
WalletModalContentV2,
|
|
6166
6233
|
{
|
|
6167
6234
|
status,
|
|
@@ -6179,14 +6246,14 @@ function EVMConnectModal({
|
|
|
6179
6246
|
...props
|
|
6180
6247
|
}) {
|
|
6181
6248
|
const intl = useIntl13();
|
|
6182
|
-
return /* @__PURE__ */
|
|
6249
|
+
return /* @__PURE__ */ jsx39(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
6183
6250
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
6184
6251
|
}, {
|
|
6185
6252
|
name: "EVM"
|
|
6186
|
-
}), children: /* @__PURE__ */
|
|
6253
|
+
}), children: /* @__PURE__ */ jsx39(WalletContent, { onSuccess, type }) });
|
|
6187
6254
|
}
|
|
6188
6255
|
function EVMModal(props) {
|
|
6189
|
-
return props.isOpen && /* @__PURE__ */
|
|
6256
|
+
return props.isOpen && /* @__PURE__ */ jsx39(RainbowKitProvider2, { children: /* @__PURE__ */ jsx39(EVMConnectModal, { ...props }) });
|
|
6190
6257
|
}
|
|
6191
6258
|
|
|
6192
6259
|
// src/components/TRONModal/index.tsx
|
|
@@ -6301,7 +6368,7 @@ var useTRONWallet = () => {
|
|
|
6301
6368
|
};
|
|
6302
6369
|
|
|
6303
6370
|
// src/components/TRONModal/index.tsx
|
|
6304
|
-
import { jsx as
|
|
6371
|
+
import { jsx as jsx40, jsxs as jsxs23 } from "react/jsx-runtime";
|
|
6305
6372
|
function TRONConnectModal({
|
|
6306
6373
|
type = "login",
|
|
6307
6374
|
onSuccess,
|
|
@@ -6311,9 +6378,9 @@ function TRONConnectModal({
|
|
|
6311
6378
|
const intl = useIntl14();
|
|
6312
6379
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useTRONWallet();
|
|
6313
6380
|
const iconMaps = {
|
|
6314
|
-
tronlink: /* @__PURE__ */
|
|
6315
|
-
bitget: /* @__PURE__ */
|
|
6316
|
-
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 })
|
|
6317
6384
|
};
|
|
6318
6385
|
const { events, login } = useMatch();
|
|
6319
6386
|
const [status, setStatus] = useState28("");
|
|
@@ -6405,11 +6472,11 @@ function TRONConnectModal({
|
|
|
6405
6472
|
disconnect();
|
|
6406
6473
|
}
|
|
6407
6474
|
}, [props.isOpen]);
|
|
6408
|
-
return /* @__PURE__ */
|
|
6475
|
+
return /* @__PURE__ */ jsx40(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
6409
6476
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
6410
6477
|
}, {
|
|
6411
6478
|
name: "TRON"
|
|
6412
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */
|
|
6479
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ jsx40(
|
|
6413
6480
|
WalletModalContent,
|
|
6414
6481
|
{
|
|
6415
6482
|
error,
|
|
@@ -6422,9 +6489,9 @@ function TRONConnectModal({
|
|
|
6422
6489
|
setVisible: () => {
|
|
6423
6490
|
}
|
|
6424
6491
|
}
|
|
6425
|
-
) : /* @__PURE__ */
|
|
6492
|
+
) : /* @__PURE__ */ jsx40("div", { className: "matchid-login-box", children: /* @__PURE__ */ jsxs23("div", { className: "matchid-login-recommend-list", children: [
|
|
6426
6493
|
installedWallets.map((wallet2) => {
|
|
6427
|
-
return /* @__PURE__ */
|
|
6494
|
+
return /* @__PURE__ */ jsx40(
|
|
6428
6495
|
RecommendItem,
|
|
6429
6496
|
{
|
|
6430
6497
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -6437,14 +6504,14 @@ function TRONConnectModal({
|
|
|
6437
6504
|
);
|
|
6438
6505
|
}),
|
|
6439
6506
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
6440
|
-
return /* @__PURE__ */
|
|
6507
|
+
return /* @__PURE__ */ jsx40(
|
|
6441
6508
|
RecommendItem,
|
|
6442
6509
|
{
|
|
6443
6510
|
icon: iconMaps[wallet2.walletKey],
|
|
6444
6511
|
name: wallet2.name,
|
|
6445
6512
|
onClick: () => {
|
|
6446
6513
|
},
|
|
6447
|
-
footer: /* @__PURE__ */
|
|
6514
|
+
footer: /* @__PURE__ */ jsx40(Button, { size: "sm", onClick: () => {
|
|
6448
6515
|
window.open(wallet2.website);
|
|
6449
6516
|
}, children: "Install" })
|
|
6450
6517
|
},
|
|
@@ -6454,7 +6521,7 @@ function TRONConnectModal({
|
|
|
6454
6521
|
] }) }) });
|
|
6455
6522
|
}
|
|
6456
6523
|
function TRONModal(props) {
|
|
6457
|
-
return props.isOpen && /* @__PURE__ */
|
|
6524
|
+
return props.isOpen && /* @__PURE__ */ jsx40(TRONConnectModal, { ...props, type: props.type });
|
|
6458
6525
|
}
|
|
6459
6526
|
|
|
6460
6527
|
// src/components/TONModal/index.tsx
|
|
@@ -6467,7 +6534,7 @@ import {
|
|
|
6467
6534
|
useTonConnectUI,
|
|
6468
6535
|
useTonWallet
|
|
6469
6536
|
} from "@tonconnect/ui-react";
|
|
6470
|
-
import { jsx as
|
|
6537
|
+
import { jsx as jsx41 } from "react/jsx-runtime";
|
|
6471
6538
|
function WalletContent2({
|
|
6472
6539
|
onSuccess,
|
|
6473
6540
|
type
|
|
@@ -6594,7 +6661,7 @@ function WalletContent2({
|
|
|
6594
6661
|
}
|
|
6595
6662
|
}
|
|
6596
6663
|
}, [state]);
|
|
6597
|
-
return /* @__PURE__ */
|
|
6664
|
+
return /* @__PURE__ */ jsx41(
|
|
6598
6665
|
WalletModalContent,
|
|
6599
6666
|
{
|
|
6600
6667
|
connected,
|
|
@@ -6628,20 +6695,20 @@ function TONConnectModal({
|
|
|
6628
6695
|
const intl = useIntl15();
|
|
6629
6696
|
const { endpoints, appid } = useLocalStore_default();
|
|
6630
6697
|
const manifestUrl = `${endpoints.back}api/v1/wallet/ton?appid=${appid}&url=` + encodeURIComponent(window.location.origin);
|
|
6631
|
-
return /* @__PURE__ */
|
|
6698
|
+
return /* @__PURE__ */ jsx41(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
6632
6699
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
6633
6700
|
}, {
|
|
6634
6701
|
name: "TON"
|
|
6635
|
-
}), children: /* @__PURE__ */
|
|
6702
|
+
}), children: /* @__PURE__ */ jsx41(
|
|
6636
6703
|
TonConnectUIProvider,
|
|
6637
6704
|
{
|
|
6638
6705
|
manifestUrl,
|
|
6639
|
-
children: /* @__PURE__ */
|
|
6706
|
+
children: /* @__PURE__ */ jsx41(WalletContent2, { onSuccess, type })
|
|
6640
6707
|
}
|
|
6641
6708
|
) });
|
|
6642
6709
|
}
|
|
6643
6710
|
function TONModal(props) {
|
|
6644
|
-
return props.isOpen && /* @__PURE__ */
|
|
6711
|
+
return props.isOpen && /* @__PURE__ */ jsx41(TONConnectModal, { ...props });
|
|
6645
6712
|
}
|
|
6646
6713
|
|
|
6647
6714
|
// src/components/BTCModal/index.tsx
|
|
@@ -6870,7 +6937,7 @@ var useBTCWallet = () => {
|
|
|
6870
6937
|
};
|
|
6871
6938
|
|
|
6872
6939
|
// src/components/BTCModal/index.tsx
|
|
6873
|
-
import { jsx as
|
|
6940
|
+
import { jsx as jsx42, jsxs as jsxs24 } from "react/jsx-runtime";
|
|
6874
6941
|
function BTCConnectModal({
|
|
6875
6942
|
type = "login",
|
|
6876
6943
|
onSuccess,
|
|
@@ -6880,10 +6947,10 @@ function BTCConnectModal({
|
|
|
6880
6947
|
const intl = useIntl16();
|
|
6881
6948
|
const { wallets, installedWallets, chooseWallet, wallet, address, onConnect } = useBTCWallet();
|
|
6882
6949
|
const iconMaps = {
|
|
6883
|
-
leather: /* @__PURE__ */
|
|
6884
|
-
unisat: /* @__PURE__ */
|
|
6885
|
-
xverse: /* @__PURE__ */
|
|
6886
|
-
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 })
|
|
6887
6954
|
};
|
|
6888
6955
|
const { events, login } = useMatch();
|
|
6889
6956
|
const [status, setStatus] = useState31("");
|
|
@@ -6983,11 +7050,11 @@ function BTCConnectModal({
|
|
|
6983
7050
|
statusRef.current = "";
|
|
6984
7051
|
setError("");
|
|
6985
7052
|
};
|
|
6986
|
-
return /* @__PURE__ */
|
|
7053
|
+
return /* @__PURE__ */ jsx42(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
6987
7054
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
6988
7055
|
}, {
|
|
6989
7056
|
name: "BTC"
|
|
6990
|
-
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */
|
|
7057
|
+
}), onBack: wallet ? onBack : void 0, children: wallet ? /* @__PURE__ */ jsx42(
|
|
6991
7058
|
WalletModalContent,
|
|
6992
7059
|
{
|
|
6993
7060
|
error,
|
|
@@ -7000,9 +7067,9 @@ function BTCConnectModal({
|
|
|
7000
7067
|
setVisible: () => {
|
|
7001
7068
|
}
|
|
7002
7069
|
}
|
|
7003
|
-
) : /* @__PURE__ */
|
|
7070
|
+
) : /* @__PURE__ */ jsx42("div", { className: "matchid-login-box", children: /* @__PURE__ */ jsxs24("div", { className: "matchid-login-recommend-list", children: [
|
|
7004
7071
|
installedWallets.map((wallet2) => {
|
|
7005
|
-
return /* @__PURE__ */
|
|
7072
|
+
return /* @__PURE__ */ jsx42(
|
|
7006
7073
|
RecommendItem,
|
|
7007
7074
|
{
|
|
7008
7075
|
icon: iconMaps[wallet2.walletKey],
|
|
@@ -7015,14 +7082,14 @@ function BTCConnectModal({
|
|
|
7015
7082
|
);
|
|
7016
7083
|
}),
|
|
7017
7084
|
wallets.filter((wallet2) => !installedWallets.find((installedWallet) => installedWallet.walletKey == wallet2.walletKey)).map((wallet2) => {
|
|
7018
|
-
return /* @__PURE__ */
|
|
7085
|
+
return /* @__PURE__ */ jsx42(
|
|
7019
7086
|
RecommendItem,
|
|
7020
7087
|
{
|
|
7021
7088
|
icon: iconMaps[wallet2.walletKey],
|
|
7022
7089
|
name: wallet2.name,
|
|
7023
7090
|
onClick: () => {
|
|
7024
7091
|
},
|
|
7025
|
-
footer: /* @__PURE__ */
|
|
7092
|
+
footer: /* @__PURE__ */ jsx42(Button, { size: "sm", onClick: () => {
|
|
7026
7093
|
window.open(wallet2.website);
|
|
7027
7094
|
}, children: "Install" })
|
|
7028
7095
|
},
|
|
@@ -7032,13 +7099,13 @@ function BTCConnectModal({
|
|
|
7032
7099
|
] }) }) });
|
|
7033
7100
|
}
|
|
7034
7101
|
function BTCModal(props) {
|
|
7035
|
-
return props.isOpen && /* @__PURE__ */
|
|
7102
|
+
return props.isOpen && /* @__PURE__ */ jsx42(BTCConnectModal, { ...props });
|
|
7036
7103
|
}
|
|
7037
7104
|
|
|
7038
7105
|
// src/components/WalletModal/index.tsx
|
|
7039
7106
|
import { useMemo as useMemo16 } from "react";
|
|
7040
7107
|
import { useIntl as useIntl17 } from "react-intl";
|
|
7041
|
-
import { jsx as
|
|
7108
|
+
import { jsx as jsx43 } from "react/jsx-runtime";
|
|
7042
7109
|
function WalletConnectModal({
|
|
7043
7110
|
type,
|
|
7044
7111
|
methods: _methods,
|
|
@@ -7056,13 +7123,13 @@ function WalletConnectModal({
|
|
|
7056
7123
|
const platform = config.platform.map((p) => p.toLowerCase());
|
|
7057
7124
|
return WALLET_METHODS.filter((m) => platform.includes(m));
|
|
7058
7125
|
}, [config.platform, _methods]);
|
|
7059
|
-
return /* @__PURE__ */
|
|
7126
|
+
return /* @__PURE__ */ jsx43(ModalWithHeader, { ...props, title: props.title || intl.formatMessage({
|
|
7060
7127
|
id: type == "bind" ? "bindWith" : "loginWith"
|
|
7061
7128
|
}, {
|
|
7062
7129
|
name: ""
|
|
7063
|
-
}), 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) => {
|
|
7064
7131
|
const m = walletMap[method];
|
|
7065
|
-
return /* @__PURE__ */
|
|
7132
|
+
return /* @__PURE__ */ jsx43(
|
|
7066
7133
|
RecommendItem,
|
|
7067
7134
|
{
|
|
7068
7135
|
icon: m?.icon,
|
|
@@ -7076,12 +7143,12 @@ function WalletConnectModal({
|
|
|
7076
7143
|
}) }) }) });
|
|
7077
7144
|
}
|
|
7078
7145
|
function WalletModal(props) {
|
|
7079
|
-
return props.isOpen && /* @__PURE__ */
|
|
7146
|
+
return props.isOpen && /* @__PURE__ */ jsx43(WalletConnectModal, { ...props });
|
|
7080
7147
|
}
|
|
7081
7148
|
|
|
7082
7149
|
// src/components/AlphaAvatar/index.tsx
|
|
7083
7150
|
import { useEffect as useEffect30, useState as useState32 } from "react";
|
|
7084
|
-
import { jsx as
|
|
7151
|
+
import { jsx as jsx44 } from "react/jsx-runtime";
|
|
7085
7152
|
function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
7086
7153
|
const [avatar, setAvatar] = useState32(void 0);
|
|
7087
7154
|
useEffect30(() => {
|
|
@@ -7090,7 +7157,7 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
|
7090
7157
|
setAvatar(char);
|
|
7091
7158
|
}
|
|
7092
7159
|
}, [name]);
|
|
7093
|
-
return /* @__PURE__ */
|
|
7160
|
+
return /* @__PURE__ */ jsx44("div", { className: `matchid-alpha-avatar ${className}`, style: {
|
|
7094
7161
|
width: size,
|
|
7095
7162
|
height: size,
|
|
7096
7163
|
fontSize: Math.ceil(size / 2)
|
|
@@ -7098,7 +7165,7 @@ function AlphaAvatar2({ name, size = 40, className = "" }) {
|
|
|
7098
7165
|
}
|
|
7099
7166
|
|
|
7100
7167
|
// src/components/WalletAsset/index.tsx
|
|
7101
|
-
import { jsx as
|
|
7168
|
+
import { jsx as jsx45, jsxs as jsxs25 } from "react/jsx-runtime";
|
|
7102
7169
|
function WalletAsset({
|
|
7103
7170
|
onAssetClick,
|
|
7104
7171
|
matchWalletAssetsOptions
|
|
@@ -7108,7 +7175,7 @@ function WalletAsset({
|
|
|
7108
7175
|
list: walletAssets.mergedAssets
|
|
7109
7176
|
});
|
|
7110
7177
|
const { list } = useMatchChain();
|
|
7111
|
-
return /* @__PURE__ */
|
|
7178
|
+
return /* @__PURE__ */ jsx45("div", { className: "matchid-wallet-asset-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
7112
7179
|
const clickFunc = onAssetClick && onAssetClick(n);
|
|
7113
7180
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
7114
7181
|
const getFooterColor = () => {
|
|
@@ -7127,7 +7194,7 @@ function WalletAsset({
|
|
|
7127
7194
|
cursor: clickFunc ? "pointer" : "default"
|
|
7128
7195
|
}, children: [
|
|
7129
7196
|
/* @__PURE__ */ jsxs25("div", { className: "matchid-wallet-asset-logo", title: n.symbol || n.name || "", children: [
|
|
7130
|
-
n.icon ? /* @__PURE__ */
|
|
7197
|
+
n.icon ? /* @__PURE__ */ jsx45("img", { src: n.icon, alt: n.symbol, className: `matchid-wallet-asset-icon` }) : /* @__PURE__ */ jsx45(
|
|
7131
7198
|
AlphaAvatar2,
|
|
7132
7199
|
{
|
|
7133
7200
|
className: `matchid-wallet-asset-icon`,
|
|
@@ -7135,12 +7202,12 @@ function WalletAsset({
|
|
|
7135
7202
|
name: n.symbol || n.name || ""
|
|
7136
7203
|
}
|
|
7137
7204
|
),
|
|
7138
|
-
chain?.iconUrl && /* @__PURE__ */
|
|
7205
|
+
chain?.iconUrl && /* @__PURE__ */ jsx45("img", { src: chain.iconUrl, alt: chain.name, className: `matchid-wallet-asset-chain` })
|
|
7139
7206
|
] }),
|
|
7140
7207
|
/* @__PURE__ */ jsxs25("div", { className: `matchid-wallet-asset-info`, children: [
|
|
7141
|
-
/* @__PURE__ */
|
|
7208
|
+
/* @__PURE__ */ jsx45("div", { className: `matchid-wallet-asset-name`, children: n.symbol }),
|
|
7142
7209
|
"price" in n && /* @__PURE__ */ jsxs25("div", { className: `matchid-wallet-asset-content`, children: [
|
|
7143
|
-
/* @__PURE__ */
|
|
7210
|
+
/* @__PURE__ */ jsx45("div", { className: "matchid-wallet-asset-price", children: /* @__PURE__ */ jsx45(
|
|
7144
7211
|
NumberFormatter,
|
|
7145
7212
|
{
|
|
7146
7213
|
value: n.price,
|
|
@@ -7148,7 +7215,7 @@ function WalletAsset({
|
|
|
7148
7215
|
tFixNum: 2
|
|
7149
7216
|
}
|
|
7150
7217
|
) }),
|
|
7151
|
-
/* @__PURE__ */
|
|
7218
|
+
/* @__PURE__ */ jsx45("div", { className: "matchid-wallet-asset-value", children: /* @__PURE__ */ jsx45(
|
|
7152
7219
|
NumberFormatter,
|
|
7153
7220
|
{
|
|
7154
7221
|
value: n.value,
|
|
@@ -7158,14 +7225,14 @@ function WalletAsset({
|
|
|
7158
7225
|
) })
|
|
7159
7226
|
] }),
|
|
7160
7227
|
/* @__PURE__ */ jsxs25("div", { className: `matchid-wallet-asset-footer`, children: [
|
|
7161
|
-
/* @__PURE__ */
|
|
7228
|
+
/* @__PURE__ */ jsx45("div", { className: `matchid-wallet-asset-balance`, children: /* @__PURE__ */ jsx45(
|
|
7162
7229
|
NumberFormatter,
|
|
7163
7230
|
{
|
|
7164
7231
|
value: n.balance,
|
|
7165
7232
|
tFixNum: 3
|
|
7166
7233
|
}
|
|
7167
7234
|
) }),
|
|
7168
|
-
"price_change_24h" in n && /* @__PURE__ */
|
|
7235
|
+
"price_change_24h" in n && /* @__PURE__ */ jsx45("div", { className: `matchid-wallet-asset-change ${getFooterColor()}`, children: /* @__PURE__ */ jsx45(
|
|
7169
7236
|
NumberFormatter,
|
|
7170
7237
|
{
|
|
7171
7238
|
prefix: `${(n?.price_change_24h || 0) < 0 ? "-" : "+"} `,
|
|
@@ -7184,7 +7251,7 @@ function WalletAsset({
|
|
|
7184
7251
|
import { useEffect as useEffect31, useMemo as useMemo17, useState as useState33 } from "react";
|
|
7185
7252
|
import { defineChain as defineChain4, encodeFunctionData as encodeFunctionData2, erc20Abi as erc20Abi3, http as http8, parseUnits as parseUnits2 } from "viem";
|
|
7186
7253
|
import { FormattedMessage as FormattedMessage12, useIntl as useIntl18 } from "react-intl";
|
|
7187
|
-
import { jsx as
|
|
7254
|
+
import { jsx as jsx46, jsxs as jsxs26 } from "react/jsx-runtime";
|
|
7188
7255
|
function Input2({
|
|
7189
7256
|
onChange,
|
|
7190
7257
|
placeholder,
|
|
@@ -7195,7 +7262,7 @@ function Input2({
|
|
|
7195
7262
|
size = "df"
|
|
7196
7263
|
}) {
|
|
7197
7264
|
return /* @__PURE__ */ jsxs26("div", { className: `matchid-token-input-box ${"matchid-token-input-" + size}`, children: [
|
|
7198
|
-
/* @__PURE__ */
|
|
7265
|
+
/* @__PURE__ */ jsx46(
|
|
7199
7266
|
"input",
|
|
7200
7267
|
{
|
|
7201
7268
|
placeholder,
|
|
@@ -7206,7 +7273,7 @@ function Input2({
|
|
|
7206
7273
|
className: `matchid-token-input ${error ? "matchid-token-input-error" : ""}`
|
|
7207
7274
|
}
|
|
7208
7275
|
),
|
|
7209
|
-
error && /* @__PURE__ */
|
|
7276
|
+
error && /* @__PURE__ */ jsx46("div", { className: "matchid-token-input-error-text", children: error })
|
|
7210
7277
|
] });
|
|
7211
7278
|
}
|
|
7212
7279
|
function TokenSend({
|
|
@@ -7334,24 +7401,24 @@ function TokenSend({
|
|
|
7334
7401
|
window.removeEventListener("message", receiveMessage);
|
|
7335
7402
|
};
|
|
7336
7403
|
}, []);
|
|
7337
|
-
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: [
|
|
7338
7405
|
/* @__PURE__ */ jsxs26("div", { className: "matchid-token-send-content", children: [
|
|
7339
7406
|
/* @__PURE__ */ jsxs26("div", { className: `matchid-token-amount-content`, children: [
|
|
7340
7407
|
/* @__PURE__ */ jsxs26("div", { className: `matchid-token-amount-header`, children: [
|
|
7341
|
-
/* @__PURE__ */
|
|
7408
|
+
/* @__PURE__ */ jsx46("div", { className: `matchid-token-amount-title`, children: /* @__PURE__ */ jsx46(FormattedMessage12, { id: "amount" }) }),
|
|
7342
7409
|
/* @__PURE__ */ jsxs26("div", { className: `matchid-token-amount-chain`, children: [
|
|
7343
|
-
token.icon ? /* @__PURE__ */
|
|
7410
|
+
token.icon ? /* @__PURE__ */ jsx46(
|
|
7344
7411
|
"img",
|
|
7345
7412
|
{
|
|
7346
7413
|
src: token?.icon,
|
|
7347
7414
|
alt: token?.symbol,
|
|
7348
7415
|
className: `matchid-token-amount-chain-icon`
|
|
7349
7416
|
}
|
|
7350
|
-
) : /* @__PURE__ */
|
|
7351
|
-
/* @__PURE__ */
|
|
7417
|
+
) : /* @__PURE__ */ jsx46(AlphaAvatar, { name: token.symbol || token.name || "", size: 16 }),
|
|
7418
|
+
/* @__PURE__ */ jsx46("span", { children: token?.symbol })
|
|
7352
7419
|
] })
|
|
7353
7420
|
] }),
|
|
7354
|
-
/* @__PURE__ */
|
|
7421
|
+
/* @__PURE__ */ jsx46(
|
|
7355
7422
|
Input2,
|
|
7356
7423
|
{
|
|
7357
7424
|
type: "text",
|
|
@@ -7366,16 +7433,16 @@ function TokenSend({
|
|
|
7366
7433
|
),
|
|
7367
7434
|
/* @__PURE__ */ jsxs26("div", { className: `matchid-token-amount-footer`, children: [
|
|
7368
7435
|
/* @__PURE__ */ jsxs26("div", { className: `matchid-token-amount-title`, children: [
|
|
7369
|
-
/* @__PURE__ */
|
|
7436
|
+
/* @__PURE__ */ jsx46(FormattedMessage12, { id: "balance" }),
|
|
7370
7437
|
":"
|
|
7371
7438
|
] }),
|
|
7372
|
-
/* @__PURE__ */
|
|
7439
|
+
/* @__PURE__ */ jsx46("div", { className: `matchid-token-amount-value`, children: /* @__PURE__ */ jsx46(NumberFormatter, { value: token.balance, tFixNum: 10, suffix: " " + token.symbol }) })
|
|
7373
7440
|
] }),
|
|
7374
|
-
/* @__PURE__ */
|
|
7441
|
+
/* @__PURE__ */ jsx46(TransferIcon, { className: "matchid-token-amount-transfer" })
|
|
7375
7442
|
] }),
|
|
7376
7443
|
/* @__PURE__ */ jsxs26("div", { className: `matchid-token-address-content`, children: [
|
|
7377
|
-
/* @__PURE__ */
|
|
7378
|
-
/* @__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(
|
|
7379
7446
|
Input2,
|
|
7380
7447
|
{
|
|
7381
7448
|
type: "text",
|
|
@@ -7391,7 +7458,7 @@ function TokenSend({
|
|
|
7391
7458
|
)
|
|
7392
7459
|
] })
|
|
7393
7460
|
] }),
|
|
7394
|
-
/* @__PURE__ */
|
|
7461
|
+
/* @__PURE__ */ jsx46(
|
|
7395
7462
|
Button,
|
|
7396
7463
|
{
|
|
7397
7464
|
size: "lg",
|
|
@@ -7400,7 +7467,7 @@ function TokenSend({
|
|
|
7400
7467
|
disabled: !canSend || !!txError,
|
|
7401
7468
|
onClick: onNext,
|
|
7402
7469
|
loading: loading || sending,
|
|
7403
|
-
children: /* @__PURE__ */
|
|
7470
|
+
children: /* @__PURE__ */ jsx46(FormattedMessage12, { id: "next" })
|
|
7404
7471
|
}
|
|
7405
7472
|
)
|
|
7406
7473
|
] }) });
|
|
@@ -7408,7 +7475,7 @@ function TokenSend({
|
|
|
7408
7475
|
|
|
7409
7476
|
// src/components/TokenDetail/index.tsx
|
|
7410
7477
|
import { FormattedMessage as FormattedMessage13, useIntl as useIntl19 } from "react-intl";
|
|
7411
|
-
import { jsx as
|
|
7478
|
+
import { jsx as jsx47, jsxs as jsxs27 } from "react/jsx-runtime";
|
|
7412
7479
|
function TokenDetail({
|
|
7413
7480
|
onClose,
|
|
7414
7481
|
token
|
|
@@ -7418,41 +7485,41 @@ function TokenDetail({
|
|
|
7418
7485
|
const chain = chainList?.find((m) => m.id.toString() === token.chain_id);
|
|
7419
7486
|
const onSend = () => {
|
|
7420
7487
|
modal.show((props) => {
|
|
7421
|
-
return /* @__PURE__ */
|
|
7488
|
+
return /* @__PURE__ */ jsx47(TokenSend, { onClose: () => {
|
|
7422
7489
|
props.close();
|
|
7423
7490
|
onClose();
|
|
7424
7491
|
}, onBack: props.close, zIndex: props.zIndex, token });
|
|
7425
7492
|
});
|
|
7426
7493
|
};
|
|
7427
7494
|
const intl = useIntl19();
|
|
7428
|
-
return /* @__PURE__ */
|
|
7495
|
+
return /* @__PURE__ */ jsx47(ModalDrawer, { isOpen: true, title: intl.formatMessage({
|
|
7429
7496
|
id: "tokenDetails"
|
|
7430
7497
|
}), onClose, children: /* @__PURE__ */ jsxs27("div", { className: `matchid-token-detail`, children: [
|
|
7431
7498
|
/* @__PURE__ */ jsxs27("div", { className: `matchid-token-main`, children: [
|
|
7432
7499
|
/* @__PURE__ */ jsxs27("div", { className: `matchid-token-info`, children: [
|
|
7433
7500
|
/* @__PURE__ */ jsxs27("div", { className: `matchid-token-logo`, children: [
|
|
7434
|
-
token.icon ? /* @__PURE__ */
|
|
7435
|
-
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` })
|
|
7436
7503
|
] }),
|
|
7437
7504
|
/* @__PURE__ */ jsxs27("div", { className: `matchid-token-name`, children: [
|
|
7438
|
-
/* @__PURE__ */
|
|
7505
|
+
/* @__PURE__ */ jsx47(NumberFormatter, { value: token.balance, tFixNum: 10 }),
|
|
7439
7506
|
" ",
|
|
7440
7507
|
token.symbol
|
|
7441
7508
|
] })
|
|
7442
7509
|
] }),
|
|
7443
7510
|
token.address.toLowerCase() != NATIVE_TOKEN_ADDRESS && /* @__PURE__ */ jsxs27("div", { className: `matchid-token-contract`, children: [
|
|
7444
|
-
/* @__PURE__ */
|
|
7445
|
-
/* @__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 })
|
|
7446
7513
|
] })
|
|
7447
7514
|
] }),
|
|
7448
|
-
/* @__PURE__ */
|
|
7515
|
+
/* @__PURE__ */ jsx47(Button, { size: "lg", block: true, highlight: true, onClick: onSend, children: /* @__PURE__ */ jsx47(FormattedMessage13, { id: "send" }) })
|
|
7449
7516
|
] }) });
|
|
7450
7517
|
}
|
|
7451
7518
|
|
|
7452
7519
|
// src/components/TokenSendList/index.tsx
|
|
7453
7520
|
import { useState as useState34 } from "react";
|
|
7454
7521
|
import { FormattedMessage as FormattedMessage14 } from "react-intl";
|
|
7455
|
-
import { jsx as
|
|
7522
|
+
import { jsx as jsx48, jsxs as jsxs28 } from "react/jsx-runtime";
|
|
7456
7523
|
function TokenSendList({ close }) {
|
|
7457
7524
|
const isDownMd = useDownMd();
|
|
7458
7525
|
const walletAssets = useMatchWalletAssets();
|
|
@@ -7464,14 +7531,14 @@ function TokenSendList({ close }) {
|
|
|
7464
7531
|
const modal = useModal();
|
|
7465
7532
|
const onNext = () => {
|
|
7466
7533
|
checked && modal.show((props) => {
|
|
7467
|
-
return /* @__PURE__ */
|
|
7534
|
+
return /* @__PURE__ */ jsx48(TokenSend, { onClose: () => {
|
|
7468
7535
|
props.close();
|
|
7469
7536
|
close();
|
|
7470
7537
|
}, onBack: props.close, zIndex: props.zIndex, token: checked });
|
|
7471
7538
|
});
|
|
7472
7539
|
};
|
|
7473
7540
|
return /* @__PURE__ */ jsxs28("div", { className: "matchid-token-send-list-box", children: [
|
|
7474
|
-
/* @__PURE__ */
|
|
7541
|
+
/* @__PURE__ */ jsx48("div", { className: "matchid-token-send-list", children: matchWalletAssetList.list.map((n, index) => {
|
|
7475
7542
|
const chain = list?.find((m) => m.id.toString() === n.chain_id);
|
|
7476
7543
|
return /* @__PURE__ */ jsxs28(
|
|
7477
7544
|
"div",
|
|
@@ -7481,10 +7548,10 @@ function TokenSendList({ close }) {
|
|
|
7481
7548
|
setChecked(n);
|
|
7482
7549
|
},
|
|
7483
7550
|
children: [
|
|
7484
|
-
/* @__PURE__ */
|
|
7551
|
+
/* @__PURE__ */ jsx48(Radio, { checked: checked?.address == n.address, size: isDownMd ? 18 : 24 }),
|
|
7485
7552
|
/* @__PURE__ */ jsxs28("div", { className: "matchid-token-send-content", children: [
|
|
7486
7553
|
/* @__PURE__ */ jsxs28("div", { className: "matchid-token-send-logo", children: [
|
|
7487
|
-
n.icon ? /* @__PURE__ */
|
|
7554
|
+
n.icon ? /* @__PURE__ */ jsx48("img", { src: n.icon, alt: n.symbol, className: `matchid-token-send-icon` }) : /* @__PURE__ */ jsx48(
|
|
7488
7555
|
AlphaAvatar2,
|
|
7489
7556
|
{
|
|
7490
7557
|
className: `matchid-token-send-icon`,
|
|
@@ -7492,7 +7559,7 @@ function TokenSendList({ close }) {
|
|
|
7492
7559
|
name: n.symbol || n.name || ""
|
|
7493
7560
|
}
|
|
7494
7561
|
),
|
|
7495
|
-
chain?.iconUrl && /* @__PURE__ */
|
|
7562
|
+
chain?.iconUrl && /* @__PURE__ */ jsx48(
|
|
7496
7563
|
"img",
|
|
7497
7564
|
{
|
|
7498
7565
|
src: chain.iconUrl,
|
|
@@ -7502,8 +7569,8 @@ function TokenSendList({ close }) {
|
|
|
7502
7569
|
)
|
|
7503
7570
|
] }),
|
|
7504
7571
|
/* @__PURE__ */ jsxs28("div", { className: `matchid-token-send-info`, children: [
|
|
7505
|
-
/* @__PURE__ */
|
|
7506
|
-
/* @__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 }) })
|
|
7507
7574
|
] })
|
|
7508
7575
|
] })
|
|
7509
7576
|
]
|
|
@@ -7511,7 +7578,7 @@ function TokenSendList({ close }) {
|
|
|
7511
7578
|
index
|
|
7512
7579
|
);
|
|
7513
7580
|
}) }),
|
|
7514
|
-
/* @__PURE__ */
|
|
7581
|
+
/* @__PURE__ */ jsx48(Button, { size: "lg", highlight: true, block: true, disabled: !checked, onClick: onNext, children: /* @__PURE__ */ jsx48(FormattedMessage14, { id: "next" }) })
|
|
7515
7582
|
] });
|
|
7516
7583
|
}
|
|
7517
7584
|
|
|
@@ -7521,7 +7588,7 @@ import { useEffect as useEffect32, useMemo as useMemo18, useState as useState35
|
|
|
7521
7588
|
import { decodeFunctionData, defineChain as defineChain5, formatUnits as formatUnits3 } from "viem";
|
|
7522
7589
|
import { erc20Abi as erc20Abi4 } from "viem";
|
|
7523
7590
|
import { FormattedMessage as FormattedMessage15 } from "react-intl";
|
|
7524
|
-
import { jsx as
|
|
7591
|
+
import { jsx as jsx49, jsxs as jsxs29 } from "react/jsx-runtime";
|
|
7525
7592
|
var Item = ({ data }) => {
|
|
7526
7593
|
const { address } = useWallet();
|
|
7527
7594
|
const isOut = data.from.toLowerCase() == address.toLowerCase();
|
|
@@ -7616,10 +7683,10 @@ var Item = ({ data }) => {
|
|
|
7616
7683
|
className: `matchid-transaction-item`,
|
|
7617
7684
|
children: [
|
|
7618
7685
|
/* @__PURE__ */ jsxs29("div", { className: `matchid-transacton-item-container`, children: [
|
|
7619
|
-
/* @__PURE__ */
|
|
7686
|
+
/* @__PURE__ */ jsx49("div", { className: "matchid-transaction-item-icon", children: /* @__PURE__ */ jsx49(ArrowSendIcon, { className: !isOut ? "rotate-180" : "" }) }),
|
|
7620
7687
|
/* @__PURE__ */ jsxs29("div", { className: `matchid-transaction-item-details`, children: [
|
|
7621
|
-
/* @__PURE__ */
|
|
7622
|
-
/* @__PURE__ */
|
|
7688
|
+
/* @__PURE__ */ jsx49("div", { className: `matchid-transaction-item-address`, children: formatAddress(to, 6, 4) }),
|
|
7689
|
+
/* @__PURE__ */ jsx49(
|
|
7623
7690
|
"div",
|
|
7624
7691
|
{
|
|
7625
7692
|
className: `matchid-transaction-item-timestamp`,
|
|
@@ -7629,10 +7696,10 @@ var Item = ({ data }) => {
|
|
|
7629
7696
|
] })
|
|
7630
7697
|
] }),
|
|
7631
7698
|
/* @__PURE__ */ jsxs29("div", { className: `matchid-transaction-item-amount ${"matchid-transaction-item-" + status}`, children: [
|
|
7632
|
-
/* @__PURE__ */
|
|
7633
|
-
status == "loading" && /* @__PURE__ */
|
|
7634
|
-
status == "success" && /* @__PURE__ */
|
|
7635
|
-
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 })
|
|
7636
7703
|
] })
|
|
7637
7704
|
]
|
|
7638
7705
|
}
|
|
@@ -7642,7 +7709,7 @@ function TransactionList({
|
|
|
7642
7709
|
scrollableTarget
|
|
7643
7710
|
}) {
|
|
7644
7711
|
const { fetchMoreData, hasMore, items } = useMatchWalletRecords();
|
|
7645
|
-
return /* @__PURE__ */
|
|
7712
|
+
return /* @__PURE__ */ jsx49(
|
|
7646
7713
|
InfiniteScroll,
|
|
7647
7714
|
{
|
|
7648
7715
|
scrollableTarget,
|
|
@@ -7650,11 +7717,11 @@ function TransactionList({
|
|
|
7650
7717
|
next: fetchMoreData,
|
|
7651
7718
|
hasMore,
|
|
7652
7719
|
loader: /* @__PURE__ */ jsxs29("div", { className: "matchid-list-nomore", children: [
|
|
7653
|
-
/* @__PURE__ */
|
|
7720
|
+
/* @__PURE__ */ jsx49(LoadingIcon_default, { rotate: true, size: 16, color: "black" }),
|
|
7654
7721
|
"Loading..."
|
|
7655
7722
|
] }),
|
|
7656
|
-
endMessage: items.length > 0 ? /* @__PURE__ */
|
|
7657
|
-
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)) })
|
|
7658
7725
|
}
|
|
7659
7726
|
);
|
|
7660
7727
|
}
|
|
@@ -7729,4 +7796,4 @@ export {
|
|
|
7729
7796
|
MatchProvider,
|
|
7730
7797
|
useMatch
|
|
7731
7798
|
};
|
|
7732
|
-
//# sourceMappingURL=chunk-
|
|
7799
|
+
//# sourceMappingURL=chunk-QMV4FDUH.mjs.map
|