@zerodev/wallet-react-ui 0.0.7 → 0.0.8
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/README.md +20 -5
- package/dist/_types/auth/components/WalletGridSheet/index.d.ts +15 -0
- package/dist/_types/auth/components/WalletGridSheet/index.d.ts.map +1 -0
- package/dist/_types/auth/index.d.ts.map +1 -1
- package/dist/_types/auth/pages/SignUp/InstalledWallets.d.ts +12 -0
- package/dist/_types/auth/pages/SignUp/InstalledWallets.d.ts.map +1 -0
- package/dist/_types/auth/pages/SignUp/MoreWallets.d.ts +5 -0
- package/dist/_types/auth/pages/SignUp/MoreWallets.d.ts.map +1 -0
- package/dist/_types/auth/pages/SignUp/Wallet.d.ts +7 -0
- package/dist/_types/auth/pages/SignUp/Wallet.d.ts.map +1 -0
- package/dist/_types/auth/pages/SignUp/context.d.ts +5 -0
- package/dist/_types/auth/pages/SignUp/context.d.ts.map +1 -1
- package/dist/_types/auth/pages/SignUp/index.d.ts +6 -0
- package/dist/_types/auth/pages/SignUp/index.d.ts.map +1 -1
- package/dist/_types/auth/types.d.ts +2 -2
- package/dist/_types/auth/types.d.ts.map +1 -1
- package/dist/_types/auth/utils/isCancellationError.d.ts.map +1 -1
- package/dist/_types/auth/walletGuide.d.ts +108 -0
- package/dist/_types/auth/walletGuide.d.ts.map +1 -0
- package/dist/_types/index.d.ts +1 -0
- package/dist/_types/index.d.ts.map +1 -1
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +719 -478
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +1 -1
- package/src/auth/components/WalletGridSheet/index.tsx +77 -0
- package/src/auth/index.tsx +0 -13
- package/src/auth/pages/SignUp/InstalledWallets.tsx +95 -0
- package/src/auth/pages/SignUp/MoreWallets.tsx +105 -0
- package/src/auth/pages/SignUp/Wallet.tsx +81 -0
- package/src/auth/pages/SignUp/context.tsx +5 -0
- package/src/auth/pages/SignUp/index.tsx +30 -4
- package/src/auth/types.ts +1 -2
- package/src/auth/utils/isCancellationError.ts +2 -0
- package/src/auth/walletGuide.ts +132 -0
- package/src/index.ts +1 -0
- package/dist/_types/auth/pages/WalletSelection.d.ts +0 -2
- package/dist/_types/auth/pages/WalletSelection.d.ts.map +0 -1
- package/src/auth/pages/WalletSelection.tsx +0 -61
package/dist/index.mjs
CHANGED
|
@@ -1,81 +1,81 @@
|
|
|
1
|
-
import { jsxs as
|
|
2
|
-
import { Text as
|
|
3
|
-
import { useState as
|
|
4
|
-
import { useStore as
|
|
5
|
-
import { useConfig as
|
|
6
|
-
import { useSendMagicLink as
|
|
7
|
-
import { subscribeWithSelector as
|
|
8
|
-
const
|
|
9
|
-
error:
|
|
10
|
-
loading:
|
|
11
|
-
send:
|
|
12
|
-
success:
|
|
1
|
+
import { jsxs as p, jsx as t, Fragment as v } from "react/jsx-runtime";
|
|
2
|
+
import { Text as z, cn as j, PoweredBy as O, Button as S, Wrapper as a2, Input as o2, Icon as q, ListItem as T, ListItemChevron as P, ListItemIcon as $, Badge as K, BottomSheet as s2, BottomSheetContent as l2, BottomSheetTitle as d2, BottomSheetClose as c2, Screen as u2, TopNav as p2 } from "@zerodev/react-ui";
|
|
3
|
+
import { useState as E, useEffect as N, useMemo as f2, useRef as X, createContext as h2, useContext as m2, useLayoutEffect as g2, useCallback as D2 } from "react";
|
|
4
|
+
import { useStore as M, create as z2 } from "zustand";
|
|
5
|
+
import { useConfig as C2, useConnectors as Z, useConnect as G } from "wagmi";
|
|
6
|
+
import { useSendMagicLink as J, useSendOTP as Y, useVerifyOTP as E2, useAuthenticateOAuth as w2, useRegisterPasskey as F2, useLoginPasskey as x2, useVerifyMagicLink as y2, zeroDevWallet as v2, NotAuthenticatedError as S2 } from "@zerodev/wallet-react";
|
|
7
|
+
import { subscribeWithSelector as A2 } from "zustand/middleware";
|
|
8
|
+
const b2 = "" + new URL("error.webp", import.meta.url).href, k2 = "" + new URL("loading.webp", import.meta.url).href, N2 = "" + new URL("send.webp", import.meta.url).href, _2 = "" + new URL("success.webp", import.meta.url).href, L2 = {
|
|
9
|
+
error: b2,
|
|
10
|
+
loading: k2,
|
|
11
|
+
send: N2,
|
|
12
|
+
success: _2
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function b({
|
|
15
15
|
imageName: e,
|
|
16
|
-
title:
|
|
17
|
-
children:
|
|
18
|
-
className:
|
|
16
|
+
title: n,
|
|
17
|
+
children: a,
|
|
18
|
+
className: r
|
|
19
19
|
}) {
|
|
20
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ p(
|
|
21
21
|
"div",
|
|
22
22
|
{
|
|
23
|
-
className:
|
|
23
|
+
className: j("zd:flex zd:flex-col zd:gap-8 zd:items-center", r),
|
|
24
24
|
children: [
|
|
25
25
|
/* @__PURE__ */ t(
|
|
26
26
|
"img",
|
|
27
27
|
{
|
|
28
|
-
src:
|
|
28
|
+
src: L2[e],
|
|
29
29
|
alt: e,
|
|
30
30
|
className: "zd:w-[118px] zd:h-[118px] zd:bg-transparent"
|
|
31
31
|
}
|
|
32
32
|
),
|
|
33
|
-
/* @__PURE__ */
|
|
34
|
-
/* @__PURE__ */ t(
|
|
35
|
-
/* @__PURE__ */ t(
|
|
33
|
+
/* @__PURE__ */ p("div", { className: "zd:flex zd:flex-col zd:gap-4 zd:items-center", children: [
|
|
34
|
+
/* @__PURE__ */ t(z, { className: "zd:text-h2 zd:text-center zd:whitespace-pre-wrap", children: n }),
|
|
35
|
+
/* @__PURE__ */ t(z, { className: "zd:text-center zd:whitespace-pre-wrap", children: a })
|
|
36
36
|
] })
|
|
37
37
|
]
|
|
38
38
|
}
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const
|
|
43
|
-
if (!
|
|
41
|
+
function M2() {
|
|
42
|
+
const n = C2().connectors.find((a) => a.id === "zerodev-wallet");
|
|
43
|
+
if (!n || !("getKitStore" in n))
|
|
44
44
|
throw new Error("useKitStore must be used with the zeroDevWallet connector");
|
|
45
|
-
return
|
|
45
|
+
return n.getKitStore();
|
|
46
46
|
}
|
|
47
|
-
function
|
|
48
|
-
const e =
|
|
47
|
+
function F() {
|
|
48
|
+
const e = M2(), n = M(e, (s) => s.auth.step), a = M(e, (s) => s.auth.stepHistory), r = M(e, (s) => s.auth.email), i = M(e, (s) => s.auth.otpId), o = M(
|
|
49
49
|
e,
|
|
50
|
-
(
|
|
50
|
+
(s) => s.auth.otpEncryptionTargetBundle
|
|
51
51
|
);
|
|
52
52
|
return {
|
|
53
|
-
step:
|
|
54
|
-
email:
|
|
55
|
-
otpId:
|
|
56
|
-
otpEncryptionTargetBundle:
|
|
53
|
+
step: n,
|
|
54
|
+
email: r,
|
|
55
|
+
otpId: i,
|
|
56
|
+
otpEncryptionTargetBundle: o,
|
|
57
57
|
goToStep: e.getState().auth.goToStep,
|
|
58
|
-
goBack:
|
|
58
|
+
goBack: a.length > 0 ? e.getState().auth.goBack : null,
|
|
59
59
|
reset: e.getState().auth.reset,
|
|
60
60
|
setEmail: e.getState().auth.setEmail,
|
|
61
61
|
setOtpSession: e.getState().auth.setOtpSession,
|
|
62
62
|
clearOtpSession: e.getState().auth.clearOtpSession
|
|
63
63
|
};
|
|
64
64
|
}
|
|
65
|
-
function
|
|
66
|
-
const { email: e, setOtpSession:
|
|
67
|
-
return
|
|
68
|
-
if (
|
|
69
|
-
const
|
|
70
|
-
|
|
65
|
+
function U2() {
|
|
66
|
+
const { email: e, setOtpSession: n } = F(), { mutateAsync: a, isPending: r } = J(), [i, o] = E(60), s = i <= 0 && !r;
|
|
67
|
+
return N(() => {
|
|
68
|
+
if (i <= 0) return;
|
|
69
|
+
const f = setInterval(() => {
|
|
70
|
+
o((m) => Math.max(0, m - 1));
|
|
71
71
|
}, 1e3);
|
|
72
72
|
return () => {
|
|
73
|
-
clearInterval(
|
|
73
|
+
clearInterval(f);
|
|
74
74
|
};
|
|
75
|
-
}, [
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
|
|
75
|
+
}, [i]), /* @__PURE__ */ p(v, { children: [
|
|
76
|
+
/* @__PURE__ */ p("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:gap-8 zd:justify-center", children: [
|
|
77
|
+
/* @__PURE__ */ p(
|
|
78
|
+
b,
|
|
79
79
|
{
|
|
80
80
|
imageName: "send",
|
|
81
81
|
title: `Check your email!
|
|
@@ -83,278 +83,278 @@ function be() {
|
|
|
83
83
|
children: [
|
|
84
84
|
"We've sent a magic link to",
|
|
85
85
|
" ",
|
|
86
|
-
/* @__PURE__ */ t(
|
|
86
|
+
/* @__PURE__ */ t(z, { as: "span", className: "zd:text-solarOrange", children: e }),
|
|
87
87
|
`
|
|
88
88
|
`,
|
|
89
89
|
"Please open the email and click the link to log in."
|
|
90
90
|
]
|
|
91
91
|
}
|
|
92
92
|
),
|
|
93
|
-
/* @__PURE__ */ t("div", { className: "zd:flex zd:flex-col zd:gap-1", children: /* @__PURE__ */
|
|
93
|
+
/* @__PURE__ */ t("div", { className: "zd:flex zd:flex-col zd:gap-1", children: /* @__PURE__ */ p(z, { className: "zd:text-center", children: [
|
|
94
94
|
"Did not get an email?",
|
|
95
95
|
" ",
|
|
96
96
|
/* @__PURE__ */ t(
|
|
97
97
|
"button",
|
|
98
98
|
{
|
|
99
99
|
type: "button",
|
|
100
|
-
disabled: !
|
|
100
|
+
disabled: !s,
|
|
101
101
|
onClick: async () => {
|
|
102
|
-
if (!(!e || !
|
|
102
|
+
if (!(!e || !s))
|
|
103
103
|
try {
|
|
104
|
-
const { otpId:
|
|
104
|
+
const { otpId: f, otpEncryptionTargetBundle: m } = await a({
|
|
105
105
|
email: e
|
|
106
106
|
});
|
|
107
|
-
|
|
107
|
+
n({ otpId: f, otpEncryptionTargetBundle: m }), o(60);
|
|
108
108
|
} catch {
|
|
109
109
|
}
|
|
110
110
|
},
|
|
111
111
|
className: "zd:cursor-pointer zd:underline zd:disabled:opacity-50 zd:disabled:cursor-not-allowed",
|
|
112
|
-
children:
|
|
112
|
+
children: s ? "Resend" : `Resend in ${i} ${i === 1 ? "second" : "seconds"}`
|
|
113
113
|
}
|
|
114
114
|
)
|
|
115
115
|
] }) })
|
|
116
116
|
] }),
|
|
117
|
-
/* @__PURE__ */ t(
|
|
117
|
+
/* @__PURE__ */ t(O, { className: "zd:self-center zd:pt-4 zd:pb-6" })
|
|
118
118
|
] });
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function T2() {
|
|
121
121
|
return typeof window > "u" ? !1 : new URLSearchParams(window.location.search).has("code");
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function U() {
|
|
124
124
|
if (typeof window > "u") return;
|
|
125
125
|
const e = new URL(window.location.href);
|
|
126
126
|
e.searchParams.has("code") && (e.searchParams.delete("code"), window.history.replaceState(null, "", e.toString()));
|
|
127
127
|
}
|
|
128
|
-
function
|
|
128
|
+
function O2({
|
|
129
129
|
title: e = "Oops, something went wrong",
|
|
130
|
-
message:
|
|
131
|
-
showRetry:
|
|
132
|
-
showChooseAnother:
|
|
130
|
+
message: n = "We couldn't complete the sign-in process. This could be due to timeout, an expired link, or a cancelled request.",
|
|
131
|
+
showRetry: a = !1,
|
|
132
|
+
showChooseAnother: r = !0
|
|
133
133
|
}) {
|
|
134
|
-
const { goToStep:
|
|
135
|
-
return /* @__PURE__ */
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */ t(
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
134
|
+
const { goToStep: i, goBack: o, reset: s } = F();
|
|
135
|
+
return /* @__PURE__ */ p(v, { children: [
|
|
136
|
+
/* @__PURE__ */ p("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:gap-8 zd:items-center zd:justify-center", children: [
|
|
137
|
+
/* @__PURE__ */ t(b, { imageName: "error", title: e, children: n }),
|
|
138
|
+
/* @__PURE__ */ p("div", { className: "zd:flex zd:flex-col zd:gap-1", children: [
|
|
139
|
+
a && /* @__PURE__ */ t(S, { action: "primary", text: "Try again", onClick: o ?? (() => i("sign-up")) }),
|
|
140
|
+
r && /* @__PURE__ */ t(
|
|
141
|
+
S,
|
|
142
142
|
{
|
|
143
|
-
action:
|
|
143
|
+
action: a ? "secondary" : "primary",
|
|
144
144
|
onClick: () => {
|
|
145
|
-
|
|
145
|
+
U(), i("sign-up");
|
|
146
146
|
},
|
|
147
147
|
text: "Choose another sign-in method"
|
|
148
148
|
}
|
|
149
149
|
),
|
|
150
|
-
!
|
|
150
|
+
!a && !r && /* @__PURE__ */ t(S, { action: "primary", text: "Start over", onClick: s })
|
|
151
151
|
] })
|
|
152
152
|
] }),
|
|
153
|
-
/* @__PURE__ */ t(
|
|
153
|
+
/* @__PURE__ */ t(O, { className: "zd:self-center zd:pt-4 zd:pb-6" })
|
|
154
154
|
] });
|
|
155
155
|
}
|
|
156
|
-
const
|
|
157
|
-
function
|
|
158
|
-
return Math.max(
|
|
156
|
+
const I2 = 4, H2 = 8, P2 = 6;
|
|
157
|
+
function R2(e) {
|
|
158
|
+
return Math.max(I2, Math.min(H2, e));
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function B2({ char: e, isFocused: n }) {
|
|
161
161
|
return /* @__PURE__ */ t(
|
|
162
|
-
|
|
162
|
+
a2,
|
|
163
163
|
{
|
|
164
164
|
"data-testid": "code-input-box",
|
|
165
|
-
"data-active":
|
|
166
|
-
className:
|
|
165
|
+
"data-active": n || void 0,
|
|
166
|
+
className: j(
|
|
167
167
|
"zd:h-16 zd:w-14 zd:rounded-lg zd:flex zd:items-center zd:justify-center",
|
|
168
|
-
|
|
168
|
+
n && "zd:border-[1.5px] zd:border-greyScale"
|
|
169
169
|
),
|
|
170
|
-
children: /* @__PURE__ */ t(
|
|
170
|
+
children: /* @__PURE__ */ t(z, { className: "zd:text-h2", children: e })
|
|
171
171
|
}
|
|
172
172
|
);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function Z2({
|
|
175
175
|
onChange: e,
|
|
176
|
-
onComplete:
|
|
177
|
-
disabled:
|
|
178
|
-
error:
|
|
179
|
-
autoFocus:
|
|
180
|
-
length:
|
|
181
|
-
"data-testid":
|
|
176
|
+
onComplete: n,
|
|
177
|
+
disabled: a = !1,
|
|
178
|
+
error: r = !1,
|
|
179
|
+
autoFocus: i = !1,
|
|
180
|
+
length: o = P2,
|
|
181
|
+
"data-testid": s
|
|
182
182
|
}) {
|
|
183
|
-
const c =
|
|
184
|
-
() => Array.from({ length: c }, (
|
|
185
|
-
id: `char-${
|
|
186
|
-
index:
|
|
183
|
+
const c = R2(o), f = f2(
|
|
184
|
+
() => Array.from({ length: c }, (d, D) => ({
|
|
185
|
+
id: `char-${D}`,
|
|
186
|
+
index: D
|
|
187
187
|
})),
|
|
188
188
|
[c]
|
|
189
|
-
), [
|
|
190
|
-
|
|
191
|
-
var
|
|
192
|
-
|
|
193
|
-
}, [
|
|
194
|
-
|
|
189
|
+
), [m, g] = E(""), [w, u] = E(!1), l = X(null);
|
|
190
|
+
N(() => {
|
|
191
|
+
var d;
|
|
192
|
+
i && !a && ((d = l.current) == null || d.focus());
|
|
193
|
+
}, [i, a]), N(() => {
|
|
194
|
+
g((d) => d.slice(0, c));
|
|
195
195
|
}, [c]);
|
|
196
|
-
const
|
|
197
|
-
const
|
|
198
|
-
|
|
199
|
-
var
|
|
200
|
-
|
|
196
|
+
const h = (d) => {
|
|
197
|
+
const D = d.slice(0, c).toUpperCase();
|
|
198
|
+
g(D), e == null || e(D), D.length === c && setTimeout(() => {
|
|
199
|
+
var C;
|
|
200
|
+
n == null || n(D), (C = l.current) == null || C.blur();
|
|
201
201
|
}, 0);
|
|
202
202
|
};
|
|
203
|
-
return /* @__PURE__ */
|
|
203
|
+
return /* @__PURE__ */ p(
|
|
204
204
|
"button",
|
|
205
205
|
{
|
|
206
206
|
type: "button",
|
|
207
207
|
className: "zd:flex zd:flex-row zd:items-center zd:justify-between zd:gap-2 zd:w-full zd:cursor-text",
|
|
208
208
|
onClick: () => {
|
|
209
|
-
var
|
|
210
|
-
return (
|
|
209
|
+
var d;
|
|
210
|
+
return (d = l.current) == null ? void 0 : d.focus();
|
|
211
211
|
},
|
|
212
|
-
disabled:
|
|
213
|
-
"data-testid":
|
|
212
|
+
disabled: a,
|
|
213
|
+
"data-testid": s,
|
|
214
214
|
children: [
|
|
215
215
|
/* @__PURE__ */ t(
|
|
216
216
|
"input",
|
|
217
217
|
{
|
|
218
|
-
ref:
|
|
219
|
-
value:
|
|
220
|
-
onChange: (
|
|
221
|
-
onFocus: () =>
|
|
222
|
-
onBlur: () =>
|
|
218
|
+
ref: l,
|
|
219
|
+
value: m,
|
|
220
|
+
onChange: (d) => h(d.target.value),
|
|
221
|
+
onFocus: () => u(!0),
|
|
222
|
+
onBlur: () => u(!1),
|
|
223
223
|
maxLength: c,
|
|
224
|
-
disabled:
|
|
224
|
+
disabled: a,
|
|
225
225
|
className: "zd:absolute zd:opacity-0 zd:pointer-events-none",
|
|
226
226
|
style: { position: "absolute", opacity: 0 },
|
|
227
227
|
"aria-label": "Verification code"
|
|
228
228
|
}
|
|
229
229
|
),
|
|
230
|
-
|
|
231
|
-
|
|
230
|
+
f.map((d) => /* @__PURE__ */ t(
|
|
231
|
+
B2,
|
|
232
232
|
{
|
|
233
|
-
char:
|
|
234
|
-
isFocused: !
|
|
233
|
+
char: m[d.index] ?? "",
|
|
234
|
+
isFocused: !r && w && d.index === m.length
|
|
235
235
|
},
|
|
236
|
-
|
|
236
|
+
d.id
|
|
237
237
|
))
|
|
238
238
|
]
|
|
239
239
|
}
|
|
240
240
|
);
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function G2() {
|
|
243
243
|
const {
|
|
244
244
|
email: e,
|
|
245
|
-
otpId:
|
|
246
|
-
otpEncryptionTargetBundle:
|
|
247
|
-
setOtpSession:
|
|
248
|
-
clearOtpSession:
|
|
249
|
-
goToStep:
|
|
250
|
-
} =
|
|
251
|
-
|
|
252
|
-
if (
|
|
253
|
-
const
|
|
254
|
-
|
|
245
|
+
otpId: n,
|
|
246
|
+
otpEncryptionTargetBundle: a,
|
|
247
|
+
setOtpSession: r,
|
|
248
|
+
clearOtpSession: i,
|
|
249
|
+
goToStep: o
|
|
250
|
+
} = F(), { mutateAsync: s, isPending: c } = Y(), { mutateAsync: f, isPending: m } = E2(), [g, w] = E(""), [u, l] = E(!1), [h, d] = E(60);
|
|
251
|
+
N(() => {
|
|
252
|
+
if (h <= 0) return;
|
|
253
|
+
const y = setInterval(() => {
|
|
254
|
+
d((R) => Math.max(0, R - 1));
|
|
255
255
|
}, 1e3);
|
|
256
|
-
return () => clearInterval(
|
|
257
|
-
}, [
|
|
258
|
-
const
|
|
259
|
-
if (!(!
|
|
260
|
-
|
|
256
|
+
return () => clearInterval(y);
|
|
257
|
+
}, [h]);
|
|
258
|
+
const D = async () => {
|
|
259
|
+
if (!(!g.trim() || !n || !a)) {
|
|
260
|
+
l(!1);
|
|
261
261
|
try {
|
|
262
|
-
await
|
|
263
|
-
otpId:
|
|
264
|
-
code:
|
|
265
|
-
otpEncryptionTargetBundle:
|
|
266
|
-
}),
|
|
262
|
+
await f({
|
|
263
|
+
otpId: n,
|
|
264
|
+
code: g.trim(),
|
|
265
|
+
otpEncryptionTargetBundle: a
|
|
266
|
+
}), i(), o("authenticated");
|
|
267
267
|
} catch {
|
|
268
|
-
|
|
268
|
+
l(!0);
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
},
|
|
272
|
-
|
|
273
|
-
},
|
|
274
|
-
if (!(!e ||
|
|
271
|
+
}, C = (y) => {
|
|
272
|
+
w(y);
|
|
273
|
+
}, x = async () => {
|
|
274
|
+
if (!(!e || h > 0 || c))
|
|
275
275
|
try {
|
|
276
|
-
const { otpId:
|
|
277
|
-
|
|
278
|
-
otpId:
|
|
279
|
-
otpEncryptionTargetBundle:
|
|
280
|
-
}),
|
|
276
|
+
const { otpId: y, otpEncryptionTargetBundle: R } = await s({ email: e });
|
|
277
|
+
r({
|
|
278
|
+
otpId: y,
|
|
279
|
+
otpEncryptionTargetBundle: R
|
|
280
|
+
}), d(60), l(!1);
|
|
281
281
|
} catch {
|
|
282
|
-
|
|
282
|
+
l(!0);
|
|
283
283
|
}
|
|
284
|
-
},
|
|
285
|
-
return /* @__PURE__ */
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
/* @__PURE__ */
|
|
288
|
-
/* @__PURE__ */ t(
|
|
289
|
-
/* @__PURE__ */
|
|
284
|
+
}, A = h <= 0 && !c;
|
|
285
|
+
return /* @__PURE__ */ p(v, { children: [
|
|
286
|
+
/* @__PURE__ */ p("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:gap-8 zd:justify-center zd:items-center", children: [
|
|
287
|
+
/* @__PURE__ */ p("div", { className: "zd:flex zd:flex-col zd:gap-4", children: [
|
|
288
|
+
/* @__PURE__ */ t(z, { className: "zd:text-h2 zd:text-center", children: "Enter verification code" }),
|
|
289
|
+
/* @__PURE__ */ p(z, { className: "zd:text-center", children: [
|
|
290
290
|
"Enter the code from the email we sent to",
|
|
291
291
|
" ",
|
|
292
|
-
/* @__PURE__ */ t(
|
|
292
|
+
/* @__PURE__ */ t(z, { className: "zd:text-solarOrange", children: e })
|
|
293
293
|
] })
|
|
294
294
|
] }),
|
|
295
295
|
/* @__PURE__ */ t(
|
|
296
|
-
|
|
296
|
+
Z2,
|
|
297
297
|
{
|
|
298
|
-
onComplete:
|
|
299
|
-
onChange: () =>
|
|
300
|
-
disabled:
|
|
301
|
-
error:
|
|
298
|
+
onComplete: C,
|
|
299
|
+
onChange: () => l(!1),
|
|
300
|
+
disabled: m,
|
|
301
|
+
error: u,
|
|
302
302
|
autoFocus: !0
|
|
303
303
|
}
|
|
304
304
|
),
|
|
305
305
|
/* @__PURE__ */ t(
|
|
306
|
-
|
|
306
|
+
S,
|
|
307
307
|
{
|
|
308
308
|
text: "Confirm code",
|
|
309
|
-
onClick:
|
|
310
|
-
disabled: !
|
|
309
|
+
onClick: D,
|
|
310
|
+
disabled: !g.trim() || m
|
|
311
311
|
}
|
|
312
312
|
),
|
|
313
|
-
/* @__PURE__ */ t("div", { className: "zd:flex zd:flex-col zd:gap-1", children: /* @__PURE__ */
|
|
313
|
+
/* @__PURE__ */ t("div", { className: "zd:flex zd:flex-col zd:gap-1", children: /* @__PURE__ */ p(z, { className: "zd:text-center", children: [
|
|
314
314
|
"Did not get an email?",
|
|
315
315
|
" ",
|
|
316
316
|
/* @__PURE__ */ t(
|
|
317
317
|
"button",
|
|
318
318
|
{
|
|
319
319
|
type: "button",
|
|
320
|
-
disabled: !
|
|
321
|
-
onClick:
|
|
320
|
+
disabled: !A,
|
|
321
|
+
onClick: x,
|
|
322
322
|
className: "zd:cursor-pointer zd:underline zd:disabled:opacity-50 zd:disabled:cursor-not-allowed",
|
|
323
|
-
children:
|
|
323
|
+
children: A ? "Resend" : `Resend in ${h} ${h === 1 ? "second" : "seconds"}`
|
|
324
324
|
}
|
|
325
325
|
)
|
|
326
326
|
] }) })
|
|
327
327
|
] }),
|
|
328
|
-
/* @__PURE__ */ t(
|
|
328
|
+
/* @__PURE__ */ t(O, { className: "zd:self-center zd:pt-4 zd:pb-6" })
|
|
329
329
|
] });
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function V2({
|
|
332
332
|
termsAndConditionsUrl: e,
|
|
333
|
-
privacyPolicyUrl:
|
|
334
|
-
agreedToTerms:
|
|
335
|
-
setAgreedToTerms:
|
|
336
|
-
highlight:
|
|
333
|
+
privacyPolicyUrl: n,
|
|
334
|
+
agreedToTerms: a,
|
|
335
|
+
setAgreedToTerms: r,
|
|
336
|
+
highlight: i = !1
|
|
337
337
|
}) {
|
|
338
|
-
return /* @__PURE__ */
|
|
339
|
-
!!(e ||
|
|
338
|
+
return /* @__PURE__ */ p("div", { className: "zd:flex zd:flex-col zd:items-center zd:gap-5", children: [
|
|
339
|
+
!!(e || n) && /* @__PURE__ */ p(
|
|
340
340
|
"div",
|
|
341
341
|
{
|
|
342
|
-
className: `zd:flex zd:flex-row zd:items-center zd:gap-2 zd:rounded-md zd:p-2 zd:transition-colors ${
|
|
342
|
+
className: `zd:flex zd:flex-row zd:items-center zd:gap-2 zd:rounded-md zd:p-2 zd:transition-colors ${i ? "zd:border zd:border-negative" : "zd:border zd:border-transparent"}`,
|
|
343
343
|
children: [
|
|
344
344
|
/* @__PURE__ */ t(
|
|
345
345
|
"input",
|
|
346
346
|
{
|
|
347
347
|
type: "checkbox",
|
|
348
|
-
checked:
|
|
349
|
-
onChange: (
|
|
348
|
+
checked: a,
|
|
349
|
+
onChange: (s) => r(s.target.checked),
|
|
350
350
|
className: "zd:cursor-pointer zd:[color-scheme:light]"
|
|
351
351
|
}
|
|
352
352
|
),
|
|
353
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ p(z, { className: "zd:flex-1", children: [
|
|
354
354
|
"I agree to the",
|
|
355
355
|
" ",
|
|
356
356
|
e && /* @__PURE__ */ t(
|
|
357
|
-
|
|
357
|
+
z,
|
|
358
358
|
{
|
|
359
359
|
as: "a",
|
|
360
360
|
href: e,
|
|
@@ -364,12 +364,12 @@ function Oe({
|
|
|
364
364
|
children: "Terms & Conditions"
|
|
365
365
|
}
|
|
366
366
|
),
|
|
367
|
-
e &&
|
|
368
|
-
|
|
369
|
-
|
|
367
|
+
e && n && " and ",
|
|
368
|
+
n && /* @__PURE__ */ t(
|
|
369
|
+
z,
|
|
370
370
|
{
|
|
371
371
|
as: "a",
|
|
372
|
-
href:
|
|
372
|
+
href: n,
|
|
373
373
|
target: "_blank",
|
|
374
374
|
rel: "noopener noreferrer",
|
|
375
375
|
className: "zd:underline",
|
|
@@ -380,17 +380,17 @@ function Oe({
|
|
|
380
380
|
]
|
|
381
381
|
}
|
|
382
382
|
),
|
|
383
|
-
/* @__PURE__ */ t(
|
|
383
|
+
/* @__PURE__ */ t(O, {})
|
|
384
384
|
] });
|
|
385
385
|
}
|
|
386
|
-
const
|
|
387
|
-
function
|
|
386
|
+
const W2 = "" + new URL("blob.webm", import.meta.url).href;
|
|
387
|
+
function j2({ className: e }) {
|
|
388
388
|
return /* @__PURE__ */ t(
|
|
389
389
|
"video",
|
|
390
390
|
{
|
|
391
391
|
className: e,
|
|
392
392
|
style: { aspectRatio: "1 / 1" },
|
|
393
|
-
src:
|
|
393
|
+
src: W2,
|
|
394
394
|
autoPlay: !0,
|
|
395
395
|
loop: !0,
|
|
396
396
|
muted: !0,
|
|
@@ -400,198 +400,481 @@ function Ue({ className: e }) {
|
|
|
400
400
|
}
|
|
401
401
|
);
|
|
402
402
|
}
|
|
403
|
-
const
|
|
404
|
-
function
|
|
405
|
-
const e =
|
|
403
|
+
const Q = h2(null);
|
|
404
|
+
function _() {
|
|
405
|
+
const e = m2(Q);
|
|
406
406
|
if (!e)
|
|
407
407
|
throw new Error("SignUp.* components must be rendered inside <SignUp>");
|
|
408
408
|
return e;
|
|
409
409
|
}
|
|
410
|
-
function
|
|
411
|
-
const { setAuthPending:
|
|
412
|
-
|
|
410
|
+
function L(e) {
|
|
411
|
+
const { setAuthPending: n } = _();
|
|
412
|
+
N(() => (n(e), () => n(!1)), [e, n]);
|
|
413
413
|
}
|
|
414
|
-
const
|
|
414
|
+
const q2 = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
415
415
|
function B(e) {
|
|
416
|
-
return
|
|
417
|
-
}
|
|
418
|
-
function
|
|
419
|
-
const { goToStep: e, setEmail:
|
|
420
|
-
authPending:
|
|
421
|
-
emailAuthMethod:
|
|
422
|
-
needsAgreement:
|
|
423
|
-
guardAgreement:
|
|
416
|
+
return q2.test(e.trim());
|
|
417
|
+
}
|
|
418
|
+
function e2() {
|
|
419
|
+
const { goToStep: e, setEmail: n, setOtpSession: a } = F(), {
|
|
420
|
+
authPending: r,
|
|
421
|
+
emailAuthMethod: i,
|
|
422
|
+
needsAgreement: o,
|
|
423
|
+
guardAgreement: s,
|
|
424
424
|
setError: c
|
|
425
|
-
} =
|
|
426
|
-
|
|
427
|
-
const
|
|
428
|
-
if (!(!
|
|
425
|
+
} = _(), [f, m] = E(""), g = i === "otp", { mutateAsync: w, isPending: u } = Y(), { mutateAsync: l, isPending: h } = J(), d = u || h;
|
|
426
|
+
L(d);
|
|
427
|
+
const D = async () => {
|
|
428
|
+
if (!(!f || r) && B(f) && s()) {
|
|
429
429
|
c(null);
|
|
430
430
|
try {
|
|
431
|
-
const
|
|
432
|
-
email:
|
|
431
|
+
const C = g ? w : l, { otpId: x, otpEncryptionTargetBundle: A } = await C({
|
|
432
|
+
email: f
|
|
433
433
|
});
|
|
434
|
-
|
|
435
|
-
} catch (
|
|
434
|
+
n(f), a({ otpId: x, otpEncryptionTargetBundle: A }), e(g ? "otp-input" : "email-verification");
|
|
435
|
+
} catch (C) {
|
|
436
436
|
c(
|
|
437
|
-
|
|
437
|
+
C instanceof Error ? C.message : "Failed to send verification code"
|
|
438
438
|
);
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
};
|
|
442
442
|
return /* @__PURE__ */ t(
|
|
443
|
-
|
|
443
|
+
o2,
|
|
444
444
|
{
|
|
445
445
|
iconName: "email",
|
|
446
446
|
placeholder: "Enter your email",
|
|
447
|
-
value:
|
|
448
|
-
onChange: (
|
|
447
|
+
value: f,
|
|
448
|
+
onChange: (C) => m(C.target.value),
|
|
449
449
|
type: "email",
|
|
450
450
|
autoCapitalize: "none",
|
|
451
451
|
autoComplete: "email",
|
|
452
|
-
disabled:
|
|
452
|
+
disabled: r,
|
|
453
453
|
variant: "listItemStyle",
|
|
454
|
-
onKeyDown: (
|
|
455
|
-
|
|
454
|
+
onKeyDown: (C) => {
|
|
455
|
+
C.key === "Enter" && f && !r && D();
|
|
456
456
|
},
|
|
457
|
-
children:
|
|
457
|
+
children: d ? /* @__PURE__ */ t("div", { className: "zd:w-13 zd:h-13 zd:flex zd:items-center zd:justify-center", children: /* @__PURE__ */ t("div", { className: "zd:w-5 zd:h-5 zd:border-2 zd:border-solarOrange zd:border-t-transparent zd:rounded-full zd:animate-spin" }) }) : /* @__PURE__ */ t(
|
|
458
458
|
"button",
|
|
459
459
|
{
|
|
460
460
|
type: "button",
|
|
461
|
-
disabled: !B(
|
|
462
|
-
className: `zd:w-13 zd:h-13 zd:rounded-2xl zd:flex zd:items-center zd:justify-center zd:transition-colors ${B(
|
|
463
|
-
onClick: () =>
|
|
464
|
-
children: /* @__PURE__ */ t(
|
|
461
|
+
disabled: !B(f) || o,
|
|
462
|
+
className: `zd:w-13 zd:h-13 zd:rounded-2xl zd:flex zd:items-center zd:justify-center zd:transition-colors ${B(f) && !o ? "zd:cursor-pointer" : "zd:cursor-not-allowed zd:opacity-50"}`,
|
|
463
|
+
onClick: () => D(),
|
|
464
|
+
children: /* @__PURE__ */ t(q, { name: "chevronRight", className: "zd:text-greyScale" })
|
|
465
465
|
}
|
|
466
466
|
)
|
|
467
467
|
}
|
|
468
468
|
);
|
|
469
469
|
}
|
|
470
|
-
function
|
|
471
|
-
return e instanceof Error ? e.name === "AbortError" || e.name === "NotAllowedError" ? !0 : e.message.toLowerCase().includes("oauth popup was closed") : !1;
|
|
470
|
+
function I(e) {
|
|
471
|
+
return e instanceof Error ? e.name === "AbortError" || e.name === "NotAllowedError" || e.name === "UserRejectedRequestError" ? !0 : e.message.toLowerCase().includes("oauth popup was closed") : !1;
|
|
472
472
|
}
|
|
473
|
-
function
|
|
474
|
-
const { goToStep: e } =
|
|
473
|
+
function t2() {
|
|
474
|
+
const { goToStep: e } = F(), { authPending: n, guardAgreement: a, setError: r } = _(), { mutateAsync: i, isPending: o } = w2({
|
|
475
475
|
mutation: {
|
|
476
476
|
onSuccess: () => {
|
|
477
477
|
e("authenticated");
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
});
|
|
481
|
-
return
|
|
482
|
-
|
|
481
|
+
return L(o), /* @__PURE__ */ t(
|
|
482
|
+
T,
|
|
483
483
|
{
|
|
484
|
-
icon: /* @__PURE__ */ t(
|
|
484
|
+
icon: /* @__PURE__ */ t($, { name: "google" }),
|
|
485
485
|
title: "Google",
|
|
486
|
-
trailing: /* @__PURE__ */ t(
|
|
487
|
-
disabled:
|
|
486
|
+
trailing: /* @__PURE__ */ t(P, {}),
|
|
487
|
+
disabled: n,
|
|
488
488
|
onClick: async () => {
|
|
489
|
-
if (!
|
|
490
|
-
|
|
489
|
+
if (!n && a()) {
|
|
490
|
+
r(null);
|
|
491
491
|
try {
|
|
492
|
-
await
|
|
492
|
+
await i({ provider: "google" });
|
|
493
493
|
} catch (c) {
|
|
494
|
-
|
|
494
|
+
I(c) || r(c instanceof Error ? c.message : String(c));
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
499
|
);
|
|
500
500
|
}
|
|
501
|
-
function
|
|
502
|
-
|
|
501
|
+
function H(e, n) {
|
|
502
|
+
return !!n.rdns && (e.id === n.rdns || (Array.isArray(e.rdns) ? e.rdns.includes(n.rdns) : e.rdns === n.rdns));
|
|
503
|
+
}
|
|
504
|
+
const $2 = [
|
|
505
|
+
{
|
|
506
|
+
id: "metamask",
|
|
507
|
+
name: "MetaMask",
|
|
508
|
+
rdns: "io.metamask",
|
|
509
|
+
icon: "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2228%22%20height%3D%2228%22%20fill%3D%22none%22%20viewBox%3D%220%200%2028%2028%22%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M0%200h28v28H0z%22%2F%3E%3Cg%20clip-path%3D%22url(%23a)%22%3E%3Cpath%20fill%3D%22%23ff5c16%22%20d%3D%22m24.024%2023.824-4.846-1.434-3.655%202.172-2.55-.001-3.656-2.171-4.844%201.434L3%2018.88l1.473-5.488L3%208.751%204.473%203l7.569%204.496h4.413L24.024%203l1.473%205.751-1.473%204.64%201.473%205.488z%22%2F%3E%3Cpath%20fill%3D%22%23ff5c16%22%20d%3D%22m4.474%203%207.57%204.499-.302%203.087zm4.844%2015.881%203.33%202.522-3.33.987zm3.064-4.17-.64-4.123-4.097%202.804h-.002v.001l.013%202.886%201.661-1.567zM24.024%203l-7.57%204.499.3%203.087zM19.18%2018.881l-3.33%202.522%203.33.987zm1.674-5.488v-.002zl-4.097-2.804-.64%204.124h3.064l1.662%201.567z%22%2F%3E%3Cpath%20fill%3D%22%23e34807%22%20d%3D%22m9.317%2022.39-4.844%201.434L3%2018.881h6.317zm3.064-7.68.925%205.962-1.282-3.315-4.37-1.078%201.662-1.568zm6.799%207.68%204.844%201.434%201.473-4.943H19.18zm-3.064-7.68-.925%205.962%201.282-3.315%204.37-1.078-1.663-1.568z%22%2F%3E%3Cpath%20fill%3D%22%23ff8d5d%22%20d%3D%22m3%2018.88%201.473-5.489h3.169l.012%202.887%204.37%201.078%201.282%203.314-.659.73-3.33-2.522H3zm22.497%200-1.473-5.489h-3.17l-.01%202.887-4.371%201.078-1.282%203.314.659.73%203.33-2.522h6.317zM16.455%207.495h-4.413l-.3%203.087%201.565%2010.084h1.884l1.565-10.084z%22%2F%3E%3Cpath%20fill%3D%22%23661800%22%20d%3D%22M4.473%203%203%208.751l1.473%204.64h3.169l4.1-2.805zm6.992%2012.908H10.03l-.781.761%202.776.685-.56-1.447M24.024%203l1.473%205.751-1.473%204.64h-3.17l-4.098-2.805zm-6.99%2012.908h1.437l.782.762-2.78.686.56-1.45zm-1.512%206.687.328-1.193-.66-.73h-1.885l-.659.73.327%201.192%22%2F%3E%3Cpath%20fill%3D%22%23c0c4cd%22%20d%3D%22M15.522%2022.594v1.969h-2.548v-1.969z%22%2F%3E%3Cpath%20fill%3D%22%23e7ebf6%22%20d%3D%22m9.318%2022.388%203.658%202.174v-1.969l-.328-1.192zm9.862%200-3.658%202.174v-1.969l.328-1.192z%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22a%22%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M3%203h22.5v21.563H3z%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E",
|
|
510
|
+
mobileLink: "https://metamask.app.link/wc?uri=",
|
|
511
|
+
downloadUrl: "https://metamask.io/download"
|
|
512
|
+
},
|
|
513
|
+
{
|
|
514
|
+
id: "trust",
|
|
515
|
+
name: "Trust Wallet",
|
|
516
|
+
rdns: "com.trustwallet.app",
|
|
517
|
+
icon: "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20width%3D%2228%22%20height%3D%2228%22%20viewBox%3D%220%200%2028%2028%22%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M0%200h28v28H0z%22%2F%3E%3Cpath%20fill%3D%22%230500FF%22%20d%3D%22M6%207.583%2013.53%205v17.882C8.15%2020.498%206%2015.928%206%2013.345V7.583Z%22%2F%3E%3Cpath%20fill%3D%22url(%23a)%22%20d%3D%22M22%207.583%2013.53%205v17.882c6.05-2.384%208.47-6.954%208.47-9.537V7.583Z%22%2F%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22a%22%20x1%3D%2219.768%22%20x2%3D%2214.072%22%20y1%3D%223.753%22%20y2%3D%2222.853%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20offset%3D%22.02%22%20stop-color%3D%22%2300F%22%2F%3E%3Cstop%20offset%3D%22.08%22%20stop-color%3D%22%230094FF%22%2F%3E%3Cstop%20offset%3D%22.16%22%20stop-color%3D%22%2348FF91%22%2F%3E%3Cstop%20offset%3D%22.42%22%20stop-color%3D%22%230094FF%22%2F%3E%3Cstop%20offset%3D%22.68%22%20stop-color%3D%22%230038FF%22%2F%3E%3Cstop%20offset%3D%22.9%22%20stop-color%3D%22%230500FF%22%2F%3E%3C%2FlinearGradient%3E%3C%2Fdefs%3E%3C%2Fsvg%3E",
|
|
518
|
+
mobileLink: "trust://wc?uri=",
|
|
519
|
+
downloadUrl: "https://trustwallet.com/download"
|
|
520
|
+
},
|
|
521
|
+
{
|
|
522
|
+
id: "coinbase",
|
|
523
|
+
name: "Coinbase Wallet",
|
|
524
|
+
rdns: "com.coinbase.wallet",
|
|
525
|
+
icon: "data:image/svg+xml,%3Csvg%20width%3D%2228%22%20height%3D%2228%22%20viewBox%3D%220%200%2028%2028%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20width%3D%2228%22%20height%3D%2228%22%20fill%3D%22%232C5FF6%22%2F%3E%0A%3Cpath%20fill-rule%3D%22evenodd%22%20clip-rule%3D%22evenodd%22%20d%3D%22M14%2023.8C19.4124%2023.8%2023.8%2019.4124%2023.8%2014C23.8%208.58761%2019.4124%204.2%2014%204.2C8.58761%204.2%204.2%208.58761%204.2%2014C4.2%2019.4124%208.58761%2023.8%2014%2023.8ZM11.55%2010.8C11.1358%2010.8%2010.8%2011.1358%2010.8%2011.55V16.45C10.8%2016.8642%2011.1358%2017.2%2011.55%2017.2H16.45C16.8642%2017.2%2017.2%2016.8642%2017.2%2016.45V11.55C17.2%2011.1358%2016.8642%2010.8%2016.45%2010.8H11.55Z%22%20fill%3D%22white%22%2F%3E%0A%3C%2Fsvg%3E",
|
|
526
|
+
downloadUrl: "https://coinbase.com/wallet/downloads"
|
|
527
|
+
},
|
|
528
|
+
{
|
|
529
|
+
id: "rainbow",
|
|
530
|
+
name: "Rainbow",
|
|
531
|
+
rdns: "me.rainbow",
|
|
532
|
+
icon: "data:image/svg+xml,%3Csvg%20width%3D%22120%22%20height%3D%22120%22%20viewBox%3D%220%200%20120%20120%22%20fill%3D%22none%22%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%3E%0A%3Crect%20width%3D%22120%22%20height%3D%22120%22%20fill%3D%22url(%23paint0_linear_62_329)%22%2F%3E%0A%3Cpath%20d%3D%22M20%2038H26C56.9279%2038%2082%2063.0721%2082%2094V100H94C97.3137%20100%20100%2097.3137%20100%2094C100%2053.1309%2066.8691%2020%2026%2020C22.6863%2020%2020%2022.6863%2020%2026V38Z%22%20fill%3D%22url(%23paint1_radial_62_329)%22%2F%3E%0A%3Cpath%20d%3D%22M84%2094H100C100%2097.3137%2097.3137%20100%2094%20100H84V94Z%22%20fill%3D%22url(%23paint2_linear_62_329)%22%2F%3E%0A%3Cpath%20d%3D%22M26%2020L26%2036H20L20%2026C20%2022.6863%2022.6863%2020%2026%2020Z%22%20fill%3D%22url(%23paint3_linear_62_329)%22%2F%3E%0A%3Cpath%20d%3D%22M20%2036H26C58.0325%2036%2084%2061.9675%2084%2094V100H66V94C66%2071.9086%2048.0914%2054%2026%2054H20V36Z%22%20fill%3D%22url(%23paint4_radial_62_329)%22%2F%3E%0A%3Cpath%20d%3D%22M68%2094H84V100H68V94Z%22%20fill%3D%22url(%23paint5_linear_62_329)%22%2F%3E%0A%3Cpath%20d%3D%22M20%2052L20%2036L26%2036L26%2052H20Z%22%20fill%3D%22url(%23paint6_linear_62_329)%22%2F%3E%0A%3Cpath%20d%3D%22M20%2062C20%2065.3137%2022.6863%2068%2026%2068C40.3594%2068%2052%2079.6406%2052%2094C52%2097.3137%2054.6863%20100%2058%20100H68V94C68%2070.804%2049.196%2052%2026%2052H20V62Z%22%20fill%3D%22url(%23paint7_radial_62_329)%22%2F%3E%0A%3Cpath%20d%3D%22M52%2094H68V100H58C54.6863%20100%2052%2097.3137%2052%2094Z%22%20fill%3D%22url(%23paint8_radial_62_329)%22%2F%3E%0A%3Cpath%20d%3D%22M26%2068C22.6863%2068%2020%2065.3137%2020%2062L20%2052L26%2052L26%2068Z%22%20fill%3D%22url(%23paint9_radial_62_329)%22%2F%3E%0A%3Cdefs%3E%0A%3ClinearGradient%20id%3D%22paint0_linear_62_329%22%20x1%3D%2260%22%20y1%3D%220%22%20x2%3D%2260%22%20y2%3D%22120%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%0A%3Cstop%20stop-color%3D%22%23174299%22%2F%3E%0A%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23001E59%22%2F%3E%0A%3C%2FlinearGradient%3E%0A%3CradialGradient%20id%3D%22paint1_radial_62_329%22%20cx%3D%220%22%20cy%3D%220%22%20r%3D%221%22%20gradientUnits%3D%22userSpaceOnUse%22%20gradientTransform%3D%22translate(26%2094)%20rotate(-90)%20scale(74)%22%3E%0A%3Cstop%20offset%3D%220.770277%22%20stop-color%3D%22%23FF4000%22%2F%3E%0A%3Cstop%20offset%3D%221%22%20stop-color%3D%22%238754C9%22%2F%3E%0A%3C%2FradialGradient%3E%0A%3ClinearGradient%20id%3D%22paint2_linear_62_329%22%20x1%3D%2283%22%20y1%3D%2297%22%20x2%3D%22100%22%20y2%3D%2297%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%0A%3Cstop%20stop-color%3D%22%23FF4000%22%2F%3E%0A%3Cstop%20offset%3D%221%22%20stop-color%3D%22%238754C9%22%2F%3E%0A%3C%2FlinearGradient%3E%0A%3ClinearGradient%20id%3D%22paint3_linear_62_329%22%20x1%3D%2223%22%20y1%3D%2220%22%20x2%3D%2223%22%20y2%3D%2237%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%0A%3Cstop%20stop-color%3D%22%238754C9%22%2F%3E%0A%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23FF4000%22%2F%3E%0A%3C%2FlinearGradient%3E%0A%3CradialGradient%20id%3D%22paint4_radial_62_329%22%20cx%3D%220%22%20cy%3D%220%22%20r%3D%221%22%20gradientUnits%3D%22userSpaceOnUse%22%20gradientTransform%3D%22translate(26%2094)%20rotate(-90)%20scale(58)%22%3E%0A%3Cstop%20offset%3D%220.723929%22%20stop-color%3D%22%23FFF700%22%2F%3E%0A%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23FF9901%22%2F%3E%0A%3C%2FradialGradient%3E%0A%3ClinearGradient%20id%3D%22paint5_linear_62_329%22%20x1%3D%2268%22%20y1%3D%2297%22%20x2%3D%2284%22%20y2%3D%2297%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%0A%3Cstop%20stop-color%3D%22%23FFF700%22%2F%3E%0A%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23FF9901%22%2F%3E%0A%3C%2FlinearGradient%3E%0A%3ClinearGradient%20id%3D%22paint6_linear_62_329%22%20x1%3D%2223%22%20y1%3D%2252%22%20x2%3D%2223%22%20y2%3D%2236%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%0A%3Cstop%20stop-color%3D%22%23FFF700%22%2F%3E%0A%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23FF9901%22%2F%3E%0A%3C%2FlinearGradient%3E%0A%3CradialGradient%20id%3D%22paint7_radial_62_329%22%20cx%3D%220%22%20cy%3D%220%22%20r%3D%221%22%20gradientUnits%3D%22userSpaceOnUse%22%20gradientTransform%3D%22translate(26%2094)%20rotate(-90)%20scale(42)%22%3E%0A%3Cstop%20offset%3D%220.59513%22%20stop-color%3D%22%2300AAFF%22%2F%3E%0A%3Cstop%20offset%3D%221%22%20stop-color%3D%22%2301DA40%22%2F%3E%0A%3C%2FradialGradient%3E%0A%3CradialGradient%20id%3D%22paint8_radial_62_329%22%20cx%3D%220%22%20cy%3D%220%22%20r%3D%221%22%20gradientUnits%3D%22userSpaceOnUse%22%20gradientTransform%3D%22translate(51%2097)%20scale(17%2045.3333)%22%3E%0A%3Cstop%20stop-color%3D%22%2300AAFF%22%2F%3E%0A%3Cstop%20offset%3D%221%22%20stop-color%3D%22%2301DA40%22%2F%3E%0A%3C%2FradialGradient%3E%0A%3CradialGradient%20id%3D%22paint9_radial_62_329%22%20cx%3D%220%22%20cy%3D%220%22%20r%3D%221%22%20gradientUnits%3D%22userSpaceOnUse%22%20gradientTransform%3D%22translate(23%2069)%20rotate(-90)%20scale(17%20322.37)%22%3E%0A%3Cstop%20stop-color%3D%22%2300AAFF%22%2F%3E%0A%3Cstop%20offset%3D%221%22%20stop-color%3D%22%2301DA40%22%2F%3E%0A%3C%2FradialGradient%3E%0A%3C%2Fdefs%3E%0A%3C%2Fsvg%3E",
|
|
533
|
+
mobileLink: "rainbow://wc?uri=",
|
|
534
|
+
downloadUrl: "https://rainbow.download"
|
|
535
|
+
},
|
|
536
|
+
{
|
|
537
|
+
id: "rabby",
|
|
538
|
+
name: "Rabby Wallet",
|
|
539
|
+
rdns: "io.rabby",
|
|
540
|
+
icon: "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2028%2028%22%3E%3Cg%20clip-path%3D%22url(%23a)%22%3E%3Cpath%20fill%3D%22%238697FF%22%20d%3D%22M28%200H0v28h28V0Z%22%2F%3E%3Cpath%20fill%3D%22url(%23b)%22%20d%3D%22M22.54%2015.078c.677-1.514-2.673-5.744-5.874-7.506-2.017-1.365-4.12-1.178-4.545-.579-.935%201.316%203.094%202.43%205.788%203.731-.58.252-1.125.703-1.446%201.28-1.004-1.096-3.209-2.04-5.796-1.28-1.743.513-3.191%201.721-3.751%203.546a1.097%201.097%200%201%200-.445%202.1c.112%200%20.463-.075.463-.075l5.612.041c-2.244%203.56-4.018%204.081-4.018%204.698s1.697.45%202.335.22c3.05-1.1%206.327-4.531%206.89-5.519%202.36.295%204.345.33%204.786-.657Z%22%2F%3E%3Cpath%20fill%3D%22url(%23c)%22%20fill-rule%3D%22evenodd%22%20d%3D%22m17.885%2010.713.025.01c.125-.049.105-.233.07-.378-.078-.333-1.438-1.676-2.715-2.277-1.743-.82-3.025-.777-3.212-.398.356.726%201.998%201.408%203.714%202.12.723.3%201.46.606%202.118.923Z%22%20clip-rule%3D%22evenodd%22%2F%3E%3Cpath%20fill%3D%22url(%23d)%22%20fill-rule%3D%22evenodd%22%20d%3D%22M15.701%2018.036a10.296%2010.296%200%200%200-1.2-.37c.482-.862.583-2.138.128-2.945-.639-1.133-1.44-1.736-3.304-1.736-1.024%200-3.783.346-3.832%202.648-.005.242%200%20.464.017.667l5.036.037a17.264%2017.264%200%200%201-1.871%202.483c.669.172%201.221.316%201.728.448.48.125.92.24%201.38.357a21.003%2021.003%200%200%200%201.918-1.59Z%22%20clip-rule%3D%22evenodd%22%2F%3E%3Cpath%20fill%3D%22url(%23e)%22%20d%3D%22M6.848%2016.063c.206%201.75%201.2%202.435%203.232%202.638%202.032.203%203.197.067%204.749.208%201.296.118%202.453.778%202.882.55.386-.205.17-.947-.347-1.423-.67-.617-1.597-1.046-3.229-1.199.325-.89.234-2.138-.27-2.817-.731-.982-2.079-1.426-3.785-1.232-1.782.202-3.49%201.08-3.232%203.275Z%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3ClinearGradient%20id%3D%22b%22%20x1%3D%2210.464%22%20x2%3D%2222.394%22%20y1%3D%2213.737%22%20y2%3D%2217.12%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23fff%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23fff%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22c%22%20x1%3D%2220.386%22%20x2%3D%2211.779%22%20y1%3D%2213.509%22%20y2%3D%224.879%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%237258DC%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23797DEA%22%20stop-opacity%3D%220%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22d%22%20x1%3D%2215.94%22%20x2%3D%227.673%22%20y1%3D%2218.337%22%20y2%3D%2213.584%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%237461EA%22%2F%3E%3Cstop%20offset%3D%221%22%20stop-color%3D%22%23BFC2FF%22%20stop-opacity%3D%220%22%2F%3E%3C%2FlinearGradient%3E%3ClinearGradient%20id%3D%22e%22%20x1%3D%2211.177%22%20x2%3D%2216.765%22%20y1%3D%2213.648%22%20y2%3D%2220.749%22%20gradientUnits%3D%22userSpaceOnUse%22%3E%3Cstop%20stop-color%3D%22%23fff%22%2F%3E%3Cstop%20offset%3D%22.984%22%20stop-color%3D%22%23D5CEFF%22%2F%3E%3C%2FlinearGradient%3E%3CclipPath%20id%3D%22a%22%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M0%200h28v28H0z%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E",
|
|
541
|
+
downloadUrl: "https://rabby.io"
|
|
542
|
+
},
|
|
543
|
+
{
|
|
544
|
+
id: "okx",
|
|
545
|
+
name: "OKX Wallet",
|
|
546
|
+
rdns: "com.okex.wallet",
|
|
547
|
+
icon: "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2028%2028%22%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M0%200h28v28H0z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20fill-rule%3D%22evenodd%22%20d%3D%22M10.819%205.556H5.93a.376.376%200%200%200-.375.375v4.888c0%20.207.168.375.375.375h4.888a.376.376%200%200%200%20.375-.376V5.932a.376.376%200%200%200-.376-.375Zm5.64%205.638h-4.886a.376.376%200%200%200-.376.376v4.887c0%20.208.168.376.376.376h4.887a.376.376%200%200%200%20.376-.375V11.57a.376.376%200%200%200-.376-.377Zm.75-5.638h4.887c.208%200%20.376.168.376.375v4.888a.376.376%200%200%201-.376.375H17.21a.376.376%200%200%201-.376-.376V5.933c0-.208.169-.376.376-.376Zm-6.39%2011.277H5.93a.376.376%200%200%200-.375.376v4.887c0%20.208.168.376.375.376h4.888a.376.376%200%200%200%20.375-.376V17.21a.376.376%200%200%200-.376-.376Zm6.39%200h4.887c.208%200%20.376.169.376.376v4.887a.376.376%200%200%201-.376.376H17.21a.376.376%200%200%201-.376-.376V17.21c0-.207.169-.376.376-.376Z%22%20clip-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E",
|
|
548
|
+
mobileLink: "okex://main/wc?uri=",
|
|
549
|
+
downloadUrl: "https://okx.com/download"
|
|
550
|
+
},
|
|
551
|
+
{
|
|
552
|
+
id: "zerion",
|
|
553
|
+
name: "Zerion",
|
|
554
|
+
rdns: "io.zerion.wallet",
|
|
555
|
+
icon: "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20fill%3D%22none%22%20viewBox%3D%220%200%2028%2028%22%3E%3Cpath%20fill%3D%22%232962EF%22%20d%3D%22M0%200h28v28H0z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M6.073%207c-.48%200-.665.593-.262.841l10.073%206.074a.577.577%200%200%200%20.758-.139l4.43-5.814c.3-.404-.004-.962-.525-.962H6.073ZM21.904%2021c.48%200%20.67-.596.267-.844l-10.075-6.073a.569.569%200%200%200-.751.146l-4.437%205.813c-.301.404.012.958.534.958h14.462Z%22%2F%3E%3C%2Fsvg%3E",
|
|
556
|
+
mobileLink: "zerion://wc?uri=",
|
|
557
|
+
downloadUrl: "https://zerion.io"
|
|
558
|
+
},
|
|
559
|
+
{
|
|
560
|
+
id: "uniswap",
|
|
561
|
+
name: "Uniswap",
|
|
562
|
+
rdns: "org.uniswap.app",
|
|
563
|
+
icon: "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2228%22%20height%3D%2228%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23FFD8EA%22%20d%3D%22M0%200h28v28H0z%22%2F%3E%3Cg%20fill%3D%22%23FF007A%22%20clip-path%3D%22url(%23a)%22%3E%3Cpath%20d%3D%22M9.635%206.068c-.255-.039-.266-.043-.145-.06.23-.035.773.012%201.148.099.874.202%201.67.722%202.519%201.646l.225.246.323-.051c1.36-.213%202.741-.044%203.899.477.319.144.821.43.882.503.022.024.058.173.082.335.086.557.044.982-.13%201.301-.096.173-.101.228-.037.377a.367.367%200%200%200%20.334.206c.287%200%20.597-.454.74-1.086l.056-.252.113.126c.62.685%201.106%201.618%201.189%202.282l.021.174-.103-.158a1.966%201.966%200%200%200-.59-.604c-.415-.268-.855-.36-2.017-.42-1.05-.053-1.645-.141-2.234-.329-1.003-.32-1.508-.744-2.699-2.27-.53-.678-.855-1.053-1.18-1.354-.74-.687-1.466-1.047-2.396-1.187v-.001Z%22%2F%3E%3Cpath%20d%3D%22M18.725%207.581c.026-.453.088-.753.216-1.026.028-.07.063-.136.104-.198a.69.69%200%200%201-.049.178c-.092.266-.108.629-.043%201.052.081.536.126.613.706%201.192.273.272.589.613.704.761l.21.267-.21-.191c-.255-.233-.841-.69-.972-.755-.086-.042-.1-.042-.153.01-.05.048-.06.12-.068.461-.01.532-.084.873-.263%201.213-.096.187-.111.147-.025-.062.066-.155.072-.224.072-.739%200-1.033-.127-1.283-.864-1.707a8.169%208.169%200%200%200-.684-.346%202.614%202.614%200%200%201-.334-.16c.02-.02.74.185%201.029.293.431.163.502.183.555.164.034-.013.051-.113.068-.407h.001Zm-8.595%201.77c-.517-.696-.838-1.764-.768-2.563l.02-.247.119.02c.222.04.603.179.783.286.49.29.703.673.918%201.657.064.288.147.613.185.725.061.178.294.592.483.862.136.194.046.286-.255.26-.46-.04-1.083-.46-1.485-1Zm7.965%205.182c-2.42-.95-3.273-1.777-3.273-3.17%200-.206.007-.374.016-.374.008%200%20.102.067.208.151.491.384%201.04.548%202.563.765.896.128%201.398.231%201.864.382%201.48.478%202.392%201.449%202.61%202.773.063.384.028%201.104-.076%201.484-.082.3-.329.84-.394.861-.019.007-.037-.061-.04-.154-.025-.496-.283-.98-.715-1.343-.49-.412-1.15-.741-2.763-1.375Zm-1.699.396a4.13%204.13%200%200%200-.117-.5l-.062-.18.115.127c.16.173.285.396.391.693.082.227.09.294.09.662%200%20.361-.011.437-.087.64-.104.3-.28.572-.51.794-.443.44-1.011.683-1.833.784-.142.018-.557.047-.922.066-.922.046-1.529.144-2.073.33a.446.446%200%200%201-.156.036c-.021-.021.35-.237.656-.381.431-.204.861-.315%201.825-.47.475-.078.968-.173%201.093-.21%201.178-.352%201.784-1.263%201.59-2.39Z%22%2F%3E%3Cpath%20d%3D%22M17.506%2016.855c-.321-.675-.396-1.327-.22-1.935.02-.067.05-.119.068-.119a.64.64%200%200%201%20.169.09c.149.097.445.261%201.237.682.988.527%201.553.934%201.936%201.4.335.407.542.872.643%201.438.057.32.023%201.093-.061%201.416-.266%201.018-.882%201.818-1.764%202.285a2.129%202.129%200%200%201-.258.124c-.013%200%20.035-.116.104-.259.297-.605.331-1.193.107-1.848-.138-.401-.418-.89-.982-1.718-.657-.96-.817-1.218-.979-1.556Zm-9.095%203.644c.9-.742%202.016-1.267%203.036-1.43a4.85%204.85%200%200%201%201.575.06c.652.163%201.235.528%201.538.962.296.425.423.794.556%201.618.052.324.109.651.125.724.1.427.293.768.532.939.38.272%201.037.29%201.682.044a.853.853%200%200%201%20.21-.064c.023.023-.301.235-.53.347-.27.141-.572.213-.879.208-.59%200-1.08-.294-1.49-.891a7.027%207.027%200%200%201-.402-.784c-.431-.961-.644-1.253-1.145-1.575-.437-.28-1-.329-1.424-.126-.556.266-.71.96-.312%201.4.187.189.43.313.695.354a.75.75%200%200%200%20.589-.174.728.728%200%200%200%20.251-.551c0-.29-.114-.453-.4-.581-.392-.172-.812.029-.81.388%200%20.153.069.249.226.32.1.044.103.046.02.03-.358-.073-.442-.496-.154-.776.347-.336%201.064-.188%201.31.272.103.194.115.578.025.81-.203.52-.79.793-1.387.644-.407-.102-.571-.211-1.06-.703-.852-.856-1.182-1.023-2.408-1.21l-.237-.035.268-.22Z%22%2F%3E%3Cpath%20fill-rule%3D%22evenodd%22%20d%3D%22M4.418%205.179c2.842%203.368%204.8%204.757%205.017%205.05.18.243.112.462-.195.632a1.899%201.899%200%200%201-.699.191c-.2%200-.269-.075-.269-.075-.115-.106-.18-.088-.773-1.116A176.911%20176.911%200%200%200%205.968%207.56c-.044-.04-.042-.04%201.448%202.564.24.543.047.741.047.819%200%20.157-.044.24-.242.457-.332.36-.48.765-.587%201.604-.12.94-.456%201.604-1.39%202.741-.545.666-.635.787-.773%201.056-.174.338-.221.527-.24.952a2.9%202.9%200%200%200%20.16%201.174c.122.378.252.626.582%201.125.285.43.448.75.448.876%200%20.099.019.099.461.001%201.054-.232%201.91-.64%202.392-1.142.298-.311.367-.482.37-.907.002-.277-.008-.336-.085-.496-.125-.26-.353-.477-.855-.813-.66-.44-.942-.794-1.018-1.28-.065-.4.01-.682.373-1.427.377-.773.47-1.103.535-1.88.04-.503.096-.701.244-.861.155-.166.293-.222.676-.272.623-.084%201.018-.24%201.343-.534a1.14%201.14%200%200%200%20.421-.869l.014-.28-.16-.179C9.563%209.34%204.036%204.667%204%204.667c-.007%200%20.18.23.418.512Zm1.325%2013.086a.486.486%200%200%200-.157-.652c-.203-.133-.522-.069-.522.103%200%20.053.03.092.098.125.114.058.122.122.032.254s-.082.248.02.328c.168.126.404.057.529-.158ZM10.683%2012c-.29.086-.575.389-.664.706-.053.194-.022.534.058.638.13.169.255.213.596.212.665-.004%201.243-.283%201.311-.632.054-.286-.2-.68-.55-.855a1.33%201.33%200%200%200-.75-.07Zm.78.593c.102-.143.057-.296-.118-.4-.331-.199-.835-.035-.835.272%200%20.153.262.32.502.32.16%200%20.38-.093.45-.192Z%22%20clip-rule%3D%22evenodd%22%2F%3E%3C%2Fg%3E%3Cdefs%3E%3CclipPath%20id%3D%22a%22%3E%3Cpath%20fill%3D%22%23fff%22%20d%3D%22M4%204h19v20H4z%22%2F%3E%3C%2FclipPath%3E%3C%2Fdefs%3E%3C%2Fsvg%3E",
|
|
564
|
+
mobileLink: "uniswap://wc?uri=",
|
|
565
|
+
downloadUrl: "https://wallet.uniswap.org"
|
|
566
|
+
},
|
|
567
|
+
{
|
|
568
|
+
id: "ledger",
|
|
569
|
+
name: "Ledger",
|
|
570
|
+
icon: "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%2228%22%20height%3D%2228%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M0%200h28v28H0z%22%2F%3E%3Cpath%20fill%3D%22%23fff%22%20fill-rule%3D%22evenodd%22%20d%3D%22M11.65%204.4H4.4V9h1.1V5.5l6.15-.04V4.4Zm.05%205.95v7.25h4.6v-1.1h-3.5l-.04-6.15H11.7ZM4.4%2023.6h7.25v-1.06L5.5%2022.5V19H4.4v4.6ZM16.35%204.4h7.25V9h-1.1V5.5l-6.15-.04V4.4Zm7.25%2019.2h-7.25v-1.06l6.15-.04V19h1.1v4.6Z%22%20clip-rule%3D%22evenodd%22%2F%3E%3C%2Fsvg%3E",
|
|
571
|
+
mobileLink: "ledgerlive://wc?uri=",
|
|
572
|
+
downloadUrl: "https://www.ledger.com/ledger-live"
|
|
573
|
+
},
|
|
574
|
+
{
|
|
575
|
+
id: "binance",
|
|
576
|
+
name: "Binance Wallet",
|
|
577
|
+
rdns: "com.binance.wallet",
|
|
578
|
+
icon: "data:image/svg+xml,%3Csvg%20xmlns%3D%22http%3A%2F%2Fwww.w3.org%2F2000%2Fsvg%22%20width%3D%22130%22%20height%3D%22130%22%20fill%3D%22none%22%3E%3Cpath%20fill%3D%22%23000%22%20d%3D%22M0%200h130v130H0z%22%2F%3E%3Cpath%20fill%3D%22%23F3BA2F%22%20d%3D%22M45.587%2057.02%2065.01%2037.606l19.43%2019.43%2011.295-11.303L65.01%2015%2034.284%2045.725zM15%2065.004l11.299-11.299%2011.298%2011.299L26.3%2076.302zM45.587%2072.983%2065.01%2092.406l19.43-19.43%2011.303%2011.287-.008.007-30.725%2030.734-30.725-30.718-.016-.016zM92.403%2065.006%20103.7%2053.708%20115%2065.006l-11.299%2011.299z%22%2F%3E%3Cpath%20fill%3D%22%23F3BA2F%22%20d%3D%22m76.471%2064.998-11.46-11.469-8.476%208.475-.98.972-2.005%202.006-.016.016.016.024%2011.46%2011.453%2011.461-11.47.008-.007z%22%2F%3E%3C%2Fsvg%3E",
|
|
579
|
+
mobileLink: "bnc://app.binance.com/cedefi/wc?uri=",
|
|
580
|
+
downloadUrl: "https://www.binance.com/en/download"
|
|
581
|
+
}
|
|
582
|
+
], k = $2;
|
|
583
|
+
function K2({
|
|
584
|
+
excludeWalletIds: e = [],
|
|
585
|
+
maxWallets: n = 4
|
|
586
|
+
}) {
|
|
587
|
+
const { goToStep: a } = F(), { authPending: r, guardAgreement: i, setError: o, registeredWallets: s } = _(), c = Z(), { mutate: f, isPending: m } = G();
|
|
588
|
+
L(m);
|
|
589
|
+
const g = c.filter(
|
|
590
|
+
(u) => u.type === "injected" && u.id !== "injected" && u.id !== "zerodev-wallet"
|
|
591
|
+
).map((u) => {
|
|
592
|
+
const l = k.find((h) => H(u, h));
|
|
593
|
+
return {
|
|
594
|
+
connector: u,
|
|
595
|
+
walletId: l == null ? void 0 : l.id,
|
|
596
|
+
name: (l == null ? void 0 : l.name) ?? u.name,
|
|
597
|
+
icon: (l == null ? void 0 : l.icon) ?? u.icon,
|
|
598
|
+
ids: l ? [l.id, u.id] : [u.id],
|
|
599
|
+
rank: l ? k.indexOf(l) : k.length
|
|
600
|
+
};
|
|
601
|
+
}).filter(
|
|
602
|
+
(u) => !(u.walletId && s.includes(u.walletId))
|
|
603
|
+
).filter((u) => !u.ids.some((l) => e.includes(l))).sort((u, l) => u.rank - l.rank).slice(0, n), w = (u) => {
|
|
604
|
+
r || i() && (o(null), f(
|
|
605
|
+
{ connector: u },
|
|
606
|
+
{
|
|
607
|
+
// The external wallet is now the active wagmi connection — the
|
|
608
|
+
// embedded-wallet flow is done, so close it (mirrors SignUp.Wallet).
|
|
609
|
+
onSuccess: () => a(null),
|
|
610
|
+
onError: (l) => {
|
|
611
|
+
I(l) || o(l instanceof Error ? l.message : String(l));
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
));
|
|
615
|
+
};
|
|
616
|
+
return /* @__PURE__ */ t(v, { children: g.map(({ connector: u, name: l, icon: h }) => /* @__PURE__ */ t(
|
|
617
|
+
T,
|
|
618
|
+
{
|
|
619
|
+
title: l,
|
|
620
|
+
icon: h ? /* @__PURE__ */ t("img", { src: h, alt: "", className: "zd:w-6 zd:h-6" }) : null,
|
|
621
|
+
subtitle: /* @__PURE__ */ t(K, { text: "INSTALLED" }),
|
|
622
|
+
trailing: /* @__PURE__ */ t(P, {}),
|
|
623
|
+
disabled: r,
|
|
624
|
+
onClick: () => w(u)
|
|
625
|
+
},
|
|
626
|
+
u.uid
|
|
627
|
+
)) });
|
|
628
|
+
}
|
|
629
|
+
function X2({ tile: e }) {
|
|
630
|
+
return /* @__PURE__ */ p(
|
|
631
|
+
"button",
|
|
632
|
+
{
|
|
633
|
+
type: "button",
|
|
634
|
+
onClick: e.onSelect,
|
|
635
|
+
className: "zd:flex zd:flex-col zd:items-center zd:gap-1.5 zd:cursor-pointer",
|
|
636
|
+
children: [
|
|
637
|
+
/* @__PURE__ */ t("div", { className: "zd:w-16 zd:h-16 zd:rounded-2xl zd:bg-greyScale/5 zd:flex zd:items-center zd:justify-center", children: e.icon ? /* @__PURE__ */ t("img", { src: e.icon, alt: "", className: "zd:w-8 zd:h-8" }) : /* @__PURE__ */ t(
|
|
638
|
+
q,
|
|
639
|
+
{
|
|
640
|
+
name: "walletOutline",
|
|
641
|
+
className: "zd:w-8 zd:h-8 zd:text-greyScale"
|
|
642
|
+
}
|
|
643
|
+
) }),
|
|
644
|
+
/* @__PURE__ */ t(z, { className: "zd:text-body3 zd:max-w-full zd:truncate", children: e.name })
|
|
645
|
+
]
|
|
646
|
+
}
|
|
647
|
+
);
|
|
648
|
+
}
|
|
649
|
+
function J2({
|
|
650
|
+
open: e,
|
|
651
|
+
onOpenChange: n,
|
|
652
|
+
tiles: a
|
|
653
|
+
}) {
|
|
654
|
+
return /* @__PURE__ */ t(s2, { open: e, onOpenChange: n, children: /* @__PURE__ */ p(l2, { className: "zd:p-4", children: [
|
|
655
|
+
/* @__PURE__ */ t(d2, { children: "All wallets" }),
|
|
656
|
+
/* @__PURE__ */ p("div", { className: "zd:mb-3 zd:flex zd:items-center zd:gap-2", children: [
|
|
657
|
+
/* @__PURE__ */ t(z, { className: "zd:text-h3 zd:flex-1", children: "All wallets" }),
|
|
658
|
+
/* @__PURE__ */ t(c2, { asChild: !0, children: /* @__PURE__ */ t(
|
|
659
|
+
"button",
|
|
660
|
+
{
|
|
661
|
+
type: "button",
|
|
662
|
+
"aria-label": "Close",
|
|
663
|
+
className: "zd:cursor-pointer zd:px-2 zd:text-greyScale/60",
|
|
664
|
+
children: "✕"
|
|
665
|
+
}
|
|
666
|
+
) })
|
|
667
|
+
] }),
|
|
668
|
+
/* @__PURE__ */ t("div", { className: "zd:grid zd:grid-cols-3 zd:gap-3 zd:max-h-80 zd:overflow-y-auto", children: a.map((r) => /* @__PURE__ */ t(X2, { tile: r }, r.key)) })
|
|
669
|
+
] }) });
|
|
670
|
+
}
|
|
671
|
+
function Y2({
|
|
672
|
+
title: e = "More wallets"
|
|
673
|
+
}) {
|
|
674
|
+
const { goToStep: n } = F(), { authPending: a, guardAgreement: r, setError: i } = _(), [o, s] = E(!1), c = Z(), { mutate: f, isPending: m } = G();
|
|
675
|
+
L(m);
|
|
676
|
+
const g = c.filter(
|
|
677
|
+
(d) => d.id !== "zerodev-wallet" && d.type !== "walletConnect"
|
|
678
|
+
), w = (d) => {
|
|
679
|
+
a || r() && (s(!1), i(null), f(
|
|
680
|
+
{ connector: d },
|
|
681
|
+
{
|
|
682
|
+
// The external wallet is now the active wagmi connection — the
|
|
683
|
+
// embedded-wallet flow is done, so close it.
|
|
684
|
+
onSuccess: () => n(null),
|
|
685
|
+
onError: (D) => {
|
|
686
|
+
I(D) || i(D instanceof Error ? D.message : String(D));
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
));
|
|
690
|
+
}, u = k.map((d) => {
|
|
691
|
+
const D = g.find((C) => H(C, d));
|
|
692
|
+
return {
|
|
693
|
+
key: d.id,
|
|
694
|
+
name: d.name,
|
|
695
|
+
icon: d.icon,
|
|
696
|
+
onSelect: () => {
|
|
697
|
+
if (D) {
|
|
698
|
+
w(D);
|
|
699
|
+
return;
|
|
700
|
+
}
|
|
701
|
+
s(!1), window.open(d.downloadUrl, "_blank", "noopener,noreferrer");
|
|
702
|
+
}
|
|
703
|
+
};
|
|
704
|
+
}), l = g.filter((d) => !k.some((D) => H(d, D))).map((d) => ({
|
|
705
|
+
key: d.uid,
|
|
706
|
+
name: d.name,
|
|
707
|
+
icon: d.icon,
|
|
708
|
+
onSelect: () => w(d)
|
|
709
|
+
}));
|
|
710
|
+
return /* @__PURE__ */ p(v, { children: [
|
|
711
|
+
/* @__PURE__ */ t(
|
|
712
|
+
T,
|
|
713
|
+
{
|
|
714
|
+
icon: /* @__PURE__ */ t($, { name: "walletOutline", className: "zd:w-5 zd:h-5" }),
|
|
715
|
+
title: e,
|
|
716
|
+
trailing: /* @__PURE__ */ t(P, {}),
|
|
717
|
+
disabled: a,
|
|
718
|
+
onClick: () => {
|
|
719
|
+
a || r() && s(!0);
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
),
|
|
723
|
+
/* @__PURE__ */ t(
|
|
724
|
+
J2,
|
|
725
|
+
{
|
|
726
|
+
open: o,
|
|
727
|
+
onOpenChange: s,
|
|
728
|
+
tiles: [...u, ...l]
|
|
729
|
+
}
|
|
730
|
+
)
|
|
731
|
+
] });
|
|
732
|
+
}
|
|
733
|
+
function n2() {
|
|
734
|
+
const { goToStep: e } = F(), { authPending: n, guardAgreement: a, setError: r } = _(), i = {
|
|
503
735
|
onSuccess: () => {
|
|
504
736
|
e("authenticated");
|
|
505
737
|
},
|
|
506
|
-
onError: (
|
|
507
|
-
|
|
738
|
+
onError: (g) => {
|
|
739
|
+
I(g) || r(g instanceof Error ? g.message : String(g));
|
|
508
740
|
}
|
|
509
|
-
}, { mutate:
|
|
510
|
-
mutation:
|
|
741
|
+
}, { mutate: o, isPending: s } = F2({ mutation: i }), { mutate: c, isPending: f } = x2({
|
|
742
|
+
mutation: i
|
|
511
743
|
});
|
|
512
|
-
|
|
513
|
-
const
|
|
514
|
-
|
|
744
|
+
L(s || f);
|
|
745
|
+
const m = (g) => () => {
|
|
746
|
+
n || a() && (r(null), g());
|
|
515
747
|
};
|
|
516
|
-
return /* @__PURE__ */
|
|
748
|
+
return /* @__PURE__ */ p(v, { children: [
|
|
517
749
|
/* @__PURE__ */ t(
|
|
518
|
-
|
|
750
|
+
S,
|
|
519
751
|
{
|
|
520
752
|
action: "secondary",
|
|
521
753
|
text: "Create a passkey",
|
|
522
754
|
iconName: "key",
|
|
523
755
|
trailIcon: !0,
|
|
524
|
-
disabled:
|
|
525
|
-
onClick:
|
|
756
|
+
disabled: n,
|
|
757
|
+
onClick: m(() => o())
|
|
526
758
|
}
|
|
527
759
|
),
|
|
528
760
|
/* @__PURE__ */ t(
|
|
529
|
-
|
|
761
|
+
S,
|
|
530
762
|
{
|
|
531
763
|
action: "secondary",
|
|
532
764
|
text: "Log in with passkey",
|
|
533
765
|
iconName: "key",
|
|
534
766
|
trailIcon: !0,
|
|
535
|
-
disabled:
|
|
536
|
-
onClick:
|
|
767
|
+
disabled: n,
|
|
768
|
+
onClick: m(() => c())
|
|
537
769
|
}
|
|
538
770
|
)
|
|
539
771
|
] });
|
|
540
772
|
}
|
|
541
|
-
function
|
|
773
|
+
function Q2({ walletId: e }) {
|
|
774
|
+
const n = k.find((h) => h.id === e);
|
|
775
|
+
if (!n)
|
|
776
|
+
throw new Error(
|
|
777
|
+
`Unknown walletId "${e}". Valid ids: ${k.map((h) => h.id).join(", ")}`
|
|
778
|
+
);
|
|
779
|
+
const { goToStep: a } = F(), { authPending: r, guardAgreement: i, setError: o, registerWallet: s } = _(), c = Z(), { mutate: f, isPending: m } = G();
|
|
780
|
+
L(m), g2(() => s(n.id), [s, n.id]);
|
|
781
|
+
const g = c.find((h) => H(h, n)), w = !!n.rdns && c.some((h) => h.id === n.rdns), u = {
|
|
782
|
+
title: n.name,
|
|
783
|
+
icon: /* @__PURE__ */ t("img", { src: n.icon, alt: "", className: "zd:w-6 zd:h-6" }),
|
|
784
|
+
trailing: /* @__PURE__ */ t(P, {})
|
|
785
|
+
};
|
|
786
|
+
return g ? /* @__PURE__ */ t(
|
|
787
|
+
T,
|
|
788
|
+
{
|
|
789
|
+
...u,
|
|
790
|
+
...w && { subtitle: /* @__PURE__ */ t(K, { text: "INSTALLED" }) },
|
|
791
|
+
disabled: r,
|
|
792
|
+
onClick: () => {
|
|
793
|
+
r || i() && (o(null), f(
|
|
794
|
+
{ connector: g },
|
|
795
|
+
{
|
|
796
|
+
// The external wallet is now the active wagmi connection — the
|
|
797
|
+
// embedded-wallet flow is done, so close it (mirrors SignUp.MoreWallets).
|
|
798
|
+
onSuccess: () => a(null),
|
|
799
|
+
onError: (h) => {
|
|
800
|
+
I(h) || o(h instanceof Error ? h.message : String(h));
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
));
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
) : /* @__PURE__ */ t(T, { ...u, asChild: !0, children: /* @__PURE__ */ t(
|
|
807
|
+
"a",
|
|
808
|
+
{
|
|
809
|
+
href: n.downloadUrl,
|
|
810
|
+
target: "_blank",
|
|
811
|
+
rel: "noopener noreferrer"
|
|
812
|
+
}
|
|
813
|
+
) });
|
|
814
|
+
}
|
|
815
|
+
function i2({
|
|
542
816
|
children: e,
|
|
543
|
-
termsAndConditionsUrl:
|
|
544
|
-
privacyPolicyUrl:
|
|
545
|
-
emailAuthMethod:
|
|
817
|
+
termsAndConditionsUrl: n,
|
|
818
|
+
privacyPolicyUrl: a,
|
|
819
|
+
emailAuthMethod: r = "magicLink"
|
|
546
820
|
}) {
|
|
547
|
-
const [
|
|
548
|
-
|
|
549
|
-
|
|
821
|
+
const [i, o] = E(!1), [s, c] = E(!1), [f, m] = E(null), [g, w] = E(!1), [u, l] = E(
|
|
822
|
+
[]
|
|
823
|
+
), h = D2((x) => (l((A) => [...A, x]), () => {
|
|
824
|
+
l((A) => {
|
|
825
|
+
const y = [...A];
|
|
826
|
+
return y.splice(y.indexOf(x), 1), y;
|
|
827
|
+
});
|
|
828
|
+
}), []), D = !!(n || a) && !i, C = () => D ? (c(!0), !1) : !0;
|
|
829
|
+
return /* @__PURE__ */ p(
|
|
830
|
+
Q.Provider,
|
|
550
831
|
{
|
|
551
832
|
value: {
|
|
552
|
-
authPending:
|
|
553
|
-
emailAuthMethod:
|
|
554
|
-
setAuthPending:
|
|
555
|
-
needsAgreement:
|
|
556
|
-
guardAgreement:
|
|
557
|
-
setError:
|
|
833
|
+
authPending: g,
|
|
834
|
+
emailAuthMethod: r,
|
|
835
|
+
setAuthPending: w,
|
|
836
|
+
needsAgreement: D,
|
|
837
|
+
guardAgreement: C,
|
|
838
|
+
setError: m,
|
|
839
|
+
registeredWallets: u,
|
|
840
|
+
registerWallet: h
|
|
558
841
|
},
|
|
559
842
|
children: [
|
|
560
|
-
|
|
561
|
-
/* @__PURE__ */ t(
|
|
562
|
-
/* @__PURE__ */ t(
|
|
843
|
+
f !== null && /* @__PURE__ */ t("div", { className: "zd:flex zd:items-center zd:justify-center zd:h-full zd:min-h-100", children: /* @__PURE__ */ p("div", { className: "zd:flex zd:flex-col zd:gap-4 zd:max-w-md", children: [
|
|
844
|
+
/* @__PURE__ */ t(z, { className: "zd:text-h2 zd:text-center", children: "Error occurred" }),
|
|
845
|
+
/* @__PURE__ */ t(z, { className: "zd:text-center zd:text-red-500", children: f }),
|
|
563
846
|
/* @__PURE__ */ t(
|
|
564
|
-
|
|
847
|
+
S,
|
|
565
848
|
{
|
|
566
849
|
action: "primary",
|
|
567
850
|
text: "Try again",
|
|
568
|
-
onClick: () =>
|
|
851
|
+
onClick: () => m(null)
|
|
569
852
|
}
|
|
570
853
|
)
|
|
571
854
|
] }) }),
|
|
572
|
-
/* @__PURE__ */
|
|
855
|
+
/* @__PURE__ */ p(
|
|
573
856
|
"div",
|
|
574
857
|
{
|
|
575
|
-
className: `zd:flex-1 zd:flex zd:flex-col zd:justify-between zd:pb-4 zd:overflow-y-auto zd:overflow-x-hidden${
|
|
858
|
+
className: `zd:-mx-4 zd:flex-1 zd:flex zd:flex-col zd:justify-between zd:pb-4 zd:overflow-y-auto zd:overflow-x-hidden${f !== null ? " zd:hidden" : ""}`,
|
|
576
859
|
children: [
|
|
577
|
-
/* @__PURE__ */
|
|
578
|
-
/* @__PURE__ */
|
|
579
|
-
/* @__PURE__ */ t("div", { className: "zd:w-full zd:px-16 zd:py-4", children: /* @__PURE__ */ t(
|
|
580
|
-
/* @__PURE__ */ t(
|
|
581
|
-
/* @__PURE__ */ t(
|
|
860
|
+
/* @__PURE__ */ p("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:justify-center", children: [
|
|
861
|
+
/* @__PURE__ */ p("div", { className: "zd:px-4 zd:flex zd:flex-col zd:items-center", children: [
|
|
862
|
+
/* @__PURE__ */ t("div", { className: "zd:w-full zd:px-16 zd:py-4", children: /* @__PURE__ */ t(j2, { className: "zd:w-full zd:pointer-events-none zd:select-none" }) }),
|
|
863
|
+
/* @__PURE__ */ t(z, { className: "zd:text-h2 zd:text-center", children: "Continue to your wallet" }),
|
|
864
|
+
/* @__PURE__ */ t(z, { className: "zd:mt-2 zd:text-center zd:text-greyScale/50", children: "Choose a sign-in method to proceed" })
|
|
582
865
|
] }),
|
|
583
866
|
/* @__PURE__ */ t("div", { className: "zd:mt-6 zd:mb-4 zd:px-4 zd:flex zd:flex-col zd:gap-2", children: e })
|
|
584
867
|
] }),
|
|
585
868
|
/* @__PURE__ */ t("div", { className: "zd:px-4", children: /* @__PURE__ */ t(
|
|
586
|
-
|
|
869
|
+
V2,
|
|
587
870
|
{
|
|
588
|
-
termsAndConditionsUrl:
|
|
589
|
-
privacyPolicyUrl:
|
|
590
|
-
agreedToTerms:
|
|
591
|
-
setAgreedToTerms: (
|
|
592
|
-
|
|
871
|
+
termsAndConditionsUrl: n,
|
|
872
|
+
privacyPolicyUrl: a,
|
|
873
|
+
agreedToTerms: i,
|
|
874
|
+
setAgreedToTerms: (x) => {
|
|
875
|
+
o(x), x && c(!1);
|
|
593
876
|
},
|
|
594
|
-
highlight:
|
|
877
|
+
highlight: s
|
|
595
878
|
}
|
|
596
879
|
) })
|
|
597
880
|
]
|
|
@@ -601,221 +884,179 @@ function J({
|
|
|
601
884
|
}
|
|
602
885
|
);
|
|
603
886
|
}
|
|
604
|
-
function
|
|
605
|
-
return /* @__PURE__ */
|
|
887
|
+
function r2({ label: e = "or" }) {
|
|
888
|
+
return /* @__PURE__ */ p("div", { className: "zd:-mx-4 zd:my-2 zd:flex zd:items-center zd:gap-3", children: [
|
|
606
889
|
/* @__PURE__ */ t("div", { className: "zd:h-px zd:flex-1 zd:bg-greyScale/30" }),
|
|
607
|
-
/* @__PURE__ */ t(
|
|
890
|
+
/* @__PURE__ */ t(z, { className: "zd:text-body3", children: e }),
|
|
608
891
|
/* @__PURE__ */ t("div", { className: "zd:h-px zd:flex-1 zd:bg-greyScale/30" })
|
|
609
892
|
] });
|
|
610
893
|
}
|
|
611
|
-
function
|
|
612
|
-
return /* @__PURE__ */
|
|
613
|
-
/* @__PURE__ */ t(
|
|
614
|
-
/* @__PURE__ */ t(
|
|
615
|
-
/* @__PURE__ */ t(
|
|
616
|
-
/* @__PURE__ */ t(
|
|
894
|
+
function ee(e) {
|
|
895
|
+
return /* @__PURE__ */ p(i2, { ...e, children: [
|
|
896
|
+
/* @__PURE__ */ t(n2, {}),
|
|
897
|
+
/* @__PURE__ */ t(r2, {}),
|
|
898
|
+
/* @__PURE__ */ t(t2, {}),
|
|
899
|
+
/* @__PURE__ */ t(e2, {})
|
|
617
900
|
] });
|
|
618
901
|
}
|
|
619
|
-
const
|
|
620
|
-
Default:
|
|
621
|
-
Passkey:
|
|
622
|
-
Google:
|
|
623
|
-
Email:
|
|
624
|
-
|
|
902
|
+
const te = Object.assign(i2, {
|
|
903
|
+
Default: ee,
|
|
904
|
+
Passkey: n2,
|
|
905
|
+
Google: t2,
|
|
906
|
+
Email: e2,
|
|
907
|
+
Wallet: Q2,
|
|
908
|
+
InstalledWallets: K2,
|
|
909
|
+
MoreWallets: Y2,
|
|
910
|
+
Divider: r2
|
|
625
911
|
});
|
|
626
|
-
function
|
|
912
|
+
function ne() {
|
|
627
913
|
return typeof window > "u" ? null : new URLSearchParams(window.location.search).get("code");
|
|
628
914
|
}
|
|
629
|
-
function
|
|
630
|
-
const { otpId: e, otpEncryptionTargetBundle:
|
|
915
|
+
function ie() {
|
|
916
|
+
const { otpId: e, otpEncryptionTargetBundle: n, goToStep: a, clearOtpSession: r } = F(), [i] = E(ne), [o, s] = E(null), c = X(!1), { mutate: f, isPending: m } = y2({
|
|
631
917
|
mutation: {
|
|
632
918
|
onSuccess: () => {
|
|
633
|
-
|
|
919
|
+
r(), a("authenticated");
|
|
634
920
|
},
|
|
635
|
-
onError: (
|
|
636
|
-
|
|
921
|
+
onError: (g) => {
|
|
922
|
+
s(g);
|
|
637
923
|
}
|
|
638
924
|
}
|
|
639
925
|
});
|
|
640
|
-
return
|
|
641
|
-
if (!(c.current || !
|
|
642
|
-
if (c.current = !0, !e || !
|
|
643
|
-
|
|
926
|
+
return N(() => {
|
|
927
|
+
if (!(c.current || !i)) {
|
|
928
|
+
if (c.current = !0, !e || !n) {
|
|
929
|
+
U(), a(null);
|
|
644
930
|
return;
|
|
645
931
|
}
|
|
646
|
-
|
|
932
|
+
f({ otpId: e, code: i, otpEncryptionTargetBundle: n });
|
|
647
933
|
}
|
|
648
|
-
}, [e,
|
|
649
|
-
/* @__PURE__ */
|
|
650
|
-
!
|
|
651
|
-
!
|
|
652
|
-
/* @__PURE__ */
|
|
934
|
+
}, [e, n, i, f, a]), /* @__PURE__ */ p(v, { children: [
|
|
935
|
+
/* @__PURE__ */ p("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:gap-8 zd:items-center zd:justify-center", children: [
|
|
936
|
+
!o && m && /* @__PURE__ */ t(b, { imageName: "loading", title: "Verifying Your Email", children: "Please wait while we securely connect your wallet." }),
|
|
937
|
+
!o && !i && !m && /* @__PURE__ */ p(v, { children: [
|
|
938
|
+
/* @__PURE__ */ p(b, { imageName: "error", title: "Invalid Link", children: [
|
|
653
939
|
"This verification link is invalid or incomplete.",
|
|
654
940
|
/* @__PURE__ */ t("br", {}),
|
|
655
941
|
"Please check your email and try again with the correct link."
|
|
656
942
|
] }),
|
|
657
943
|
/* @__PURE__ */ t(
|
|
658
|
-
|
|
944
|
+
S,
|
|
659
945
|
{
|
|
660
946
|
action: "primary",
|
|
661
947
|
onClick: () => {
|
|
662
|
-
|
|
948
|
+
U(), a("sign-up");
|
|
663
949
|
},
|
|
664
950
|
text: "Choose another sign-in method"
|
|
665
951
|
}
|
|
666
952
|
)
|
|
667
953
|
] }),
|
|
668
|
-
|
|
669
|
-
/* @__PURE__ */ t(
|
|
954
|
+
o != null && /* @__PURE__ */ p(v, { children: [
|
|
955
|
+
/* @__PURE__ */ t(b, { imageName: "error", title: "Oops, something went wrong", children: "We couldn't complete the sign-in process. This could be due to timeout, an expired link, or a cancelled request." }),
|
|
670
956
|
/* @__PURE__ */ t(
|
|
671
|
-
|
|
957
|
+
S,
|
|
672
958
|
{
|
|
673
959
|
action: "primary",
|
|
674
960
|
onClick: () => {
|
|
675
|
-
|
|
961
|
+
U(), a("sign-up");
|
|
676
962
|
},
|
|
677
963
|
text: "Choose another sign-in method"
|
|
678
964
|
}
|
|
679
965
|
)
|
|
680
966
|
] })
|
|
681
967
|
] }),
|
|
682
|
-
/* @__PURE__ */ t(
|
|
968
|
+
/* @__PURE__ */ t(O, { className: "zd:self-center zd:pt-4 zd:pb-6" })
|
|
683
969
|
] });
|
|
684
970
|
}
|
|
685
|
-
function
|
|
686
|
-
|
|
687
|
-
r(
|
|
688
|
-
{ connector: o },
|
|
689
|
-
{
|
|
690
|
-
onSuccess: () => {
|
|
691
|
-
e(null);
|
|
692
|
-
}
|
|
693
|
-
}
|
|
694
|
-
);
|
|
695
|
-
};
|
|
696
|
-
return /* @__PURE__ */ d(N, { children: [
|
|
697
|
-
/* @__PURE__ */ d("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:gap-8 zd:justify-center", children: [
|
|
698
|
-
/* @__PURE__ */ t(m, { className: "zd:text-h2 zd:text-center", children: "Select your wallet" }),
|
|
699
|
-
/* @__PURE__ */ t("div", { className: "zd:flex zd:flex-col zd:gap-2", children: n.length === 0 ? /* @__PURE__ */ t(m, { className: "zd:text-center", children: "No wallets detected. Install a browser wallet extension to continue." }) : n.map((o) => /* @__PURE__ */ t(
|
|
700
|
-
_,
|
|
701
|
-
{
|
|
702
|
-
title: o.name,
|
|
703
|
-
icon: o.icon ? /* @__PURE__ */ t(
|
|
704
|
-
"img",
|
|
705
|
-
{
|
|
706
|
-
src: o.icon,
|
|
707
|
-
alt: "",
|
|
708
|
-
className: "zd:w-6 zd:h-6"
|
|
709
|
-
}
|
|
710
|
-
) : /* @__PURE__ */ t(q, { name: "walletOutline" }),
|
|
711
|
-
disabled: i,
|
|
712
|
-
onClick: () => a(o),
|
|
713
|
-
className: "zd:rounded-3xl"
|
|
714
|
-
},
|
|
715
|
-
o.uid
|
|
716
|
-
)) })
|
|
717
|
-
] }),
|
|
718
|
-
/* @__PURE__ */ t(T, { className: "zd:self-center zd:pt-4 zd:pb-6" })
|
|
719
|
-
] });
|
|
720
|
-
}
|
|
721
|
-
const We = {
|
|
722
|
-
"wallet-selection": "Choose your wallet"
|
|
723
|
-
};
|
|
724
|
-
function Fe() {
|
|
725
|
-
return /* @__PURE__ */ t("div", { className: "zd:flex zd:flex-1 zd:items-center zd:justify-center", children: /* @__PURE__ */ t(E, { imageName: "loading", title: "Authenticating...", children: "Please wait while we complete the OAuth authentication." }) });
|
|
971
|
+
function re() {
|
|
972
|
+
return /* @__PURE__ */ t("div", { className: "zd:flex zd:flex-1 zd:items-center zd:justify-center", children: /* @__PURE__ */ t(b, { imageName: "loading", title: "Authenticating...", children: "Please wait while we complete the OAuth authentication." }) });
|
|
726
973
|
}
|
|
727
|
-
function
|
|
728
|
-
return /* @__PURE__ */ t("div", { className: "zd:flex zd:flex-1 zd:items-center zd:justify-center", children: /* @__PURE__ */ t(
|
|
974
|
+
function ae() {
|
|
975
|
+
return /* @__PURE__ */ t("div", { className: "zd:flex zd:flex-1 zd:items-center zd:justify-center", children: /* @__PURE__ */ t(b, { imageName: "loading", title: "Passkey authentication", children: "Please authenticate with your passkey." }) });
|
|
729
976
|
}
|
|
730
|
-
function
|
|
977
|
+
function oe(e, n) {
|
|
731
978
|
switch (e) {
|
|
732
979
|
case "sign-up":
|
|
733
|
-
return
|
|
980
|
+
return n ? n() : /* @__PURE__ */ t(te.Default, {});
|
|
734
981
|
case "email-verification":
|
|
735
|
-
return /* @__PURE__ */ t(
|
|
982
|
+
return /* @__PURE__ */ t(U2, {});
|
|
736
983
|
case "otp-input":
|
|
737
|
-
return /* @__PURE__ */ t(
|
|
984
|
+
return /* @__PURE__ */ t(G2, {});
|
|
738
985
|
case "verifying-otp":
|
|
739
|
-
return /* @__PURE__ */ t(
|
|
986
|
+
return /* @__PURE__ */ t(ie, {});
|
|
740
987
|
case "oauth-in-progress":
|
|
741
|
-
return /* @__PURE__ */ t(
|
|
988
|
+
return /* @__PURE__ */ t(re, {});
|
|
742
989
|
case "passkey-prompt":
|
|
743
|
-
return /* @__PURE__ */ t(
|
|
744
|
-
case "wallet-selection":
|
|
745
|
-
return /* @__PURE__ */ t(De, {});
|
|
990
|
+
return /* @__PURE__ */ t(ae, {});
|
|
746
991
|
case "error":
|
|
747
|
-
return /* @__PURE__ */ t(
|
|
992
|
+
return /* @__PURE__ */ t(O2, {});
|
|
748
993
|
default:
|
|
749
994
|
return null;
|
|
750
995
|
}
|
|
751
996
|
}
|
|
752
|
-
function
|
|
997
|
+
function Ce({
|
|
753
998
|
onClose: e,
|
|
754
|
-
size:
|
|
755
|
-
renderSignUp:
|
|
756
|
-
logo:
|
|
999
|
+
size: n,
|
|
1000
|
+
renderSignUp: a,
|
|
1001
|
+
logo: r
|
|
757
1002
|
} = {}) {
|
|
758
|
-
const { step:
|
|
759
|
-
|
|
760
|
-
|
|
761
|
-
}, [
|
|
762
|
-
const
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
A(), c(), e == null || e();
|
|
766
|
-
}, h = n ? We[n] : void 0;
|
|
767
|
-
return /* @__PURE__ */ t(
|
|
768
|
-
ne,
|
|
1003
|
+
const { step: i, goToStep: o, goBack: s, reset: c } = F();
|
|
1004
|
+
N(() => {
|
|
1005
|
+
i === null && T2() && o("verifying-otp");
|
|
1006
|
+
}, [i, o]);
|
|
1007
|
+
const f = oe(i, a);
|
|
1008
|
+
return f ? /* @__PURE__ */ t(
|
|
1009
|
+
u2,
|
|
769
1010
|
{
|
|
770
|
-
...
|
|
771
|
-
className:
|
|
772
|
-
contentClassName: n === "sign-up" ? "zd:px-0" : void 0,
|
|
1011
|
+
...n && { size: n },
|
|
1012
|
+
className: i === "sign-up" ? "zd:h-auto zd:max-h-202.5" : void 0,
|
|
773
1013
|
topNav: /* @__PURE__ */ t(
|
|
774
|
-
|
|
1014
|
+
p2,
|
|
775
1015
|
{
|
|
776
|
-
...
|
|
777
|
-
onRightButtonClick:
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
1016
|
+
...s !== null && { onLeftButtonClick: s },
|
|
1017
|
+
onRightButtonClick: () => {
|
|
1018
|
+
U(), c(), e == null || e();
|
|
1019
|
+
},
|
|
1020
|
+
...i === "sign-up" && {
|
|
1021
|
+
...r && { logo: r },
|
|
781
1022
|
className: "zd:px-4"
|
|
782
1023
|
}
|
|
783
1024
|
}
|
|
784
1025
|
),
|
|
785
|
-
children:
|
|
1026
|
+
children: f
|
|
786
1027
|
}
|
|
787
|
-
);
|
|
1028
|
+
) : null;
|
|
788
1029
|
}
|
|
789
|
-
const
|
|
790
|
-
function
|
|
1030
|
+
const V = "zerodev:auth:otpSession";
|
|
1031
|
+
function se() {
|
|
791
1032
|
if (typeof window > "u") return null;
|
|
792
1033
|
try {
|
|
793
|
-
const e = window.localStorage.getItem(
|
|
1034
|
+
const e = window.localStorage.getItem(V);
|
|
794
1035
|
if (!e) return null;
|
|
795
|
-
const
|
|
796
|
-
return !(
|
|
1036
|
+
const n = JSON.parse(e);
|
|
1037
|
+
return !(n != null && n.otpId) || !(n != null && n.otpEncryptionTargetBundle) ? null : n;
|
|
797
1038
|
} catch {
|
|
798
1039
|
return null;
|
|
799
1040
|
}
|
|
800
1041
|
}
|
|
801
|
-
function
|
|
1042
|
+
function le(e) {
|
|
802
1043
|
if (!(typeof window > "u"))
|
|
803
1044
|
try {
|
|
804
1045
|
window.localStorage.setItem(
|
|
805
|
-
|
|
1046
|
+
V,
|
|
806
1047
|
JSON.stringify(e)
|
|
807
1048
|
);
|
|
808
1049
|
} catch {
|
|
809
1050
|
}
|
|
810
1051
|
}
|
|
811
|
-
function
|
|
1052
|
+
function W() {
|
|
812
1053
|
if (!(typeof window > "u"))
|
|
813
1054
|
try {
|
|
814
|
-
window.localStorage.removeItem(
|
|
1055
|
+
window.localStorage.removeItem(V);
|
|
815
1056
|
} catch {
|
|
816
1057
|
}
|
|
817
1058
|
}
|
|
818
|
-
const
|
|
1059
|
+
const de = (e, n, a) => ({
|
|
819
1060
|
auth: {
|
|
820
1061
|
// Initial state
|
|
821
1062
|
step: null,
|
|
@@ -825,40 +1066,40 @@ const Ye = (e, r, s) => ({
|
|
|
825
1066
|
otpEncryptionTargetBundle: null,
|
|
826
1067
|
// Actions
|
|
827
1068
|
initialize: () => {
|
|
828
|
-
const
|
|
829
|
-
|
|
1069
|
+
const r = se();
|
|
1070
|
+
r && e((i) => ({
|
|
830
1071
|
auth: {
|
|
831
|
-
...
|
|
832
|
-
otpId:
|
|
833
|
-
otpEncryptionTargetBundle:
|
|
1072
|
+
...i.auth,
|
|
1073
|
+
otpId: r.otpId,
|
|
1074
|
+
otpEncryptionTargetBundle: r.otpEncryptionTargetBundle
|
|
834
1075
|
}
|
|
835
1076
|
}));
|
|
836
1077
|
},
|
|
837
|
-
goToStep: (
|
|
838
|
-
e((
|
|
1078
|
+
goToStep: (r) => {
|
|
1079
|
+
e((i) => ({
|
|
839
1080
|
auth: {
|
|
840
|
-
...
|
|
841
|
-
step:
|
|
842
|
-
stepHistory:
|
|
1081
|
+
...i.auth,
|
|
1082
|
+
step: r,
|
|
1083
|
+
stepHistory: i.auth.step === null ? i.auth.stepHistory : [...i.auth.stepHistory, i.auth.step]
|
|
843
1084
|
}
|
|
844
1085
|
}));
|
|
845
1086
|
},
|
|
846
1087
|
goBack: () => {
|
|
847
|
-
const { auth:
|
|
848
|
-
if (
|
|
849
|
-
const
|
|
850
|
-
e((
|
|
1088
|
+
const { auth: r } = n();
|
|
1089
|
+
if (r.stepHistory.length === 0) return;
|
|
1090
|
+
const i = [...r.stepHistory], o = i.pop();
|
|
1091
|
+
e((s) => ({
|
|
851
1092
|
auth: {
|
|
852
|
-
...
|
|
853
|
-
step:
|
|
854
|
-
stepHistory:
|
|
1093
|
+
...s.auth,
|
|
1094
|
+
step: o,
|
|
1095
|
+
stepHistory: i
|
|
855
1096
|
}
|
|
856
1097
|
}));
|
|
857
1098
|
},
|
|
858
1099
|
reset: () => {
|
|
859
|
-
|
|
1100
|
+
W(), e((r) => ({
|
|
860
1101
|
auth: {
|
|
861
|
-
...
|
|
1102
|
+
...r.auth,
|
|
862
1103
|
step: null,
|
|
863
1104
|
stepHistory: [],
|
|
864
1105
|
email: null,
|
|
@@ -867,93 +1108,93 @@ const Ye = (e, r, s) => ({
|
|
|
867
1108
|
}
|
|
868
1109
|
}));
|
|
869
1110
|
},
|
|
870
|
-
setEmail: (
|
|
871
|
-
e((
|
|
1111
|
+
setEmail: (r) => {
|
|
1112
|
+
e((i) => ({
|
|
872
1113
|
auth: {
|
|
873
|
-
...
|
|
874
|
-
email:
|
|
1114
|
+
...i.auth,
|
|
1115
|
+
email: r
|
|
875
1116
|
}
|
|
876
1117
|
}));
|
|
877
1118
|
},
|
|
878
|
-
setOtpSession: ({ otpId:
|
|
879
|
-
|
|
1119
|
+
setOtpSession: ({ otpId: r, otpEncryptionTargetBundle: i }) => {
|
|
1120
|
+
le({ otpId: r, otpEncryptionTargetBundle: i }), e((o) => ({
|
|
880
1121
|
auth: {
|
|
881
|
-
...
|
|
882
|
-
otpId:
|
|
883
|
-
otpEncryptionTargetBundle:
|
|
1122
|
+
...o.auth,
|
|
1123
|
+
otpId: r,
|
|
1124
|
+
otpEncryptionTargetBundle: i
|
|
884
1125
|
}
|
|
885
1126
|
}));
|
|
886
1127
|
},
|
|
887
1128
|
clearOtpSession: () => {
|
|
888
|
-
|
|
1129
|
+
W(), e((r) => ({
|
|
889
1130
|
auth: {
|
|
890
|
-
...
|
|
1131
|
+
...r.auth,
|
|
891
1132
|
otpId: null,
|
|
892
1133
|
otpEncryptionTargetBundle: null
|
|
893
1134
|
}
|
|
894
1135
|
}));
|
|
895
1136
|
}
|
|
896
1137
|
}
|
|
897
|
-
}),
|
|
898
|
-
|
|
1138
|
+
}), ce = () => z2()(
|
|
1139
|
+
A2((e, n, a) => ({
|
|
899
1140
|
pendingRequests: [],
|
|
900
1141
|
userConfirmationListenerActive: !1,
|
|
901
|
-
addPendingRequest: (
|
|
902
|
-
pendingRequests: [...
|
|
1142
|
+
addPendingRequest: (r) => e((i) => ({
|
|
1143
|
+
pendingRequests: [...i.pendingRequests, r]
|
|
903
1144
|
})),
|
|
904
|
-
removePendingRequest: (
|
|
905
|
-
pendingRequests:
|
|
1145
|
+
removePendingRequest: (r) => e((i) => ({
|
|
1146
|
+
pendingRequests: i.pendingRequests.filter((o) => o.id !== r)
|
|
906
1147
|
})),
|
|
907
1148
|
clearPendingRequests: () => e({ pendingRequests: [] }),
|
|
908
|
-
setUserConfirmationListenerActive: (
|
|
909
|
-
...
|
|
1149
|
+
setUserConfirmationListenerActive: (r) => e({ userConfirmationListenerActive: r }),
|
|
1150
|
+
...de(e, n)
|
|
910
1151
|
}))
|
|
911
1152
|
);
|
|
912
|
-
function
|
|
913
|
-
return new Promise((
|
|
914
|
-
const
|
|
915
|
-
(
|
|
916
|
-
(
|
|
917
|
-
|
|
1153
|
+
function ue(e) {
|
|
1154
|
+
return new Promise((n, a) => {
|
|
1155
|
+
const r = e.subscribe(
|
|
1156
|
+
(i) => i.auth.step,
|
|
1157
|
+
(i) => {
|
|
1158
|
+
i === "authenticated" ? (r(), n()) : i === null && (r(), a(new Error("Auth flow dismissed")));
|
|
918
1159
|
}
|
|
919
1160
|
);
|
|
920
1161
|
});
|
|
921
1162
|
}
|
|
922
|
-
function
|
|
923
|
-
const
|
|
924
|
-
return (
|
|
925
|
-
const
|
|
1163
|
+
function Ee(e) {
|
|
1164
|
+
const n = v2(e), a = ce();
|
|
1165
|
+
return (r) => {
|
|
1166
|
+
const i = n(r);
|
|
926
1167
|
return {
|
|
927
|
-
...
|
|
928
|
-
async connect(
|
|
1168
|
+
...i,
|
|
1169
|
+
async connect(o) {
|
|
929
1170
|
try {
|
|
930
|
-
return await
|
|
931
|
-
} catch (
|
|
932
|
-
if (
|
|
933
|
-
throw
|
|
934
|
-
if (
|
|
1171
|
+
return await i.connect(o);
|
|
1172
|
+
} catch (s) {
|
|
1173
|
+
if (o != null && o.isReconnecting || !(s instanceof S2))
|
|
1174
|
+
throw s;
|
|
1175
|
+
if (a.getState().auth.step !== null)
|
|
935
1176
|
throw new Error("Auth flow already in progress");
|
|
936
|
-
return
|
|
1177
|
+
return a.getState().auth.goToStep("sign-up"), await ue(a), i.connect(o);
|
|
937
1178
|
}
|
|
938
1179
|
},
|
|
939
1180
|
async disconnect() {
|
|
940
|
-
var
|
|
941
|
-
await ((
|
|
1181
|
+
var o;
|
|
1182
|
+
await ((o = i.disconnect) == null ? void 0 : o.call(i)), a.getState().auth.reset();
|
|
942
1183
|
},
|
|
943
1184
|
async setup() {
|
|
944
|
-
var
|
|
945
|
-
await ((
|
|
1185
|
+
var o;
|
|
1186
|
+
await ((o = i.setup) == null ? void 0 : o.call(i)), !(typeof window > "u") && a.getState().auth.initialize();
|
|
946
1187
|
},
|
|
947
1188
|
getKitStore() {
|
|
948
|
-
return
|
|
1189
|
+
return a;
|
|
949
1190
|
}
|
|
950
1191
|
};
|
|
951
1192
|
};
|
|
952
1193
|
}
|
|
953
1194
|
export {
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
1195
|
+
Ce as ConnectWallet,
|
|
1196
|
+
te as SignUp,
|
|
1197
|
+
F as useAuth,
|
|
1198
|
+
Ee as zeroDevWallet
|
|
958
1199
|
};
|
|
959
1200
|
//# sourceMappingURL=index.mjs.map
|