@zerodev/wallet-react-ui 0.0.7 → 0.0.9
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/history/components/TxHistoryItem/index.d.ts +21 -0
- package/dist/_types/history/components/TxHistoryItem/index.d.ts.map +1 -0
- package/dist/_types/history/mocks.d.ts +8 -0
- package/dist/_types/history/mocks.d.ts.map +1 -0
- package/dist/_types/history/pages/History.d.ts +10 -0
- package/dist/_types/history/pages/History.d.ts.map +1 -0
- package/dist/_types/history/pages/index.d.ts +24 -0
- package/dist/_types/history/pages/index.d.ts.map +1 -0
- package/dist/_types/history/types.d.ts +29 -0
- package/dist/_types/history/types.d.ts.map +1 -0
- package/dist/_types/history/utils/groupByDay.d.ts +13 -0
- package/dist/_types/history/utils/groupByDay.d.ts.map +1 -0
- package/dist/_types/index.d.ts +3 -0
- package/dist/_types/index.d.ts.map +1 -1
- package/dist/_types/shared/components/TokenSummary/index.d.ts +18 -0
- package/dist/_types/shared/components/TokenSummary/index.d.ts.map +1 -0
- package/dist/index.cjs +3 -3
- package/dist/index.cjs.map +1 -1
- package/dist/index.mjs +974 -483
- package/dist/index.mjs.map +1 -1
- package/dist/styles.css +1 -1
- package/package.json +4 -4
- 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/history/components/TxHistoryItem/index.tsx +108 -0
- package/src/history/mocks.ts +80 -0
- package/src/history/pages/History.tsx +69 -0
- package/src/history/pages/index.tsx +69 -0
- package/src/history/types.ts +29 -0
- package/src/history/utils/groupByDay.ts +47 -0
- package/src/index.ts +9 -0
- package/src/shared/components/TokenSummary/index.tsx +50 -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 c, jsx as t, Fragment as x } from "react/jsx-runtime";
|
|
2
|
+
import { Text as D, cn as B, PoweredBy as H, Button as S, Wrapper as e2, Input as f2, Icon as Z, ListItem as M, ListItemChevron as V, ListItemIcon as t2, Badge as n2, BottomSheet as m2, BottomSheetContent as g2, BottomSheetTitle as z2, BottomSheetClose as D2, Screen as i2, TopNav as a2 } from "@zerodev/react-ui";
|
|
3
|
+
import { useState as C, useEffect as U, useMemo as w2, useRef as r2, createContext as C2, useContext as E2, useLayoutEffect as F2, useCallback as x2, Fragment as y2 } from "react";
|
|
4
|
+
import { useStore as O, create as v2 } from "zustand";
|
|
5
|
+
import { useConfig as S2, useConnectors as $, useConnect as q } from "wagmi";
|
|
6
|
+
import { useSendMagicLink as s2, useSendOTP as l2, useVerifyOTP as b2, useAuthenticateOAuth as A2, useRegisterPasskey as N2, useLoginPasskey as k2, useVerifyMagicLink as U2, zeroDevWallet as T2, NotAuthenticatedError as _2 } from "@zerodev/wallet-react";
|
|
7
|
+
import { subscribeWithSelector as L2 } from "zustand/middleware";
|
|
8
|
+
const O2 = "" + new URL("error.webp", import.meta.url).href, I2 = "" + new URL("loading.webp", import.meta.url).href, M2 = "" + new URL("send.webp", import.meta.url).href, H2 = "" + new URL("success.webp", import.meta.url).href, P2 = {
|
|
9
|
+
error: O2,
|
|
10
|
+
loading: I2,
|
|
11
|
+
send: M2,
|
|
12
|
+
success: H2
|
|
13
13
|
};
|
|
14
|
-
function
|
|
14
|
+
function N({
|
|
15
15
|
imageName: e,
|
|
16
|
-
title:
|
|
17
|
-
children:
|
|
18
|
-
className:
|
|
16
|
+
title: n,
|
|
17
|
+
children: r,
|
|
18
|
+
className: a
|
|
19
19
|
}) {
|
|
20
|
-
return /* @__PURE__ */
|
|
20
|
+
return /* @__PURE__ */ c(
|
|
21
21
|
"div",
|
|
22
22
|
{
|
|
23
|
-
className:
|
|
23
|
+
className: B("zd:flex zd:flex-col zd:gap-8 zd:items-center", a),
|
|
24
24
|
children: [
|
|
25
25
|
/* @__PURE__ */ t(
|
|
26
26
|
"img",
|
|
27
27
|
{
|
|
28
|
-
src:
|
|
28
|
+
src: P2[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__ */ c("div", { className: "zd:flex zd:flex-col zd:gap-4 zd:items-center", children: [
|
|
34
|
+
/* @__PURE__ */ t(D, { className: "zd:text-h2 zd:text-center zd:whitespace-pre-wrap", children: n }),
|
|
35
|
+
/* @__PURE__ */ t(D, { className: "zd:text-center zd:whitespace-pre-wrap", children: r })
|
|
36
36
|
] })
|
|
37
37
|
]
|
|
38
38
|
}
|
|
39
39
|
);
|
|
40
40
|
}
|
|
41
|
-
function
|
|
42
|
-
const
|
|
43
|
-
if (!
|
|
41
|
+
function R2() {
|
|
42
|
+
const n = S2().connectors.find((r) => r.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 = R2(), n = O(e, (l) => l.auth.step), r = O(e, (l) => l.auth.stepHistory), a = O(e, (l) => l.auth.email), i = O(e, (l) => l.auth.otpId), s = O(
|
|
49
49
|
e,
|
|
50
|
-
(
|
|
50
|
+
(l) => l.auth.otpEncryptionTargetBundle
|
|
51
51
|
);
|
|
52
52
|
return {
|
|
53
|
-
step:
|
|
54
|
-
email:
|
|
55
|
-
otpId:
|
|
56
|
-
otpEncryptionTargetBundle:
|
|
53
|
+
step: n,
|
|
54
|
+
email: a,
|
|
55
|
+
otpId: i,
|
|
56
|
+
otpEncryptionTargetBundle: s,
|
|
57
57
|
goToStep: e.getState().auth.goToStep,
|
|
58
|
-
goBack:
|
|
58
|
+
goBack: r.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 B2() {
|
|
66
|
+
const { email: e, setOtpSession: n } = F(), { mutateAsync: r, isPending: a } = s2(), [i, s] = C(60), l = i <= 0 && !a;
|
|
67
|
+
return U(() => {
|
|
68
|
+
if (i <= 0) return;
|
|
69
|
+
const p = setInterval(() => {
|
|
70
|
+
s((m) => Math.max(0, m - 1));
|
|
71
71
|
}, 1e3);
|
|
72
72
|
return () => {
|
|
73
|
-
clearInterval(
|
|
73
|
+
clearInterval(p);
|
|
74
74
|
};
|
|
75
|
-
}, [
|
|
76
|
-
/* @__PURE__ */
|
|
77
|
-
/* @__PURE__ */
|
|
78
|
-
|
|
75
|
+
}, [i]), /* @__PURE__ */ c(x, { children: [
|
|
76
|
+
/* @__PURE__ */ c("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:gap-8 zd:justify-center", children: [
|
|
77
|
+
/* @__PURE__ */ c(
|
|
78
|
+
N,
|
|
79
79
|
{
|
|
80
80
|
imageName: "send",
|
|
81
81
|
title: `Check your email!
|
|
@@ -83,155 +83,155 @@ function be() {
|
|
|
83
83
|
children: [
|
|
84
84
|
"We've sent a magic link to",
|
|
85
85
|
" ",
|
|
86
|
-
/* @__PURE__ */ t(
|
|
86
|
+
/* @__PURE__ */ t(D, { 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__ */ c(D, { 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: !l,
|
|
101
101
|
onClick: async () => {
|
|
102
|
-
if (!(!e || !
|
|
102
|
+
if (!(!e || !l))
|
|
103
103
|
try {
|
|
104
|
-
const { otpId:
|
|
104
|
+
const { otpId: p, otpEncryptionTargetBundle: m } = await r({
|
|
105
105
|
email: e
|
|
106
106
|
});
|
|
107
|
-
|
|
107
|
+
n({ otpId: p, otpEncryptionTargetBundle: m }), s(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: l ? "Resend" : `Resend in ${i} ${i === 1 ? "second" : "seconds"}`
|
|
113
113
|
}
|
|
114
114
|
)
|
|
115
115
|
] }) })
|
|
116
116
|
] }),
|
|
117
|
-
/* @__PURE__ */ t(
|
|
117
|
+
/* @__PURE__ */ t(H, { className: "zd:self-center zd:pt-4 zd:pb-6" })
|
|
118
118
|
] });
|
|
119
119
|
}
|
|
120
|
-
function
|
|
120
|
+
function Z2() {
|
|
121
121
|
return typeof window > "u" ? !1 : new URLSearchParams(window.location.search).has("code");
|
|
122
122
|
}
|
|
123
|
-
function
|
|
123
|
+
function I() {
|
|
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 G2({
|
|
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: r = !1,
|
|
132
|
+
showChooseAnother: a = !0
|
|
133
133
|
}) {
|
|
134
|
-
const { goToStep:
|
|
135
|
-
return /* @__PURE__ */
|
|
136
|
-
/* @__PURE__ */
|
|
137
|
-
/* @__PURE__ */ t(
|
|
138
|
-
/* @__PURE__ */
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
134
|
+
const { goToStep: i, goBack: s, reset: l } = F();
|
|
135
|
+
return /* @__PURE__ */ c(x, { children: [
|
|
136
|
+
/* @__PURE__ */ c("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:gap-8 zd:items-center zd:justify-center", children: [
|
|
137
|
+
/* @__PURE__ */ t(N, { imageName: "error", title: e, children: n }),
|
|
138
|
+
/* @__PURE__ */ c("div", { className: "zd:flex zd:flex-col zd:gap-1", children: [
|
|
139
|
+
r && /* @__PURE__ */ t(S, { action: "primary", text: "Try again", onClick: s ?? (() => i("sign-up")) }),
|
|
140
|
+
a && /* @__PURE__ */ t(
|
|
141
|
+
S,
|
|
142
142
|
{
|
|
143
|
-
action:
|
|
143
|
+
action: r ? "secondary" : "primary",
|
|
144
144
|
onClick: () => {
|
|
145
|
-
|
|
145
|
+
I(), i("sign-up");
|
|
146
146
|
},
|
|
147
147
|
text: "Choose another sign-in method"
|
|
148
148
|
}
|
|
149
149
|
),
|
|
150
|
-
!
|
|
150
|
+
!r && !a && /* @__PURE__ */ t(S, { action: "primary", text: "Start over", onClick: l })
|
|
151
151
|
] })
|
|
152
152
|
] }),
|
|
153
|
-
/* @__PURE__ */ t(
|
|
153
|
+
/* @__PURE__ */ t(H, { className: "zd:self-center zd:pt-4 zd:pb-6" })
|
|
154
154
|
] });
|
|
155
155
|
}
|
|
156
|
-
const
|
|
157
|
-
function
|
|
158
|
-
return Math.max(
|
|
156
|
+
const V2 = 4, W2 = 8, j2 = 6;
|
|
157
|
+
function $2(e) {
|
|
158
|
+
return Math.max(V2, Math.min(W2, e));
|
|
159
159
|
}
|
|
160
|
-
function
|
|
160
|
+
function q2({ char: e, isFocused: n }) {
|
|
161
161
|
return /* @__PURE__ */ t(
|
|
162
|
-
|
|
162
|
+
e2,
|
|
163
163
|
{
|
|
164
164
|
"data-testid": "code-input-box",
|
|
165
|
-
"data-active":
|
|
166
|
-
className:
|
|
165
|
+
"data-active": n || void 0,
|
|
166
|
+
className: B(
|
|
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(D, { className: "zd:text-h2", children: e })
|
|
171
171
|
}
|
|
172
172
|
);
|
|
173
173
|
}
|
|
174
|
-
function
|
|
174
|
+
function K2({
|
|
175
175
|
onChange: e,
|
|
176
|
-
onComplete:
|
|
177
|
-
disabled:
|
|
178
|
-
error:
|
|
179
|
-
autoFocus:
|
|
180
|
-
length:
|
|
181
|
-
"data-testid":
|
|
176
|
+
onComplete: n,
|
|
177
|
+
disabled: r = !1,
|
|
178
|
+
error: a = !1,
|
|
179
|
+
autoFocus: i = !1,
|
|
180
|
+
length: s = j2,
|
|
181
|
+
"data-testid": l
|
|
182
182
|
}) {
|
|
183
|
-
const
|
|
184
|
-
() => Array.from({ length:
|
|
185
|
-
id: `char-${
|
|
186
|
-
index:
|
|
183
|
+
const o = $2(s), p = w2(
|
|
184
|
+
() => Array.from({ length: o }, (u, z) => ({
|
|
185
|
+
id: `char-${z}`,
|
|
186
|
+
index: z
|
|
187
187
|
})),
|
|
188
|
-
[
|
|
189
|
-
), [
|
|
190
|
-
|
|
188
|
+
[o]
|
|
189
|
+
), [m, g] = C(""), [E, h] = C(!1), d = r2(null);
|
|
190
|
+
U(() => {
|
|
191
191
|
var u;
|
|
192
|
-
|
|
193
|
-
}, [
|
|
194
|
-
|
|
195
|
-
}, [
|
|
196
|
-
const
|
|
197
|
-
const
|
|
198
|
-
|
|
199
|
-
var
|
|
200
|
-
|
|
192
|
+
i && !r && ((u = d.current) == null || u.focus());
|
|
193
|
+
}, [i, r]), U(() => {
|
|
194
|
+
g((u) => u.slice(0, o));
|
|
195
|
+
}, [o]);
|
|
196
|
+
const f = (u) => {
|
|
197
|
+
const z = u.slice(0, o).toUpperCase();
|
|
198
|
+
g(z), e == null || e(z), z.length === o && setTimeout(() => {
|
|
199
|
+
var w;
|
|
200
|
+
n == null || n(z), (w = d.current) == null || w.blur();
|
|
201
201
|
}, 0);
|
|
202
202
|
};
|
|
203
|
-
return /* @__PURE__ */
|
|
203
|
+
return /* @__PURE__ */ c(
|
|
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
209
|
var u;
|
|
210
|
-
return (u =
|
|
210
|
+
return (u = d.current) == null ? void 0 : u.focus();
|
|
211
211
|
},
|
|
212
|
-
disabled:
|
|
213
|
-
"data-testid":
|
|
212
|
+
disabled: r,
|
|
213
|
+
"data-testid": l,
|
|
214
214
|
children: [
|
|
215
215
|
/* @__PURE__ */ t(
|
|
216
216
|
"input",
|
|
217
217
|
{
|
|
218
|
-
ref:
|
|
219
|
-
value:
|
|
220
|
-
onChange: (u) =>
|
|
221
|
-
onFocus: () =>
|
|
222
|
-
onBlur: () =>
|
|
223
|
-
maxLength:
|
|
224
|
-
disabled:
|
|
218
|
+
ref: d,
|
|
219
|
+
value: m,
|
|
220
|
+
onChange: (u) => f(u.target.value),
|
|
221
|
+
onFocus: () => h(!0),
|
|
222
|
+
onBlur: () => h(!1),
|
|
223
|
+
maxLength: o,
|
|
224
|
+
disabled: r,
|
|
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
|
+
p.map((u) => /* @__PURE__ */ t(
|
|
231
|
+
q2,
|
|
232
232
|
{
|
|
233
|
-
char:
|
|
234
|
-
isFocused: !
|
|
233
|
+
char: m[u.index] ?? "",
|
|
234
|
+
isFocused: !a && E && u.index === m.length
|
|
235
235
|
},
|
|
236
236
|
u.id
|
|
237
237
|
))
|
|
@@ -239,122 +239,122 @@ function Re({
|
|
|
239
239
|
}
|
|
240
240
|
);
|
|
241
241
|
}
|
|
242
|
-
function
|
|
242
|
+
function Y2() {
|
|
243
243
|
const {
|
|
244
244
|
email: e,
|
|
245
|
-
otpId:
|
|
246
|
-
otpEncryptionTargetBundle:
|
|
247
|
-
setOtpSession:
|
|
248
|
-
clearOtpSession:
|
|
249
|
-
goToStep:
|
|
250
|
-
} =
|
|
251
|
-
|
|
252
|
-
if (
|
|
253
|
-
const
|
|
254
|
-
u((
|
|
245
|
+
otpId: n,
|
|
246
|
+
otpEncryptionTargetBundle: r,
|
|
247
|
+
setOtpSession: a,
|
|
248
|
+
clearOtpSession: i,
|
|
249
|
+
goToStep: s
|
|
250
|
+
} = F(), { mutateAsync: l, isPending: o } = l2(), { mutateAsync: p, isPending: m } = b2(), [g, E] = C(""), [h, d] = C(!1), [f, u] = C(60);
|
|
251
|
+
U(() => {
|
|
252
|
+
if (f <= 0) return;
|
|
253
|
+
const v = setInterval(() => {
|
|
254
|
+
u((W) => Math.max(0, W - 1));
|
|
255
255
|
}, 1e3);
|
|
256
|
-
return () => clearInterval(
|
|
257
|
-
}, [
|
|
258
|
-
const
|
|
259
|
-
if (!(!
|
|
260
|
-
|
|
256
|
+
return () => clearInterval(v);
|
|
257
|
+
}, [f]);
|
|
258
|
+
const z = async () => {
|
|
259
|
+
if (!(!g.trim() || !n || !r)) {
|
|
260
|
+
d(!1);
|
|
261
261
|
try {
|
|
262
|
-
await
|
|
263
|
-
otpId:
|
|
264
|
-
code:
|
|
265
|
-
otpEncryptionTargetBundle:
|
|
266
|
-
}),
|
|
262
|
+
await p({
|
|
263
|
+
otpId: n,
|
|
264
|
+
code: g.trim(),
|
|
265
|
+
otpEncryptionTargetBundle: r
|
|
266
|
+
}), i(), s("authenticated");
|
|
267
267
|
} catch {
|
|
268
|
-
|
|
268
|
+
d(!0);
|
|
269
269
|
}
|
|
270
270
|
}
|
|
271
|
-
},
|
|
272
|
-
v
|
|
273
|
-
},
|
|
274
|
-
if (!(!e ||
|
|
271
|
+
}, w = (v) => {
|
|
272
|
+
E(v);
|
|
273
|
+
}, y = async () => {
|
|
274
|
+
if (!(!e || f > 0 || o))
|
|
275
275
|
try {
|
|
276
|
-
const { otpId:
|
|
277
|
-
|
|
278
|
-
otpId:
|
|
279
|
-
otpEncryptionTargetBundle:
|
|
280
|
-
}), u(60),
|
|
276
|
+
const { otpId: v, otpEncryptionTargetBundle: W } = await l({ email: e });
|
|
277
|
+
a({
|
|
278
|
+
otpId: v,
|
|
279
|
+
otpEncryptionTargetBundle: W
|
|
280
|
+
}), u(60), d(!1);
|
|
281
281
|
} catch {
|
|
282
|
-
|
|
282
|
+
d(!0);
|
|
283
283
|
}
|
|
284
|
-
},
|
|
285
|
-
return /* @__PURE__ */
|
|
286
|
-
/* @__PURE__ */
|
|
287
|
-
/* @__PURE__ */
|
|
288
|
-
/* @__PURE__ */ t(
|
|
289
|
-
/* @__PURE__ */
|
|
284
|
+
}, b = f <= 0 && !o;
|
|
285
|
+
return /* @__PURE__ */ c(x, { children: [
|
|
286
|
+
/* @__PURE__ */ c("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:gap-8 zd:justify-center zd:items-center", children: [
|
|
287
|
+
/* @__PURE__ */ c("div", { className: "zd:flex zd:flex-col zd:gap-4", children: [
|
|
288
|
+
/* @__PURE__ */ t(D, { className: "zd:text-h2 zd:text-center", children: "Enter verification code" }),
|
|
289
|
+
/* @__PURE__ */ c(D, { className: "zd:text-center", children: [
|
|
290
290
|
"Enter the code from the email we sent to",
|
|
291
291
|
" ",
|
|
292
|
-
/* @__PURE__ */ t(
|
|
292
|
+
/* @__PURE__ */ t(D, { className: "zd:text-solarOrange", children: e })
|
|
293
293
|
] })
|
|
294
294
|
] }),
|
|
295
295
|
/* @__PURE__ */ t(
|
|
296
|
-
|
|
296
|
+
K2,
|
|
297
297
|
{
|
|
298
|
-
onComplete:
|
|
299
|
-
onChange: () =>
|
|
300
|
-
disabled:
|
|
301
|
-
error:
|
|
298
|
+
onComplete: w,
|
|
299
|
+
onChange: () => d(!1),
|
|
300
|
+
disabled: m,
|
|
301
|
+
error: h,
|
|
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: z,
|
|
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__ */ c(D, { 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: !b,
|
|
321
|
+
onClick: y,
|
|
322
322
|
className: "zd:cursor-pointer zd:underline zd:disabled:opacity-50 zd:disabled:cursor-not-allowed",
|
|
323
|
-
children:
|
|
323
|
+
children: b ? "Resend" : `Resend in ${f} ${f === 1 ? "second" : "seconds"}`
|
|
324
324
|
}
|
|
325
325
|
)
|
|
326
326
|
] }) })
|
|
327
327
|
] }),
|
|
328
|
-
/* @__PURE__ */ t(
|
|
328
|
+
/* @__PURE__ */ t(H, { className: "zd:self-center zd:pt-4 zd:pb-6" })
|
|
329
329
|
] });
|
|
330
330
|
}
|
|
331
|
-
function
|
|
331
|
+
function J2({
|
|
332
332
|
termsAndConditionsUrl: e,
|
|
333
|
-
privacyPolicyUrl:
|
|
334
|
-
agreedToTerms:
|
|
335
|
-
setAgreedToTerms:
|
|
336
|
-
highlight:
|
|
333
|
+
privacyPolicyUrl: n,
|
|
334
|
+
agreedToTerms: r,
|
|
335
|
+
setAgreedToTerms: a,
|
|
336
|
+
highlight: i = !1
|
|
337
337
|
}) {
|
|
338
|
-
return /* @__PURE__ */
|
|
339
|
-
!!(e ||
|
|
338
|
+
return /* @__PURE__ */ c("div", { className: "zd:flex zd:flex-col zd:items-center zd:gap-5", children: [
|
|
339
|
+
!!(e || n) && /* @__PURE__ */ c(
|
|
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: r,
|
|
349
|
+
onChange: (l) => a(l.target.checked),
|
|
350
350
|
className: "zd:cursor-pointer zd:[color-scheme:light]"
|
|
351
351
|
}
|
|
352
352
|
),
|
|
353
|
-
/* @__PURE__ */
|
|
353
|
+
/* @__PURE__ */ c(D, { className: "zd:flex-1", children: [
|
|
354
354
|
"I agree to the",
|
|
355
355
|
" ",
|
|
356
356
|
e && /* @__PURE__ */ t(
|
|
357
|
-
|
|
357
|
+
D,
|
|
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
|
+
D,
|
|
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(H, {})
|
|
384
384
|
] });
|
|
385
385
|
}
|
|
386
|
-
const
|
|
387
|
-
function
|
|
386
|
+
const X2 = "" + new URL("blob.webm", import.meta.url).href;
|
|
387
|
+
function Q2({ 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: X2,
|
|
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 o2 = C2(null);
|
|
404
|
+
function T() {
|
|
405
|
+
const e = E2(o2);
|
|
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
|
-
|
|
413
|
-
}
|
|
414
|
-
const
|
|
415
|
-
function
|
|
416
|
-
return
|
|
417
|
-
}
|
|
418
|
-
function
|
|
419
|
-
const { goToStep: e, setEmail:
|
|
420
|
-
authPending:
|
|
421
|
-
emailAuthMethod:
|
|
422
|
-
needsAgreement:
|
|
423
|
-
guardAgreement:
|
|
424
|
-
setError:
|
|
425
|
-
} =
|
|
426
|
-
|
|
427
|
-
const
|
|
428
|
-
if (!(!
|
|
429
|
-
|
|
410
|
+
function L(e) {
|
|
411
|
+
const { setAuthPending: n } = T();
|
|
412
|
+
U(() => (n(e), () => n(!1)), [e, n]);
|
|
413
|
+
}
|
|
414
|
+
const ee = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;
|
|
415
|
+
function j(e) {
|
|
416
|
+
return ee.test(e.trim());
|
|
417
|
+
}
|
|
418
|
+
function d2() {
|
|
419
|
+
const { goToStep: e, setEmail: n, setOtpSession: r } = F(), {
|
|
420
|
+
authPending: a,
|
|
421
|
+
emailAuthMethod: i,
|
|
422
|
+
needsAgreement: s,
|
|
423
|
+
guardAgreement: l,
|
|
424
|
+
setError: o
|
|
425
|
+
} = T(), [p, m] = C(""), g = i === "otp", { mutateAsync: E, isPending: h } = l2(), { mutateAsync: d, isPending: f } = s2(), u = h || f;
|
|
426
|
+
L(u);
|
|
427
|
+
const z = async () => {
|
|
428
|
+
if (!(!p || a) && j(p) && l()) {
|
|
429
|
+
o(null);
|
|
430
430
|
try {
|
|
431
|
-
const
|
|
432
|
-
email:
|
|
431
|
+
const w = g ? E : d, { otpId: y, otpEncryptionTargetBundle: b } = await w({
|
|
432
|
+
email: p
|
|
433
433
|
});
|
|
434
|
-
|
|
435
|
-
} catch (
|
|
436
|
-
|
|
437
|
-
|
|
434
|
+
n(p), r({ otpId: y, otpEncryptionTargetBundle: b }), e(g ? "otp-input" : "email-verification");
|
|
435
|
+
} catch (w) {
|
|
436
|
+
o(
|
|
437
|
+
w instanceof Error ? w.message : "Failed to send verification code"
|
|
438
438
|
);
|
|
439
439
|
}
|
|
440
440
|
}
|
|
441
441
|
};
|
|
442
442
|
return /* @__PURE__ */ t(
|
|
443
|
-
|
|
443
|
+
f2,
|
|
444
444
|
{
|
|
445
445
|
iconName: "email",
|
|
446
446
|
placeholder: "Enter your email",
|
|
447
|
-
value:
|
|
448
|
-
onChange: (
|
|
447
|
+
value: p,
|
|
448
|
+
onChange: (w) => m(w.target.value),
|
|
449
449
|
type: "email",
|
|
450
450
|
autoCapitalize: "none",
|
|
451
451
|
autoComplete: "email",
|
|
452
|
-
disabled:
|
|
452
|
+
disabled: a,
|
|
453
453
|
variant: "listItemStyle",
|
|
454
|
-
onKeyDown: (
|
|
455
|
-
|
|
454
|
+
onKeyDown: (w) => {
|
|
455
|
+
w.key === "Enter" && p && !a && z();
|
|
456
456
|
},
|
|
457
457
|
children: u ? /* @__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: !
|
|
462
|
-
className: `zd:w-13 zd:h-13 zd:rounded-2xl zd:flex zd:items-center zd:justify-center zd:transition-colors ${
|
|
463
|
-
onClick: () =>
|
|
464
|
-
children: /* @__PURE__ */ t(
|
|
461
|
+
disabled: !j(p) || s,
|
|
462
|
+
className: `zd:w-13 zd:h-13 zd:rounded-2xl zd:flex zd:items-center zd:justify-center zd:transition-colors ${j(p) && !s ? "zd:cursor-pointer" : "zd:cursor-not-allowed zd:opacity-50"}`,
|
|
463
|
+
onClick: () => z(),
|
|
464
|
+
children: /* @__PURE__ */ t(Z, { 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 P(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 c2() {
|
|
474
|
+
const { goToStep: e } = F(), { authPending: n, guardAgreement: r, setError: a } = T(), { mutateAsync: i, isPending: s } = A2({
|
|
475
475
|
mutation: {
|
|
476
476
|
onSuccess: () => {
|
|
477
477
|
e("authenticated");
|
|
478
478
|
}
|
|
479
479
|
}
|
|
480
480
|
});
|
|
481
|
-
return
|
|
482
|
-
|
|
481
|
+
return L(s), /* @__PURE__ */ t(
|
|
482
|
+
M,
|
|
483
483
|
{
|
|
484
|
-
icon: /* @__PURE__ */ t(
|
|
484
|
+
icon: /* @__PURE__ */ t(t2, { name: "google" }),
|
|
485
485
|
title: "Google",
|
|
486
|
-
trailing: /* @__PURE__ */ t(
|
|
487
|
-
disabled:
|
|
486
|
+
trailing: /* @__PURE__ */ t(V, {}),
|
|
487
|
+
disabled: n,
|
|
488
488
|
onClick: async () => {
|
|
489
|
-
if (!
|
|
490
|
-
|
|
489
|
+
if (!n && r()) {
|
|
490
|
+
a(null);
|
|
491
491
|
try {
|
|
492
|
-
await
|
|
493
|
-
} catch (
|
|
494
|
-
|
|
492
|
+
await i({ provider: "google" });
|
|
493
|
+
} catch (o) {
|
|
494
|
+
P(o) || a(o instanceof Error ? o.message : String(o));
|
|
495
495
|
}
|
|
496
496
|
}
|
|
497
497
|
}
|
|
498
498
|
}
|
|
499
499
|
);
|
|
500
500
|
}
|
|
501
|
-
function
|
|
502
|
-
|
|
501
|
+
function G(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 te = [
|
|
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 = te;
|
|
583
|
+
function ne({
|
|
584
|
+
excludeWalletIds: e = [],
|
|
585
|
+
maxWallets: n = 4
|
|
586
|
+
}) {
|
|
587
|
+
const { goToStep: r } = F(), { authPending: a, guardAgreement: i, setError: s, registeredWallets: l } = T(), o = $(), { mutate: p, isPending: m } = q();
|
|
588
|
+
L(m);
|
|
589
|
+
const g = o.filter(
|
|
590
|
+
(h) => h.type === "injected" && h.id !== "injected" && h.id !== "zerodev-wallet"
|
|
591
|
+
).map((h) => {
|
|
592
|
+
const d = k.find((f) => G(h, f));
|
|
593
|
+
return {
|
|
594
|
+
connector: h,
|
|
595
|
+
walletId: d == null ? void 0 : d.id,
|
|
596
|
+
name: (d == null ? void 0 : d.name) ?? h.name,
|
|
597
|
+
icon: (d == null ? void 0 : d.icon) ?? h.icon,
|
|
598
|
+
ids: d ? [d.id, h.id] : [h.id],
|
|
599
|
+
rank: d ? k.indexOf(d) : k.length
|
|
600
|
+
};
|
|
601
|
+
}).filter(
|
|
602
|
+
(h) => !(h.walletId && l.includes(h.walletId))
|
|
603
|
+
).filter((h) => !h.ids.some((d) => e.includes(d))).sort((h, d) => h.rank - d.rank).slice(0, n), E = (h) => {
|
|
604
|
+
a || i() && (s(null), p(
|
|
605
|
+
{ connector: h },
|
|
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: () => r(null),
|
|
610
|
+
onError: (d) => {
|
|
611
|
+
P(d) || s(d instanceof Error ? d.message : String(d));
|
|
612
|
+
}
|
|
613
|
+
}
|
|
614
|
+
));
|
|
615
|
+
};
|
|
616
|
+
return /* @__PURE__ */ t(x, { children: g.map(({ connector: h, name: d, icon: f }) => /* @__PURE__ */ t(
|
|
617
|
+
M,
|
|
618
|
+
{
|
|
619
|
+
title: d,
|
|
620
|
+
icon: f ? /* @__PURE__ */ t("img", { src: f, alt: "", className: "zd:w-6 zd:h-6" }) : null,
|
|
621
|
+
subtitle: /* @__PURE__ */ t(n2, { text: "INSTALLED" }),
|
|
622
|
+
trailing: /* @__PURE__ */ t(V, {}),
|
|
623
|
+
disabled: a,
|
|
624
|
+
onClick: () => E(h)
|
|
625
|
+
},
|
|
626
|
+
h.uid
|
|
627
|
+
)) });
|
|
628
|
+
}
|
|
629
|
+
function ie({ tile: e }) {
|
|
630
|
+
return /* @__PURE__ */ c(
|
|
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
|
+
Z,
|
|
639
|
+
{
|
|
640
|
+
name: "walletOutline",
|
|
641
|
+
className: "zd:w-8 zd:h-8 zd:text-greyScale"
|
|
642
|
+
}
|
|
643
|
+
) }),
|
|
644
|
+
/* @__PURE__ */ t(D, { className: "zd:text-body3 zd:max-w-full zd:truncate", children: e.name })
|
|
645
|
+
]
|
|
646
|
+
}
|
|
647
|
+
);
|
|
648
|
+
}
|
|
649
|
+
function ae({
|
|
650
|
+
open: e,
|
|
651
|
+
onOpenChange: n,
|
|
652
|
+
tiles: r
|
|
653
|
+
}) {
|
|
654
|
+
return /* @__PURE__ */ t(m2, { open: e, onOpenChange: n, children: /* @__PURE__ */ c(g2, { className: "zd:p-4", children: [
|
|
655
|
+
/* @__PURE__ */ t(z2, { children: "All wallets" }),
|
|
656
|
+
/* @__PURE__ */ c("div", { className: "zd:mb-3 zd:flex zd:items-center zd:gap-2", children: [
|
|
657
|
+
/* @__PURE__ */ t(D, { className: "zd:text-h3 zd:flex-1", children: "All wallets" }),
|
|
658
|
+
/* @__PURE__ */ t(D2, { 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: r.map((a) => /* @__PURE__ */ t(ie, { tile: a }, a.key)) })
|
|
669
|
+
] }) });
|
|
670
|
+
}
|
|
671
|
+
function re({
|
|
672
|
+
title: e = "More wallets"
|
|
673
|
+
}) {
|
|
674
|
+
const { goToStep: n } = F(), { authPending: r, guardAgreement: a, setError: i } = T(), [s, l] = C(!1), o = $(), { mutate: p, isPending: m } = q();
|
|
675
|
+
L(m);
|
|
676
|
+
const g = o.filter(
|
|
677
|
+
(u) => u.id !== "zerodev-wallet" && u.type !== "walletConnect"
|
|
678
|
+
), E = (u) => {
|
|
679
|
+
r || a() && (l(!1), i(null), p(
|
|
680
|
+
{ connector: u },
|
|
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: (z) => {
|
|
686
|
+
P(z) || i(z instanceof Error ? z.message : String(z));
|
|
687
|
+
}
|
|
688
|
+
}
|
|
689
|
+
));
|
|
690
|
+
}, h = k.map((u) => {
|
|
691
|
+
const z = g.find((w) => G(w, u));
|
|
692
|
+
return {
|
|
693
|
+
key: u.id,
|
|
694
|
+
name: u.name,
|
|
695
|
+
icon: u.icon,
|
|
696
|
+
onSelect: () => {
|
|
697
|
+
if (z) {
|
|
698
|
+
E(z);
|
|
699
|
+
return;
|
|
700
|
+
}
|
|
701
|
+
l(!1), window.open(u.downloadUrl, "_blank", "noopener,noreferrer");
|
|
702
|
+
}
|
|
703
|
+
};
|
|
704
|
+
}), d = g.filter((u) => !k.some((z) => G(u, z))).map((u) => ({
|
|
705
|
+
key: u.uid,
|
|
706
|
+
name: u.name,
|
|
707
|
+
icon: u.icon,
|
|
708
|
+
onSelect: () => E(u)
|
|
709
|
+
}));
|
|
710
|
+
return /* @__PURE__ */ c(x, { children: [
|
|
711
|
+
/* @__PURE__ */ t(
|
|
712
|
+
M,
|
|
713
|
+
{
|
|
714
|
+
icon: /* @__PURE__ */ t(t2, { name: "walletOutline", className: "zd:w-5 zd:h-5" }),
|
|
715
|
+
title: e,
|
|
716
|
+
trailing: /* @__PURE__ */ t(V, {}),
|
|
717
|
+
disabled: r,
|
|
718
|
+
onClick: () => {
|
|
719
|
+
r || a() && l(!0);
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
),
|
|
723
|
+
/* @__PURE__ */ t(
|
|
724
|
+
ae,
|
|
725
|
+
{
|
|
726
|
+
open: s,
|
|
727
|
+
onOpenChange: l,
|
|
728
|
+
tiles: [...h, ...d]
|
|
729
|
+
}
|
|
730
|
+
)
|
|
731
|
+
] });
|
|
732
|
+
}
|
|
733
|
+
function u2() {
|
|
734
|
+
const { goToStep: e } = F(), { authPending: n, guardAgreement: r, setError: a } = T(), i = {
|
|
503
735
|
onSuccess: () => {
|
|
504
736
|
e("authenticated");
|
|
505
737
|
},
|
|
506
|
-
onError: (
|
|
507
|
-
|
|
738
|
+
onError: (g) => {
|
|
739
|
+
P(g) || a(g instanceof Error ? g.message : String(g));
|
|
508
740
|
}
|
|
509
|
-
}, { mutate:
|
|
510
|
-
mutation:
|
|
741
|
+
}, { mutate: s, isPending: l } = N2({ mutation: i }), { mutate: o, isPending: p } = k2({
|
|
742
|
+
mutation: i
|
|
511
743
|
});
|
|
512
|
-
|
|
513
|
-
const
|
|
514
|
-
|
|
744
|
+
L(l || p);
|
|
745
|
+
const m = (g) => () => {
|
|
746
|
+
n || r() && (a(null), g());
|
|
515
747
|
};
|
|
516
|
-
return /* @__PURE__ */
|
|
748
|
+
return /* @__PURE__ */ c(x, { 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(() => s())
|
|
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(() => o())
|
|
537
769
|
}
|
|
538
770
|
)
|
|
539
771
|
] });
|
|
540
772
|
}
|
|
541
|
-
function
|
|
773
|
+
function se({ walletId: e }) {
|
|
774
|
+
const n = k.find((f) => f.id === e);
|
|
775
|
+
if (!n)
|
|
776
|
+
throw new Error(
|
|
777
|
+
`Unknown walletId "${e}". Valid ids: ${k.map((f) => f.id).join(", ")}`
|
|
778
|
+
);
|
|
779
|
+
const { goToStep: r } = F(), { authPending: a, guardAgreement: i, setError: s, registerWallet: l } = T(), o = $(), { mutate: p, isPending: m } = q();
|
|
780
|
+
L(m), F2(() => l(n.id), [l, n.id]);
|
|
781
|
+
const g = o.find((f) => G(f, n)), E = !!n.rdns && o.some((f) => f.id === n.rdns), h = {
|
|
782
|
+
title: n.name,
|
|
783
|
+
icon: /* @__PURE__ */ t("img", { src: n.icon, alt: "", className: "zd:w-6 zd:h-6" }),
|
|
784
|
+
trailing: /* @__PURE__ */ t(V, {})
|
|
785
|
+
};
|
|
786
|
+
return g ? /* @__PURE__ */ t(
|
|
787
|
+
M,
|
|
788
|
+
{
|
|
789
|
+
...h,
|
|
790
|
+
...E && { subtitle: /* @__PURE__ */ t(n2, { text: "INSTALLED" }) },
|
|
791
|
+
disabled: a,
|
|
792
|
+
onClick: () => {
|
|
793
|
+
a || i() && (s(null), p(
|
|
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: () => r(null),
|
|
799
|
+
onError: (f) => {
|
|
800
|
+
P(f) || s(f instanceof Error ? f.message : String(f));
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
));
|
|
804
|
+
}
|
|
805
|
+
}
|
|
806
|
+
) : /* @__PURE__ */ t(M, { ...h, asChild: !0, children: /* @__PURE__ */ t(
|
|
807
|
+
"a",
|
|
808
|
+
{
|
|
809
|
+
href: n.downloadUrl,
|
|
810
|
+
target: "_blank",
|
|
811
|
+
rel: "noopener noreferrer"
|
|
812
|
+
}
|
|
813
|
+
) });
|
|
814
|
+
}
|
|
815
|
+
function p2({
|
|
542
816
|
children: e,
|
|
543
|
-
termsAndConditionsUrl:
|
|
544
|
-
privacyPolicyUrl:
|
|
545
|
-
emailAuthMethod:
|
|
817
|
+
termsAndConditionsUrl: n,
|
|
818
|
+
privacyPolicyUrl: r,
|
|
819
|
+
emailAuthMethod: a = "magicLink"
|
|
546
820
|
}) {
|
|
547
|
-
const [
|
|
548
|
-
|
|
549
|
-
|
|
821
|
+
const [i, s] = C(!1), [l, o] = C(!1), [p, m] = C(null), [g, E] = C(!1), [h, d] = C(
|
|
822
|
+
[]
|
|
823
|
+
), f = x2((y) => (d((b) => [...b, y]), () => {
|
|
824
|
+
d((b) => {
|
|
825
|
+
const v = [...b];
|
|
826
|
+
return v.splice(v.indexOf(y), 1), v;
|
|
827
|
+
});
|
|
828
|
+
}), []), z = !!(n || r) && !i, w = () => z ? (o(!0), !1) : !0;
|
|
829
|
+
return /* @__PURE__ */ c(
|
|
830
|
+
o2.Provider,
|
|
550
831
|
{
|
|
551
832
|
value: {
|
|
552
|
-
authPending:
|
|
553
|
-
emailAuthMethod:
|
|
554
|
-
setAuthPending:
|
|
555
|
-
needsAgreement:
|
|
556
|
-
guardAgreement:
|
|
557
|
-
setError:
|
|
833
|
+
authPending: g,
|
|
834
|
+
emailAuthMethod: a,
|
|
835
|
+
setAuthPending: E,
|
|
836
|
+
needsAgreement: z,
|
|
837
|
+
guardAgreement: w,
|
|
838
|
+
setError: m,
|
|
839
|
+
registeredWallets: h,
|
|
840
|
+
registerWallet: f
|
|
558
841
|
},
|
|
559
842
|
children: [
|
|
560
|
-
|
|
561
|
-
/* @__PURE__ */ t(
|
|
562
|
-
/* @__PURE__ */ t(
|
|
843
|
+
p !== null && /* @__PURE__ */ t("div", { className: "zd:flex zd:items-center zd:justify-center zd:h-full zd:min-h-100", children: /* @__PURE__ */ c("div", { className: "zd:flex zd:flex-col zd:gap-4 zd:max-w-md", children: [
|
|
844
|
+
/* @__PURE__ */ t(D, { className: "zd:text-h2 zd:text-center", children: "Error occurred" }),
|
|
845
|
+
/* @__PURE__ */ t(D, { className: "zd:text-center zd:text-red-500", children: p }),
|
|
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__ */ c(
|
|
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${p !== 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__ */ c("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:justify-center", children: [
|
|
861
|
+
/* @__PURE__ */ c("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(Q2, { className: "zd:w-full zd:pointer-events-none zd:select-none" }) }),
|
|
863
|
+
/* @__PURE__ */ t(D, { className: "zd:text-h2 zd:text-center", children: "Continue to your wallet" }),
|
|
864
|
+
/* @__PURE__ */ t(D, { 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
|
+
J2,
|
|
587
870
|
{
|
|
588
|
-
termsAndConditionsUrl:
|
|
589
|
-
privacyPolicyUrl:
|
|
590
|
-
agreedToTerms:
|
|
591
|
-
setAgreedToTerms: (
|
|
592
|
-
|
|
871
|
+
termsAndConditionsUrl: n,
|
|
872
|
+
privacyPolicyUrl: r,
|
|
873
|
+
agreedToTerms: i,
|
|
874
|
+
setAgreedToTerms: (y) => {
|
|
875
|
+
s(y), y && o(!1);
|
|
593
876
|
},
|
|
594
|
-
highlight:
|
|
877
|
+
highlight: l
|
|
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 h2({ label: e = "or" }) {
|
|
888
|
+
return /* @__PURE__ */ c("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(D, { 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 le(e) {
|
|
895
|
+
return /* @__PURE__ */ c(p2, { ...e, children: [
|
|
896
|
+
/* @__PURE__ */ t(u2, {}),
|
|
897
|
+
/* @__PURE__ */ t(h2, {}),
|
|
898
|
+
/* @__PURE__ */ t(c2, {}),
|
|
899
|
+
/* @__PURE__ */ t(d2, {})
|
|
617
900
|
] });
|
|
618
901
|
}
|
|
619
|
-
const
|
|
620
|
-
Default:
|
|
621
|
-
Passkey:
|
|
622
|
-
Google:
|
|
623
|
-
Email:
|
|
624
|
-
|
|
902
|
+
const oe = Object.assign(p2, {
|
|
903
|
+
Default: le,
|
|
904
|
+
Passkey: u2,
|
|
905
|
+
Google: c2,
|
|
906
|
+
Email: d2,
|
|
907
|
+
Wallet: se,
|
|
908
|
+
InstalledWallets: ne,
|
|
909
|
+
MoreWallets: re,
|
|
910
|
+
Divider: h2
|
|
625
911
|
});
|
|
626
|
-
function
|
|
912
|
+
function de() {
|
|
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 ce() {
|
|
916
|
+
const { otpId: e, otpEncryptionTargetBundle: n, goToStep: r, clearOtpSession: a } = F(), [i] = C(de), [s, l] = C(null), o = r2(!1), { mutate: p, isPending: m } = U2({
|
|
631
917
|
mutation: {
|
|
632
918
|
onSuccess: () => {
|
|
633
|
-
|
|
919
|
+
a(), r("authenticated");
|
|
634
920
|
},
|
|
635
|
-
onError: (
|
|
636
|
-
|
|
921
|
+
onError: (g) => {
|
|
922
|
+
l(g);
|
|
637
923
|
}
|
|
638
924
|
}
|
|
639
925
|
});
|
|
640
|
-
return
|
|
641
|
-
if (!(
|
|
642
|
-
if (
|
|
643
|
-
|
|
926
|
+
return U(() => {
|
|
927
|
+
if (!(o.current || !i)) {
|
|
928
|
+
if (o.current = !0, !e || !n) {
|
|
929
|
+
I(), r(null);
|
|
644
930
|
return;
|
|
645
931
|
}
|
|
646
|
-
|
|
932
|
+
p({ otpId: e, code: i, otpEncryptionTargetBundle: n });
|
|
647
933
|
}
|
|
648
|
-
}, [e,
|
|
649
|
-
/* @__PURE__ */
|
|
650
|
-
!
|
|
651
|
-
!
|
|
652
|
-
/* @__PURE__ */
|
|
934
|
+
}, [e, n, i, p, r]), /* @__PURE__ */ c(x, { children: [
|
|
935
|
+
/* @__PURE__ */ c("div", { className: "zd:flex-1 zd:flex zd:flex-col zd:gap-8 zd:items-center zd:justify-center", children: [
|
|
936
|
+
!s && m && /* @__PURE__ */ t(N, { imageName: "loading", title: "Verifying Your Email", children: "Please wait while we securely connect your wallet." }),
|
|
937
|
+
!s && !i && !m && /* @__PURE__ */ c(x, { children: [
|
|
938
|
+
/* @__PURE__ */ c(N, { 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
|
+
I(), r("sign-up");
|
|
663
949
|
},
|
|
664
950
|
text: "Choose another sign-in method"
|
|
665
951
|
}
|
|
666
952
|
)
|
|
667
953
|
] }),
|
|
668
|
-
|
|
669
|
-
/* @__PURE__ */ t(
|
|
954
|
+
s != null && /* @__PURE__ */ c(x, { children: [
|
|
955
|
+
/* @__PURE__ */ t(N, { 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
|
+
I(), r("sign-up");
|
|
676
962
|
},
|
|
677
963
|
text: "Choose another sign-in method"
|
|
678
964
|
}
|
|
679
965
|
)
|
|
680
966
|
] })
|
|
681
967
|
] }),
|
|
682
|
-
/* @__PURE__ */ t(
|
|
683
|
-
] });
|
|
684
|
-
}
|
|
685
|
-
function De() {
|
|
686
|
-
const { goToStep: e } = S(), { connect: r, connectors: s, isPending: i } = ce(), n = s.filter((o) => o.id !== "zerodev-wallet"), a = (o) => {
|
|
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" })
|
|
968
|
+
/* @__PURE__ */ t(H, { className: "zd:self-center zd:pt-4 zd:pb-6" })
|
|
719
969
|
] });
|
|
720
970
|
}
|
|
721
|
-
|
|
722
|
-
"
|
|
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 ue() {
|
|
972
|
+
return /* @__PURE__ */ t("div", { className: "zd:flex zd:flex-1 zd:items-center zd:justify-center", children: /* @__PURE__ */ t(N, { 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 pe() {
|
|
975
|
+
return /* @__PURE__ */ t("div", { className: "zd:flex zd:flex-1 zd:items-center zd:justify-center", children: /* @__PURE__ */ t(N, { imageName: "loading", title: "Passkey authentication", children: "Please authenticate with your passkey." }) });
|
|
729
976
|
}
|
|
730
|
-
function
|
|
977
|
+
function he(e, n) {
|
|
731
978
|
switch (e) {
|
|
732
979
|
case "sign-up":
|
|
733
|
-
return
|
|
980
|
+
return n ? n() : /* @__PURE__ */ t(oe.Default, {});
|
|
734
981
|
case "email-verification":
|
|
735
|
-
return /* @__PURE__ */ t(
|
|
982
|
+
return /* @__PURE__ */ t(B2, {});
|
|
736
983
|
case "otp-input":
|
|
737
|
-
return /* @__PURE__ */ t(
|
|
984
|
+
return /* @__PURE__ */ t(Y2, {});
|
|
738
985
|
case "verifying-otp":
|
|
739
|
-
return /* @__PURE__ */ t(
|
|
986
|
+
return /* @__PURE__ */ t(ce, {});
|
|
740
987
|
case "oauth-in-progress":
|
|
741
|
-
return /* @__PURE__ */ t(
|
|
988
|
+
return /* @__PURE__ */ t(ue, {});
|
|
742
989
|
case "passkey-prompt":
|
|
743
|
-
return /* @__PURE__ */ t(
|
|
744
|
-
case "wallet-selection":
|
|
745
|
-
return /* @__PURE__ */ t(De, {});
|
|
990
|
+
return /* @__PURE__ */ t(pe, {});
|
|
746
991
|
case "error":
|
|
747
|
-
return /* @__PURE__ */ t(
|
|
992
|
+
return /* @__PURE__ */ t(G2, {});
|
|
748
993
|
default:
|
|
749
994
|
return null;
|
|
750
995
|
}
|
|
751
996
|
}
|
|
752
|
-
function
|
|
997
|
+
function _e({
|
|
753
998
|
onClose: e,
|
|
754
|
-
size:
|
|
755
|
-
renderSignUp:
|
|
756
|
-
logo:
|
|
999
|
+
size: n,
|
|
1000
|
+
renderSignUp: r,
|
|
1001
|
+
logo: a
|
|
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: s, goBack: l, reset: o } = F();
|
|
1004
|
+
U(() => {
|
|
1005
|
+
i === null && Z2() && s("verifying-otp");
|
|
1006
|
+
}, [i, s]);
|
|
1007
|
+
const p = he(i, r);
|
|
1008
|
+
return p ? /* @__PURE__ */ t(
|
|
1009
|
+
i2,
|
|
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
|
+
a2,
|
|
775
1015
|
{
|
|
776
|
-
...
|
|
777
|
-
onRightButtonClick:
|
|
778
|
-
|
|
779
|
-
|
|
780
|
-
|
|
1016
|
+
...l !== null && { onLeftButtonClick: l },
|
|
1017
|
+
onRightButtonClick: () => {
|
|
1018
|
+
I(), o(), e == null || e();
|
|
1019
|
+
},
|
|
1020
|
+
...i === "sign-up" && {
|
|
1021
|
+
...a && { logo: a },
|
|
781
1022
|
className: "zd:px-4"
|
|
782
1023
|
}
|
|
783
1024
|
}
|
|
784
1025
|
),
|
|
785
|
-
children:
|
|
1026
|
+
children: p
|
|
786
1027
|
}
|
|
787
|
-
);
|
|
1028
|
+
) : null;
|
|
788
1029
|
}
|
|
789
|
-
const
|
|
790
|
-
function
|
|
1030
|
+
const K = "zerodev:auth:otpSession";
|
|
1031
|
+
function fe() {
|
|
791
1032
|
if (typeof window > "u") return null;
|
|
792
1033
|
try {
|
|
793
|
-
const e = window.localStorage.getItem(
|
|
1034
|
+
const e = window.localStorage.getItem(K);
|
|
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 me(e) {
|
|
802
1043
|
if (!(typeof window > "u"))
|
|
803
1044
|
try {
|
|
804
1045
|
window.localStorage.setItem(
|
|
805
|
-
|
|
1046
|
+
K,
|
|
806
1047
|
JSON.stringify(e)
|
|
807
1048
|
);
|
|
808
1049
|
} catch {
|
|
809
1050
|
}
|
|
810
1051
|
}
|
|
811
|
-
function
|
|
1052
|
+
function Y() {
|
|
812
1053
|
if (!(typeof window > "u"))
|
|
813
1054
|
try {
|
|
814
|
-
window.localStorage.removeItem(
|
|
1055
|
+
window.localStorage.removeItem(K);
|
|
815
1056
|
} catch {
|
|
816
1057
|
}
|
|
817
1058
|
}
|
|
818
|
-
const
|
|
1059
|
+
const ge = (e, n, r) => ({
|
|
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 a = fe();
|
|
1070
|
+
a && e((i) => ({
|
|
830
1071
|
auth: {
|
|
831
|
-
...
|
|
832
|
-
otpId:
|
|
833
|
-
otpEncryptionTargetBundle:
|
|
1072
|
+
...i.auth,
|
|
1073
|
+
otpId: a.otpId,
|
|
1074
|
+
otpEncryptionTargetBundle: a.otpEncryptionTargetBundle
|
|
834
1075
|
}
|
|
835
1076
|
}));
|
|
836
1077
|
},
|
|
837
|
-
goToStep: (
|
|
838
|
-
e((
|
|
1078
|
+
goToStep: (a) => {
|
|
1079
|
+
e((i) => ({
|
|
839
1080
|
auth: {
|
|
840
|
-
...
|
|
841
|
-
step:
|
|
842
|
-
stepHistory:
|
|
1081
|
+
...i.auth,
|
|
1082
|
+
step: a,
|
|
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: a } = n();
|
|
1089
|
+
if (a.stepHistory.length === 0) return;
|
|
1090
|
+
const i = [...a.stepHistory], s = i.pop();
|
|
1091
|
+
e((l) => ({
|
|
851
1092
|
auth: {
|
|
852
|
-
...
|
|
853
|
-
step:
|
|
854
|
-
stepHistory:
|
|
1093
|
+
...l.auth,
|
|
1094
|
+
step: s,
|
|
1095
|
+
stepHistory: i
|
|
855
1096
|
}
|
|
856
1097
|
}));
|
|
857
1098
|
},
|
|
858
1099
|
reset: () => {
|
|
859
|
-
|
|
1100
|
+
Y(), e((a) => ({
|
|
860
1101
|
auth: {
|
|
861
|
-
...
|
|
1102
|
+
...a.auth,
|
|
862
1103
|
step: null,
|
|
863
1104
|
stepHistory: [],
|
|
864
1105
|
email: null,
|
|
@@ -867,93 +1108,343 @@ const Ye = (e, r, s) => ({
|
|
|
867
1108
|
}
|
|
868
1109
|
}));
|
|
869
1110
|
},
|
|
870
|
-
setEmail: (
|
|
871
|
-
e((
|
|
1111
|
+
setEmail: (a) => {
|
|
1112
|
+
e((i) => ({
|
|
872
1113
|
auth: {
|
|
873
|
-
...
|
|
874
|
-
email:
|
|
1114
|
+
...i.auth,
|
|
1115
|
+
email: a
|
|
875
1116
|
}
|
|
876
1117
|
}));
|
|
877
1118
|
},
|
|
878
|
-
setOtpSession: ({ otpId:
|
|
879
|
-
|
|
1119
|
+
setOtpSession: ({ otpId: a, otpEncryptionTargetBundle: i }) => {
|
|
1120
|
+
me({ otpId: a, otpEncryptionTargetBundle: i }), e((s) => ({
|
|
880
1121
|
auth: {
|
|
881
|
-
...
|
|
882
|
-
otpId:
|
|
883
|
-
otpEncryptionTargetBundle:
|
|
1122
|
+
...s.auth,
|
|
1123
|
+
otpId: a,
|
|
1124
|
+
otpEncryptionTargetBundle: i
|
|
884
1125
|
}
|
|
885
1126
|
}));
|
|
886
1127
|
},
|
|
887
1128
|
clearOtpSession: () => {
|
|
888
|
-
|
|
1129
|
+
Y(), e((a) => ({
|
|
889
1130
|
auth: {
|
|
890
|
-
...
|
|
1131
|
+
...a.auth,
|
|
891
1132
|
otpId: null,
|
|
892
1133
|
otpEncryptionTargetBundle: null
|
|
893
1134
|
}
|
|
894
1135
|
}));
|
|
895
1136
|
}
|
|
896
1137
|
}
|
|
897
|
-
}),
|
|
898
|
-
|
|
1138
|
+
}), ze = () => v2()(
|
|
1139
|
+
L2((e, n, r) => ({
|
|
899
1140
|
pendingRequests: [],
|
|
900
1141
|
userConfirmationListenerActive: !1,
|
|
901
|
-
addPendingRequest: (
|
|
902
|
-
pendingRequests: [...
|
|
1142
|
+
addPendingRequest: (a) => e((i) => ({
|
|
1143
|
+
pendingRequests: [...i.pendingRequests, a]
|
|
903
1144
|
})),
|
|
904
|
-
removePendingRequest: (
|
|
905
|
-
pendingRequests:
|
|
1145
|
+
removePendingRequest: (a) => e((i) => ({
|
|
1146
|
+
pendingRequests: i.pendingRequests.filter((s) => s.id !== a)
|
|
906
1147
|
})),
|
|
907
1148
|
clearPendingRequests: () => e({ pendingRequests: [] }),
|
|
908
|
-
setUserConfirmationListenerActive: (
|
|
909
|
-
...
|
|
1149
|
+
setUserConfirmationListenerActive: (a) => e({ userConfirmationListenerActive: a }),
|
|
1150
|
+
...ge(e, n)
|
|
910
1151
|
}))
|
|
911
1152
|
);
|
|
912
|
-
function
|
|
913
|
-
return new Promise((
|
|
914
|
-
const
|
|
915
|
-
(
|
|
916
|
-
(
|
|
917
|
-
|
|
1153
|
+
function De(e) {
|
|
1154
|
+
return new Promise((n, r) => {
|
|
1155
|
+
const a = e.subscribe(
|
|
1156
|
+
(i) => i.auth.step,
|
|
1157
|
+
(i) => {
|
|
1158
|
+
i === "authenticated" ? (a(), n()) : i === null && (a(), r(new Error("Auth flow dismissed")));
|
|
918
1159
|
}
|
|
919
1160
|
);
|
|
920
1161
|
});
|
|
921
1162
|
}
|
|
922
|
-
function
|
|
923
|
-
const
|
|
924
|
-
return (
|
|
925
|
-
const
|
|
1163
|
+
function Le(e) {
|
|
1164
|
+
const n = T2(e), r = ze();
|
|
1165
|
+
return (a) => {
|
|
1166
|
+
const i = n(a);
|
|
926
1167
|
return {
|
|
927
|
-
...
|
|
928
|
-
async connect(
|
|
1168
|
+
...i,
|
|
1169
|
+
async connect(s) {
|
|
929
1170
|
try {
|
|
930
|
-
return await
|
|
931
|
-
} catch (
|
|
932
|
-
if (
|
|
933
|
-
throw
|
|
934
|
-
if (
|
|
1171
|
+
return await i.connect(s);
|
|
1172
|
+
} catch (l) {
|
|
1173
|
+
if (s != null && s.isReconnecting || !(l instanceof _2))
|
|
1174
|
+
throw l;
|
|
1175
|
+
if (r.getState().auth.step !== null)
|
|
935
1176
|
throw new Error("Auth flow already in progress");
|
|
936
|
-
return
|
|
1177
|
+
return r.getState().auth.goToStep("sign-up"), await De(r), i.connect(s);
|
|
937
1178
|
}
|
|
938
1179
|
},
|
|
939
1180
|
async disconnect() {
|
|
940
|
-
var
|
|
941
|
-
await ((
|
|
1181
|
+
var s;
|
|
1182
|
+
await ((s = i.disconnect) == null ? void 0 : s.call(i)), r.getState().auth.reset();
|
|
942
1183
|
},
|
|
943
1184
|
async setup() {
|
|
944
|
-
var
|
|
945
|
-
await ((
|
|
1185
|
+
var s;
|
|
1186
|
+
await ((s = i.setup) == null ? void 0 : s.call(i)), !(typeof window > "u") && r.getState().auth.initialize();
|
|
946
1187
|
},
|
|
947
1188
|
getKitStore() {
|
|
948
|
-
return
|
|
1189
|
+
return r;
|
|
949
1190
|
}
|
|
950
1191
|
};
|
|
951
1192
|
};
|
|
952
1193
|
}
|
|
1194
|
+
const we = {
|
|
1195
|
+
Pending: "zd:text-solarOrange",
|
|
1196
|
+
Success: "zd:text-positive",
|
|
1197
|
+
Failed: "zd:text-negative"
|
|
1198
|
+
};
|
|
1199
|
+
function Ce({
|
|
1200
|
+
icon: e,
|
|
1201
|
+
title: n,
|
|
1202
|
+
value: r,
|
|
1203
|
+
chainName: a,
|
|
1204
|
+
chainIconUrl: i,
|
|
1205
|
+
destChainName: s,
|
|
1206
|
+
destChainIconUrl: l,
|
|
1207
|
+
status: o,
|
|
1208
|
+
className: p
|
|
1209
|
+
}) {
|
|
1210
|
+
return /* @__PURE__ */ c(
|
|
1211
|
+
"div",
|
|
1212
|
+
{
|
|
1213
|
+
className: B(
|
|
1214
|
+
"zd:flex zd:w-full zd:items-center zd:gap-2 zd:p-2",
|
|
1215
|
+
p
|
|
1216
|
+
),
|
|
1217
|
+
children: [
|
|
1218
|
+
/* @__PURE__ */ t("div", { className: "zd:flex zd:size-11 zd:shrink-0 zd:items-center zd:justify-center zd:rounded-xl zd:bg-white", children: /* @__PURE__ */ t(Z, { name: e, className: "zd:size-5" }) }),
|
|
1219
|
+
/* @__PURE__ */ c("div", { className: "zd:flex zd:min-w-0 zd:flex-1 zd:flex-col zd:gap-2", children: [
|
|
1220
|
+
/* @__PURE__ */ c("div", { className: "zd:flex zd:w-full zd:items-center zd:justify-between zd:gap-2", children: [
|
|
1221
|
+
/* @__PURE__ */ t(D, { className: "zd:shrink-0 zd:whitespace-nowrap zd:text-body1", children: n }),
|
|
1222
|
+
/* @__PURE__ */ t(D, { className: "zd:min-w-0 zd:truncate zd:text-right zd:text-body1", children: r })
|
|
1223
|
+
] }),
|
|
1224
|
+
/* @__PURE__ */ c("div", { className: "zd:flex zd:w-full zd:items-center zd:justify-between zd:gap-2", children: [
|
|
1225
|
+
/* @__PURE__ */ c("div", { className: "zd:flex zd:min-w-0 zd:items-center zd:gap-2", children: [
|
|
1226
|
+
/* @__PURE__ */ t(
|
|
1227
|
+
J,
|
|
1228
|
+
{
|
|
1229
|
+
name: a,
|
|
1230
|
+
...i && { iconUrl: i }
|
|
1231
|
+
}
|
|
1232
|
+
),
|
|
1233
|
+
s && /* @__PURE__ */ c(x, { children: [
|
|
1234
|
+
/* @__PURE__ */ t(
|
|
1235
|
+
Z,
|
|
1236
|
+
{
|
|
1237
|
+
name: "arrowRightFill",
|
|
1238
|
+
"aria-hidden": !0,
|
|
1239
|
+
className: "zd:size-3 zd:shrink-0 zd:opacity-30"
|
|
1240
|
+
}
|
|
1241
|
+
),
|
|
1242
|
+
/* @__PURE__ */ t(
|
|
1243
|
+
J,
|
|
1244
|
+
{
|
|
1245
|
+
name: s,
|
|
1246
|
+
...l && { iconUrl: l }
|
|
1247
|
+
}
|
|
1248
|
+
)
|
|
1249
|
+
] })
|
|
1250
|
+
] }),
|
|
1251
|
+
/* @__PURE__ */ t(
|
|
1252
|
+
D,
|
|
1253
|
+
{
|
|
1254
|
+
className: B("zd:shrink-0 zd:text-body3", we[o]),
|
|
1255
|
+
children: o
|
|
1256
|
+
}
|
|
1257
|
+
)
|
|
1258
|
+
] })
|
|
1259
|
+
] })
|
|
1260
|
+
]
|
|
1261
|
+
}
|
|
1262
|
+
);
|
|
1263
|
+
}
|
|
1264
|
+
function J({ name: e, iconUrl: n }) {
|
|
1265
|
+
return /* @__PURE__ */ c("div", { className: "zd:flex zd:min-w-0 zd:items-center zd:gap-[5px]", children: [
|
|
1266
|
+
n && /* @__PURE__ */ t("span", { className: "zd:size-3 zd:shrink-0 zd:overflow-hidden zd:rounded-full zd:bg-white", children: /* @__PURE__ */ t(
|
|
1267
|
+
"img",
|
|
1268
|
+
{
|
|
1269
|
+
src: n,
|
|
1270
|
+
alt: "",
|
|
1271
|
+
"aria-hidden": !0,
|
|
1272
|
+
className: "zd:size-full zd:object-cover"
|
|
1273
|
+
}
|
|
1274
|
+
) }),
|
|
1275
|
+
/* @__PURE__ */ t(D, { className: "zd:truncate zd:text-body3", children: e })
|
|
1276
|
+
] });
|
|
1277
|
+
}
|
|
1278
|
+
const _ = "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/arbitrum/info/logo.png", X = "https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/base/info/logo.png", A = 3600 * 1e3, Ee = [
|
|
1279
|
+
{
|
|
1280
|
+
id: "mock-1",
|
|
1281
|
+
icon: "arrowSwapHorizontalOutline",
|
|
1282
|
+
title: "Swapped ETH → USD₮0",
|
|
1283
|
+
value: "2,343 ETH",
|
|
1284
|
+
chainName: "Arbitrum One",
|
|
1285
|
+
chainIconUrl: _,
|
|
1286
|
+
destChainName: "Base",
|
|
1287
|
+
destChainIconUrl: X,
|
|
1288
|
+
status: "Pending",
|
|
1289
|
+
timestamp: Date.now() - 1 * A
|
|
1290
|
+
},
|
|
1291
|
+
{
|
|
1292
|
+
id: "mock-2",
|
|
1293
|
+
icon: "arrowSwapHorizontalOutline",
|
|
1294
|
+
title: "Swapped ETH → USD₮0",
|
|
1295
|
+
value: "2,343 ETH",
|
|
1296
|
+
chainName: "Arbitrum One",
|
|
1297
|
+
chainIconUrl: _,
|
|
1298
|
+
destChainName: "Base",
|
|
1299
|
+
destChainIconUrl: X,
|
|
1300
|
+
status: "Pending",
|
|
1301
|
+
timestamp: Date.now() - 2 * A
|
|
1302
|
+
},
|
|
1303
|
+
{
|
|
1304
|
+
id: "mock-3",
|
|
1305
|
+
icon: "lighting",
|
|
1306
|
+
title: "Fixed Yield",
|
|
1307
|
+
value: "2,323 PT wstETH (25 Jan 2026)",
|
|
1308
|
+
chainName: "Arbitrum One",
|
|
1309
|
+
chainIconUrl: _,
|
|
1310
|
+
status: "Success",
|
|
1311
|
+
timestamp: Date.now() - 3 * A
|
|
1312
|
+
},
|
|
1313
|
+
{
|
|
1314
|
+
id: "mock-4",
|
|
1315
|
+
icon: "imageFill",
|
|
1316
|
+
title: "Received NFT",
|
|
1317
|
+
value: "Bored Ape Yacht Club",
|
|
1318
|
+
chainName: "Arbitrum One",
|
|
1319
|
+
chainIconUrl: _,
|
|
1320
|
+
status: "Success",
|
|
1321
|
+
timestamp: Date.now() - 4 * A
|
|
1322
|
+
},
|
|
1323
|
+
{
|
|
1324
|
+
id: "mock-5",
|
|
1325
|
+
icon: "lighting",
|
|
1326
|
+
title: "Collateral Used",
|
|
1327
|
+
value: "Collateralization enabled for USD₮0",
|
|
1328
|
+
chainName: "Arbitrum One",
|
|
1329
|
+
chainIconUrl: _,
|
|
1330
|
+
status: "Success",
|
|
1331
|
+
timestamp: Date.now() - 336 * A
|
|
1332
|
+
},
|
|
1333
|
+
{
|
|
1334
|
+
id: "mock-6",
|
|
1335
|
+
icon: "lighting",
|
|
1336
|
+
title: "Liquid Staked ETH",
|
|
1337
|
+
value: "2,323 PT wstETH (25 Jan 2026)",
|
|
1338
|
+
chainName: "Arbitrum One",
|
|
1339
|
+
chainIconUrl: _,
|
|
1340
|
+
status: "Success",
|
|
1341
|
+
timestamp: Date.now() - 336 * A - 1 * A
|
|
1342
|
+
}
|
|
1343
|
+
];
|
|
1344
|
+
function R(e) {
|
|
1345
|
+
const n = new Date(e);
|
|
1346
|
+
return `${n.getFullYear()}-${n.getMonth()}-${n.getDate()}`;
|
|
1347
|
+
}
|
|
1348
|
+
function Fe(e, n) {
|
|
1349
|
+
const r = R(e);
|
|
1350
|
+
return r === R(n) ? "Today" : r === R(n - 1440 * 60 * 1e3) ? "Yesterday" : new Intl.DateTimeFormat("en-US", {
|
|
1351
|
+
month: "long",
|
|
1352
|
+
day: "numeric",
|
|
1353
|
+
year: "numeric"
|
|
1354
|
+
}).format(new Date(e));
|
|
1355
|
+
}
|
|
1356
|
+
function xe(e, n = Date.now()) {
|
|
1357
|
+
var s;
|
|
1358
|
+
const r = [...e].sort((l, o) => o.timestamp - l.timestamp), a = [];
|
|
1359
|
+
let i = null;
|
|
1360
|
+
for (const l of r) {
|
|
1361
|
+
const o = R(l.timestamp);
|
|
1362
|
+
o !== i && (i = o, a.push({ label: Fe(l.timestamp, n), entries: [] })), (s = a[a.length - 1]) == null || s.entries.push(l);
|
|
1363
|
+
}
|
|
1364
|
+
return a;
|
|
1365
|
+
}
|
|
1366
|
+
function ye({
|
|
1367
|
+
entries: e = Ee,
|
|
1368
|
+
onSelectEntry: n
|
|
1369
|
+
}) {
|
|
1370
|
+
const r = xe(e);
|
|
1371
|
+
return /* @__PURE__ */ t("div", { className: "zd:flex zd:h-full zd:w-full zd:flex-col zd:gap-1 zd:pt-2 zd:pb-4", children: /* @__PURE__ */ t(
|
|
1372
|
+
e2,
|
|
1373
|
+
{
|
|
1374
|
+
variant: "ghost",
|
|
1375
|
+
className: "zd:flex zd:w-full zd:flex-1 zd:flex-col zd:gap-1 zd:overflow-y-auto zd:rounded-2xl zd:p-2",
|
|
1376
|
+
children: r.map((a) => /* @__PURE__ */ c(y2, { children: [
|
|
1377
|
+
/* @__PURE__ */ t("div", { className: "zd:flex zd:w-full zd:items-center zd:py-2 zd:pr-2", children: /* @__PURE__ */ t(D, { className: "zd:text-body3", children: a.label }) }),
|
|
1378
|
+
a.entries.map(
|
|
1379
|
+
(i) => n ? /* @__PURE__ */ t(
|
|
1380
|
+
"button",
|
|
1381
|
+
{
|
|
1382
|
+
type: "button",
|
|
1383
|
+
onClick: () => n(i),
|
|
1384
|
+
className: "zd:w-full zd:cursor-pointer zd:text-left",
|
|
1385
|
+
children: /* @__PURE__ */ t(Q, { entry: i })
|
|
1386
|
+
},
|
|
1387
|
+
i.id
|
|
1388
|
+
) : /* @__PURE__ */ t(Q, { entry: i }, i.id)
|
|
1389
|
+
)
|
|
1390
|
+
] }, a.label))
|
|
1391
|
+
}
|
|
1392
|
+
) });
|
|
1393
|
+
}
|
|
1394
|
+
function Q({ entry: e }) {
|
|
1395
|
+
return /* @__PURE__ */ t(
|
|
1396
|
+
Ce,
|
|
1397
|
+
{
|
|
1398
|
+
icon: e.icon,
|
|
1399
|
+
title: e.title,
|
|
1400
|
+
value: e.value,
|
|
1401
|
+
chainName: e.chainName,
|
|
1402
|
+
...e.chainIconUrl && { chainIconUrl: e.chainIconUrl },
|
|
1403
|
+
...e.destChainName && { destChainName: e.destChainName },
|
|
1404
|
+
...e.destChainIconUrl && {
|
|
1405
|
+
destChainIconUrl: e.destChainIconUrl
|
|
1406
|
+
},
|
|
1407
|
+
status: e.status
|
|
1408
|
+
}
|
|
1409
|
+
);
|
|
1410
|
+
}
|
|
1411
|
+
const ve = {
|
|
1412
|
+
history: "History"
|
|
1413
|
+
};
|
|
1414
|
+
function Oe({
|
|
1415
|
+
onClose: e,
|
|
1416
|
+
entries: n,
|
|
1417
|
+
onSelectEntry: r,
|
|
1418
|
+
className: a,
|
|
1419
|
+
size: i
|
|
1420
|
+
}) {
|
|
1421
|
+
const [s] = C("history"), l = () => {
|
|
1422
|
+
switch (s) {
|
|
1423
|
+
case "history":
|
|
1424
|
+
return /* @__PURE__ */ t(
|
|
1425
|
+
ye,
|
|
1426
|
+
{
|
|
1427
|
+
...n && { entries: n },
|
|
1428
|
+
...r && { onSelectEntry: r }
|
|
1429
|
+
}
|
|
1430
|
+
);
|
|
1431
|
+
}
|
|
1432
|
+
};
|
|
1433
|
+
return /* @__PURE__ */ t(
|
|
1434
|
+
i2,
|
|
1435
|
+
{
|
|
1436
|
+
...a && { className: a },
|
|
1437
|
+
...i && { size: i },
|
|
1438
|
+
topNav: /* @__PURE__ */ t(a2, { title: ve[s], onRightButtonClick: e }),
|
|
1439
|
+
children: l()
|
|
1440
|
+
}
|
|
1441
|
+
);
|
|
1442
|
+
}
|
|
953
1443
|
export {
|
|
954
|
-
|
|
955
|
-
|
|
956
|
-
|
|
957
|
-
|
|
1444
|
+
_e as ConnectWallet,
|
|
1445
|
+
oe as SignUp,
|
|
1446
|
+
Oe as TxHistory,
|
|
1447
|
+
F as useAuth,
|
|
1448
|
+
Le as zeroDevWallet
|
|
958
1449
|
};
|
|
959
1450
|
//# sourceMappingURL=index.mjs.map
|