@arcblock/did-connect-react 3.4.14 → 3.5.0
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/standalone/did-connect-react.css +1 -0
- package/dist/standalone/index.js +133700 -0
- package/lib/Connect/components/login-item/connect-choose-list.js +111 -111
- package/lib/Connect/components/login-item/connect-provider-list.js +180 -180
- package/lib/Connect/components/login-item/mobile-login-item.js +56 -56
- package/lib/Connect/components/login-item/passkey-login-item.js +27 -29
- package/lib/Connect/components/login-item/web-login-item.js +31 -29
- package/lib/Connect/connect.js +202 -197
- package/lib/Connect/contexts/state.js +19 -17
- package/lib/Connect/hooks/provider-list.js +33 -33
- package/lib/Connect/plugins/email/list-item.js +14 -14
- package/lib/Connect/plugins/email/placeholder.js +77 -76
- package/lib/package.json.js +1 -1
- package/package.json +14 -9
- package/.aigne/doc-smith/config.yaml +0 -85
- package/.aigne/doc-smith/history.yaml +0 -6
- package/.aigne/doc-smith/output/structure-plan.json +0 -204
- package/.aigne/doc-smith/translation-cache.yaml +0 -11
- package/.aigne/doc-smith/upload-cache.yaml +0 -213
- package/docs/_sidebar.md +0 -18
- package/docs/advanced-authentication-methods.ja.md +0 -261
- package/docs/advanced-authentication-methods.md +0 -261
- package/docs/advanced-authentication-methods.zh-TW.md +0 -261
- package/docs/advanced-authentication-methods.zh.md +0 -261
- package/docs/advanced-utilities.ja.md +0 -132
- package/docs/advanced-utilities.md +0 -132
- package/docs/advanced-utilities.zh-TW.md +0 -132
- package/docs/advanced-utilities.zh.md +0 -132
- package/docs/advanced.ja.md +0 -95
- package/docs/advanced.md +0 -95
- package/docs/advanced.zh-TW.md +0 -95
- package/docs/advanced.zh.md +0 -95
- package/docs/api-reference.ja.md +0 -178
- package/docs/api-reference.md +0 -178
- package/docs/api-reference.zh-TW.md +0 -178
- package/docs/api-reference.zh.md +0 -178
- package/docs/assets/diagram/core-components-session-provider-01.ja.jpg +0 -0
- package/docs/assets/diagram/core-components-session-provider-01.jpg +0 -0
- package/docs/assets/diagram/core-components-session-provider-01.zh-TW.jpg +0 -0
- package/docs/assets/diagram/core-components-session-provider-01.zh.jpg +0 -0
- package/docs/assets/diagram/did-connect-diagram-0.ja.jpg +0 -0
- package/docs/assets/diagram/did-connect-diagram-0.jpg +0 -0
- package/docs/assets/diagram/did-connect-diagram-0.zh-TW.jpg +0 -0
- package/docs/assets/diagram/did-connect-diagram-0.zh.jpg +0 -0
- package/docs/assets/diagram/overview-01.ja.jpg +0 -0
- package/docs/assets/diagram/overview-01.jpg +0 -0
- package/docs/assets/diagram/overview-01.zh-TW.jpg +0 -0
- package/docs/assets/diagram/overview-01.zh.jpg +0 -0
- package/docs/assets/diagram/use-connect-diagram-0.ja.jpg +0 -0
- package/docs/assets/diagram/use-connect-diagram-0.jpg +0 -0
- package/docs/assets/diagram/use-connect-diagram-0.zh-TW.jpg +0 -0
- package/docs/assets/diagram/use-connect-diagram-0.zh.jpg +0 -0
- package/docs/core-components-did-connect.ja.md +0 -166
- package/docs/core-components-did-connect.md +0 -166
- package/docs/core-components-did-connect.zh-TW.md +0 -166
- package/docs/core-components-did-connect.zh.md +0 -166
- package/docs/core-components-session-provider.ja.md +0 -197
- package/docs/core-components-session-provider.md +0 -197
- package/docs/core-components-session-provider.zh-TW.md +0 -197
- package/docs/core-components-session-provider.zh.md +0 -197
- package/docs/core-components.ja.md +0 -16
- package/docs/core-components.md +0 -16
- package/docs/core-components.zh-TW.md +0 -16
- package/docs/core-components.zh.md +0 -16
- package/docs/getting-started.ja.md +0 -138
- package/docs/getting-started.md +0 -138
- package/docs/getting-started.zh-TW.md +0 -138
- package/docs/getting-started.zh.md +0 -138
- package/docs/hooks-use-connect.ja.md +0 -178
- package/docs/hooks-use-connect.md +0 -178
- package/docs/hooks-use-connect.zh-TW.md +0 -178
- package/docs/hooks-use-connect.zh.md +0 -178
- package/docs/hooks-use-did.ja.md +0 -107
- package/docs/hooks-use-did.md +0 -107
- package/docs/hooks-use-did.zh-TW.md +0 -107
- package/docs/hooks-use-did.zh.md +0 -107
- package/docs/hooks-use-oauth-passkey.ja.md +0 -188
- package/docs/hooks-use-oauth-passkey.md +0 -188
- package/docs/hooks-use-oauth-passkey.zh-TW.md +0 -188
- package/docs/hooks-use-oauth-passkey.zh.md +0 -188
- package/docs/hooks.ja.md +0 -23
- package/docs/hooks.md +0 -23
- package/docs/hooks.zh-TW.md +0 -23
- package/docs/hooks.zh.md +0 -23
- package/docs/overview.ja.md +0 -119
- package/docs/overview.md +0 -119
- package/docs/overview.zh-TW.md +0 -119
- package/docs/overview.zh.md +0 -119
- package/docs/ui-components-address.ja.md +0 -121
- package/docs/ui-components-address.md +0 -121
- package/docs/ui-components-address.zh-TW.md +0 -121
- package/docs/ui-components-address.zh.md +0 -121
- package/docs/ui-components-avatar.ja.md +0 -65
- package/docs/ui-components-avatar.md +0 -65
- package/docs/ui-components-avatar.zh-TW.md +0 -65
- package/docs/ui-components-avatar.zh.md +0 -65
- package/docs/ui-components-button.ja.md +0 -99
- package/docs/ui-components-button.md +0 -99
- package/docs/ui-components-button.zh-TW.md +0 -99
- package/docs/ui-components-button.zh.md +0 -99
- package/docs/ui-components-logo.ja.md +0 -52
- package/docs/ui-components-logo.md +0 -52
- package/docs/ui-components-logo.zh-TW.md +0 -52
- package/docs/ui-components-logo.zh.md +0 -52
- package/docs/ui-components.ja.md +0 -57
- package/docs/ui-components.md +0 -57
- package/docs/ui-components.zh-TW.md +0 -57
- package/docs/ui-components.zh.md +0 -57
- package/glossary.md +0 -1
- package/src/Address/index.jsx +0 -2
- package/src/Avatar/index.jsx +0 -2
- package/src/Button/Button.stories.jsx +0 -7
- package/src/Button/index.jsx +0 -21
- package/src/Connect/Connect.stories.jsx +0 -34
- package/src/Connect/assets/locale.js +0 -149
- package/src/Connect/assets/login-bg.png +0 -0
- package/src/Connect/assets/login-slogan.js +0 -7
- package/src/Connect/components/action-button.jsx +0 -22
- package/src/Connect/components/app-tips.jsx +0 -156
- package/src/Connect/components/auto-height.jsx +0 -38
- package/src/Connect/components/back-button.jsx +0 -24
- package/src/Connect/components/connect-status.jsx +0 -259
- package/src/Connect/components/did-connect-title.jsx +0 -107
- package/src/Connect/components/download-tips.jsx +0 -55
- package/src/Connect/components/loading.jsx +0 -25
- package/src/Connect/components/login-item/connect-choose-list.jsx +0 -317
- package/src/Connect/components/login-item/connect-provider-list.jsx +0 -462
- package/src/Connect/components/login-item/login-method-item.jsx +0 -139
- package/src/Connect/components/login-item/mobile-login-item.jsx +0 -181
- package/src/Connect/components/login-item/passkey-login-item.jsx +0 -54
- package/src/Connect/components/login-item/wallet-login-options.jsx +0 -129
- package/src/Connect/components/login-item/web-login-item.jsx +0 -157
- package/src/Connect/components/mask-overlay.jsx +0 -32
- package/src/Connect/components/refresh-overlay.jsx +0 -52
- package/src/Connect/components/switch-app.jsx +0 -69
- package/src/Connect/connect.jsx +0 -617
- package/src/Connect/contexts/state.jsx +0 -234
- package/src/Connect/fallback-connect.jsx +0 -47
- package/src/Connect/fullpage.jsx +0 -3
- package/src/Connect/hooks/auth-url.js +0 -31
- package/src/Connect/hooks/method-list.js +0 -121
- package/src/Connect/hooks/page-show.js +0 -24
- package/src/Connect/hooks/provider-list.js +0 -165
- package/src/Connect/hooks/security.js +0 -40
- package/src/Connect/hooks/token.js +0 -627
- package/src/Connect/hooks/use-apps.js +0 -69
- package/src/Connect/hooks/use-quick-connect.js +0 -119
- package/src/Connect/index.jsx +0 -21
- package/src/Connect/landing-page.jsx +0 -3
- package/src/Connect/plugins/email/index.jsx +0 -85
- package/src/Connect/plugins/email/list-item.jsx +0 -34
- package/src/Connect/plugins/email/placeholder.jsx +0 -365
- package/src/Connect/plugins/index.js +0 -2
- package/src/Connect/use-connect.jsx +0 -321
- package/src/Connect/with-blocklet.jsx +0 -26
- package/src/Connect/with-bridge-call.jsx +0 -138
- package/src/Federated/context.jsx +0 -93
- package/src/Federated/index.jsx +0 -1
- package/src/Logo/index.jsx +0 -2
- package/src/OAuth/bind-conflict-alert.jsx +0 -37
- package/src/OAuth/context.jsx +0 -407
- package/src/OAuth/guest.svg +0 -20
- package/src/OAuth/index.jsx +0 -1
- package/src/OAuth/passport-switcher.jsx +0 -2
- package/src/Passkey/actions.jsx +0 -217
- package/src/Passkey/constants.js +0 -2
- package/src/Passkey/context.jsx +0 -395
- package/src/Passkey/dialog.jsx +0 -401
- package/src/Passkey/icon.jsx +0 -10
- package/src/Passkey/index.jsx +0 -2
- package/src/Service/index.jsx +0 -96
- package/src/Session/assets/did-spaces-guide-cover.svg +0 -1
- package/src/Session/assets/did-spaces-guide-icon.svg +0 -7
- package/src/Session/context.jsx +0 -7
- package/src/Session/did-spaces-guide.jsx +0 -173
- package/src/Session/handler.jsx +0 -98
- package/src/Session/hooks/use-federated.js +0 -91
- package/src/Session/hooks/use-mobile.jsx +0 -6
- package/src/Session/hooks/use-protected-routes.js +0 -16
- package/src/Session/hooks/use-session-token.js +0 -400
- package/src/Session/hooks/use-verify.jsx +0 -76
- package/src/Session/index.jsx +0 -1789
- package/src/Session/libs/constants.js +0 -17
- package/src/Session/libs/did-spaces.js +0 -38
- package/src/Session/libs/federated.js +0 -82
- package/src/Session/libs/index.js +0 -5
- package/src/Session/libs/locales.js +0 -160
- package/src/Session/libs/login-mobile.js +0 -80
- package/src/Session/window-focus-aware.jsx +0 -28
- package/src/SessionManager/index.jsx +0 -2
- package/src/Storage/engine/cookie.js +0 -25
- package/src/Storage/engine/local-storage.js +0 -57
- package/src/Storage/index.js +0 -25
- package/src/User/index.js +0 -4
- package/src/User/use-did.js +0 -80
- package/src/User/wrap-did.jsx +0 -18
- package/src/WebWalletSWKeeper/index.jsx +0 -3
- package/src/components/PassportSwitcher.jsx +0 -160
- package/src/constant.js +0 -27
- package/src/error.js +0 -6
- package/src/hooks/use-locale.jsx +0 -6
- package/src/index.js +0 -32
- package/src/locales/en.jsx +0 -15
- package/src/locales/index.jsx +0 -13
- package/src/locales/zh.jsx +0 -15
- package/src/types.d.ts +0 -355
- package/src/utils.js +0 -413
- package/vite.config.mjs +0 -29
|
@@ -1,93 +1,93 @@
|
|
|
1
|
-
import { jsx as
|
|
1
|
+
import { jsx as l, jsxs as G } from "react/jsx-runtime";
|
|
2
2
|
import o from "prop-types";
|
|
3
3
|
import { Box as g } from "@mui/material";
|
|
4
|
-
import { LOGIN_PROVIDER as
|
|
5
|
-
import { getWebWalletUrl as
|
|
4
|
+
import { LAST_USED_LOGIN_METHOD as re, LOGIN_PROVIDER as n, WALLET_LOGIN_METHOD as U, LOGIN_PROVIDER_NAME as se, LOGIN_PROVIDER_ICON_SIZE as h } from "@arcblock/ux/lib/Util/constant";
|
|
5
|
+
import { getWebWalletUrl as ne } from "@arcblock/ux/lib/Util/wallet";
|
|
6
6
|
import L from "lodash/noop";
|
|
7
|
-
import { useMemoizedFn as
|
|
7
|
+
import { useMemoizedFn as y } from "ahooks";
|
|
8
8
|
import x from "js-cookie";
|
|
9
|
-
import { getCookieOptions as
|
|
10
|
-
import { useRef as
|
|
11
|
-
import { mergeSx as
|
|
12
|
-
import
|
|
9
|
+
import { getCookieOptions as le } from "@arcblock/ux/lib/Util";
|
|
10
|
+
import { useRef as M, useEffect as ie } from "react";
|
|
11
|
+
import { mergeSx as ae } from "@arcblock/ux/lib/Util/style";
|
|
12
|
+
import ce from "@arcblock/ux/lib/DIDConnect/provider-icon";
|
|
13
13
|
import { GA_LAST_LOGIN_METHOD as u } from "@arcblock/ux/lib/withTracker/constant";
|
|
14
|
-
import
|
|
15
|
-
import
|
|
16
|
-
import
|
|
17
|
-
import { useOAuth as
|
|
18
|
-
import { useStateContext as
|
|
19
|
-
import { getAppId as
|
|
20
|
-
import
|
|
21
|
-
import { usePasskey as
|
|
14
|
+
import pe from "./mobile-login-item.js";
|
|
15
|
+
import me from "./web-login-item.js";
|
|
16
|
+
import ue from "./login-method-item.js";
|
|
17
|
+
import { useOAuth as de } from "../../../OAuth/context.js";
|
|
18
|
+
import { useStateContext as fe } from "../../contexts/state.js";
|
|
19
|
+
import { getAppId as ge, logger as he, getApiErrorMessage as Le } from "../../../utils.js";
|
|
20
|
+
import Ie from "./passkey-login-item.js";
|
|
21
|
+
import { usePasskey as ye } from "../../../Passkey/context.js";
|
|
22
22
|
import "../../../Passkey/actions.js";
|
|
23
|
-
import
|
|
24
|
-
function
|
|
25
|
-
onSuccess:
|
|
26
|
-
onError:
|
|
23
|
+
import xe from "../../plugins/email/index.js";
|
|
24
|
+
function Me({
|
|
25
|
+
onSuccess: O = L,
|
|
26
|
+
onError: A = L,
|
|
27
27
|
size: c = "small",
|
|
28
|
-
tokenState:
|
|
29
|
-
webWalletUrl:
|
|
30
|
-
tokenKey:
|
|
31
|
-
passkeyBehavior:
|
|
32
|
-
onReset:
|
|
33
|
-
showMobileLogin:
|
|
34
|
-
showOAuthLogin:
|
|
35
|
-
showPasskeyLogin:
|
|
36
|
-
showWebLogin:
|
|
28
|
+
tokenState: r,
|
|
29
|
+
webWalletUrl: F = ne(),
|
|
30
|
+
tokenKey: j,
|
|
31
|
+
passkeyBehavior: B = "none",
|
|
32
|
+
onReset: I = L,
|
|
33
|
+
showMobileLogin: H = !0,
|
|
34
|
+
showOAuthLogin: E = !0,
|
|
35
|
+
showPasskeyLogin: b = !0,
|
|
36
|
+
showWebLogin: V = !0,
|
|
37
37
|
showEmailLogin: d = !0,
|
|
38
|
-
oauthProviderList:
|
|
38
|
+
oauthProviderList: q = [],
|
|
39
39
|
slotProps: K = {},
|
|
40
|
-
disableSwitchApp:
|
|
41
|
-
forceUpdate:
|
|
42
|
-
magicToken:
|
|
43
|
-
baseUrl:
|
|
44
|
-
customItems:
|
|
40
|
+
disableSwitchApp: v = !1,
|
|
41
|
+
forceUpdate: Y = L,
|
|
42
|
+
magicToken: w = void 0,
|
|
43
|
+
baseUrl: Z = "/",
|
|
44
|
+
customItems: $ = []
|
|
45
45
|
}) {
|
|
46
|
-
const
|
|
47
|
-
localStorage.setItem(u, e.provider),
|
|
46
|
+
const _ = M(null), P = M(null), C = M(null), { loginOAuth: z, logoutOAuth: J, t: f, oauthState: s } = de(), { passkeyState: T } = ye(), { extraParams: R, locale: Q, connectState: t, plugins: D, setPlugins: X, setSelectedPlugin: ee, getPlugin: N, lastLoginMethod: i } = fe(), W = y(async (e) => {
|
|
47
|
+
localStorage.setItem(u, e.provider), r.reset(), s.reset({
|
|
48
48
|
status: "scanned"
|
|
49
|
-
}),
|
|
50
|
-
const p =
|
|
49
|
+
}), T.reset(), t.chooseMethod = e.provider, t.walletMethod = "";
|
|
50
|
+
const p = R?.sourceAppPid;
|
|
51
51
|
try {
|
|
52
|
-
|
|
53
|
-
const m = await
|
|
54
|
-
action:
|
|
55
|
-
...
|
|
56
|
-
}), a =
|
|
57
|
-
x.remove("connected_did", a), x.remove("connected_pk", a), x.remove("connected_wallet_os", a), m?.sessionToken && (await
|
|
52
|
+
s.loading = !0, s.status = "scanned";
|
|
53
|
+
const m = await z(e, {
|
|
54
|
+
action: r.action,
|
|
55
|
+
...R
|
|
56
|
+
}), a = le({ returnDomain: !1 });
|
|
57
|
+
x.remove("connected_did", a), x.remove("connected_pk", a), x.remove("connected_wallet_os", a), m?.sessionToken && (localStorage.setItem(re, e.provider), await O(
|
|
58
58
|
{
|
|
59
59
|
...m,
|
|
60
60
|
encrypted: !1
|
|
61
61
|
},
|
|
62
|
-
(
|
|
62
|
+
(te) => te,
|
|
63
63
|
{
|
|
64
64
|
sourceAppPid: p,
|
|
65
|
-
connected_app:
|
|
65
|
+
connected_app: ge(r.appInfo, r.memberAppInfo)
|
|
66
66
|
}
|
|
67
|
-
),
|
|
67
|
+
), s.loading = !1, s.status = "succeed");
|
|
68
68
|
} catch (m) {
|
|
69
|
-
|
|
70
|
-
const a =
|
|
71
|
-
|
|
69
|
+
he.error(`Failed login OAuth: ${e.provider}`, m);
|
|
70
|
+
const a = Le(m, f("loginOAuthFailed"));
|
|
71
|
+
s.loading = !1, s.error = a, s.status = "error", await J({ provider: e.provider }), A(new Error(a));
|
|
72
72
|
}
|
|
73
|
-
}),
|
|
74
|
-
|
|
75
|
-
}),
|
|
76
|
-
if (
|
|
77
|
-
const e =
|
|
78
|
-
e.state.status === "idle" && (localStorage.setItem(u,
|
|
73
|
+
}), k = y(async () => {
|
|
74
|
+
r.reset(), await I(), r.status = "created", t.chooseMethod = "wallet", t.walletMethod = "";
|
|
75
|
+
}), S = xe({ baseUrl: Z }), oe = y(() => {
|
|
76
|
+
if (w && d && D.some((e) => e.name === n.EMAIL)) {
|
|
77
|
+
const e = N(n.EMAIL);
|
|
78
|
+
e.state.status === "idle" && (localStorage.setItem(u, n.EMAIL), e.state.reset(), e.state.magicToken = w, t.chooseMethod = n.EMAIL, ee(e), Y());
|
|
79
79
|
}
|
|
80
80
|
});
|
|
81
|
-
return
|
|
81
|
+
return ie(() => {
|
|
82
82
|
const e = [];
|
|
83
83
|
if (d) {
|
|
84
|
-
const p =
|
|
85
|
-
p && p.baseUrl ===
|
|
84
|
+
const p = N(n.EMAIL);
|
|
85
|
+
p && p.baseUrl === S.baseUrl ? e.push(p) : e.push(S);
|
|
86
86
|
}
|
|
87
|
-
|
|
88
|
-
|
|
87
|
+
X(e), t.retryConnect = k, setTimeout(() => {
|
|
88
|
+
oe();
|
|
89
89
|
}, 100);
|
|
90
|
-
}, [d]), /* @__PURE__ */
|
|
90
|
+
}, [d]), /* @__PURE__ */ l(g, { className: "did-connect__choose", sx: ae({ flex: 1 }, K?.root?.sx), children: /* @__PURE__ */ l(
|
|
91
91
|
g,
|
|
92
92
|
{
|
|
93
93
|
sx: {
|
|
@@ -95,7 +95,7 @@ function Ie({
|
|
|
95
95
|
flexDirection: "column",
|
|
96
96
|
gap: 2
|
|
97
97
|
},
|
|
98
|
-
children: /* @__PURE__ */
|
|
98
|
+
children: /* @__PURE__ */ G(
|
|
99
99
|
g,
|
|
100
100
|
{
|
|
101
101
|
sx: [
|
|
@@ -106,46 +106,46 @@ function Ie({
|
|
|
106
106
|
}
|
|
107
107
|
],
|
|
108
108
|
children: [
|
|
109
|
-
|
|
110
|
-
|
|
109
|
+
H && /* @__PURE__ */ l(
|
|
110
|
+
pe,
|
|
111
111
|
{
|
|
112
112
|
t: f,
|
|
113
|
-
isLatest:
|
|
114
|
-
ref:
|
|
115
|
-
tokenState:
|
|
113
|
+
isLatest: i && i === U.MOBILE,
|
|
114
|
+
ref: _,
|
|
115
|
+
tokenState: r,
|
|
116
116
|
sx: [c === "small" ? { p: 1 } : { p: 2 }],
|
|
117
|
-
locale:
|
|
118
|
-
tokenKey:
|
|
119
|
-
disableSwitchApp:
|
|
117
|
+
locale: Q,
|
|
118
|
+
tokenKey: j,
|
|
119
|
+
disableSwitchApp: v,
|
|
120
120
|
onClick: async () => {
|
|
121
|
-
localStorage.setItem(u,
|
|
122
|
-
const e =
|
|
123
|
-
|
|
124
|
-
e(
|
|
121
|
+
localStorage.setItem(u, n.WALLET), r.reset(), await I(), r.status = "created", t.chooseMethod = "wallet";
|
|
122
|
+
const e = _.current?.connect;
|
|
123
|
+
t.retryConnect = () => {
|
|
124
|
+
e(k);
|
|
125
125
|
};
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
128
|
),
|
|
129
|
-
|
|
130
|
-
|
|
129
|
+
V && /* @__PURE__ */ l(
|
|
130
|
+
me,
|
|
131
131
|
{
|
|
132
|
-
isLatest:
|
|
133
|
-
ref:
|
|
134
|
-
tokenState:
|
|
135
|
-
webWalletUrl:
|
|
132
|
+
isLatest: i && i === U.WEB,
|
|
133
|
+
ref: P,
|
|
134
|
+
tokenState: r,
|
|
135
|
+
webWalletUrl: F,
|
|
136
136
|
t: f,
|
|
137
137
|
sx: [c === "small" ? { p: 1 } : { p: 2 }],
|
|
138
|
-
disableSwitchApp:
|
|
138
|
+
disableSwitchApp: v,
|
|
139
139
|
onClick: () => {
|
|
140
|
-
localStorage.setItem(u,
|
|
141
|
-
const e =
|
|
142
|
-
|
|
143
|
-
await
|
|
140
|
+
localStorage.setItem(u, n.WALLET), r.status = "scanned", t.chooseMethod = "wallet-web";
|
|
141
|
+
const e = P.current.connect;
|
|
142
|
+
t.retryConnect = async () => {
|
|
143
|
+
await I(), r.error = "", r.status = "scanned", e();
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
146
|
}
|
|
147
147
|
),
|
|
148
|
-
|
|
148
|
+
E || b || d ? /* @__PURE__ */ G(
|
|
149
149
|
g,
|
|
150
150
|
{
|
|
151
151
|
sx: [
|
|
@@ -156,21 +156,21 @@ function Ie({
|
|
|
156
156
|
}
|
|
157
157
|
],
|
|
158
158
|
children: [
|
|
159
|
-
|
|
159
|
+
D.map(
|
|
160
160
|
(e) => e.renderListItem({
|
|
161
161
|
key: e.name,
|
|
162
162
|
sx: [c === "small" ? { p: 1 } : { p: 2 }]
|
|
163
163
|
// forceUpdate,
|
|
164
164
|
})
|
|
165
165
|
),
|
|
166
|
-
|
|
167
|
-
|
|
166
|
+
E ? q.map((e) => /* @__PURE__ */ l(
|
|
167
|
+
ue,
|
|
168
168
|
{
|
|
169
169
|
t: f,
|
|
170
|
-
isLatest:
|
|
171
|
-
title:
|
|
172
|
-
icon: /* @__PURE__ */
|
|
173
|
-
|
|
170
|
+
isLatest: i && i === e.provider,
|
|
171
|
+
title: se[e.provider],
|
|
172
|
+
icon: /* @__PURE__ */ l(
|
|
173
|
+
ce,
|
|
174
174
|
{
|
|
175
175
|
provider: e.provider,
|
|
176
176
|
sx: {
|
|
@@ -182,28 +182,28 @@ function Ie({
|
|
|
182
182
|
}
|
|
183
183
|
),
|
|
184
184
|
onClick: () => {
|
|
185
|
-
|
|
186
|
-
|
|
185
|
+
W(e), t.retryConnect = () => {
|
|
186
|
+
W(e);
|
|
187
187
|
};
|
|
188
188
|
},
|
|
189
189
|
sx: [c === "small" ? { p: 1 } : { p: 2 }]
|
|
190
190
|
},
|
|
191
191
|
e.provider
|
|
192
192
|
)) : null,
|
|
193
|
-
|
|
194
|
-
|
|
193
|
+
b ? /* @__PURE__ */ l(
|
|
194
|
+
Ie,
|
|
195
195
|
{
|
|
196
|
-
ref:
|
|
197
|
-
onSuccess:
|
|
198
|
-
onError:
|
|
199
|
-
tokenState:
|
|
200
|
-
behavior:
|
|
196
|
+
ref: C,
|
|
197
|
+
onSuccess: O,
|
|
198
|
+
onError: A,
|
|
199
|
+
tokenState: r,
|
|
200
|
+
behavior: B,
|
|
201
201
|
sx: [c === "small" ? { p: 1 } : { p: 2 }],
|
|
202
202
|
onClick: () => {
|
|
203
|
-
localStorage.setItem(u,
|
|
204
|
-
const e =
|
|
205
|
-
|
|
206
|
-
|
|
203
|
+
localStorage.setItem(u, n.PASSKEY);
|
|
204
|
+
const e = C.current.connect;
|
|
205
|
+
t.chooseMethod = "passkey", t.walletMethod = "", t.retryConnect = () => {
|
|
206
|
+
T.verifying = !0, t.chooseMethod = "passkey", e();
|
|
207
207
|
};
|
|
208
208
|
},
|
|
209
209
|
slotProps: {
|
|
@@ -223,14 +223,14 @@ function Ie({
|
|
|
223
223
|
]
|
|
224
224
|
}
|
|
225
225
|
) : null,
|
|
226
|
-
|
|
226
|
+
$.map((e) => e || null)
|
|
227
227
|
]
|
|
228
228
|
}
|
|
229
229
|
)
|
|
230
230
|
}
|
|
231
231
|
) });
|
|
232
232
|
}
|
|
233
|
-
|
|
233
|
+
Me.propTypes = {
|
|
234
234
|
onSuccess: o.func,
|
|
235
235
|
onError: o.func,
|
|
236
236
|
size: o.oneOf(["small", "normal", "large"]),
|
|
@@ -253,5 +253,5 @@ Ie.propTypes = {
|
|
|
253
253
|
customItems: o.arrayOf(o.node)
|
|
254
254
|
};
|
|
255
255
|
export {
|
|
256
|
-
|
|
256
|
+
Me as default
|
|
257
257
|
};
|