@b3dotfun/sdk 0.0.30-alpha.5 → 0.0.30-alpha.6
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/global-account/react/components/LinkAccount/LinkAccount.js +1 -0
- package/dist/cjs/global-account/react/utils/profileDisplay.js +9 -0
- package/dist/esm/global-account/react/components/LinkAccount/LinkAccount.js +1 -0
- package/dist/esm/global-account/react/utils/profileDisplay.js +9 -0
- package/package.json +1 -1
- package/src/global-account/react/components/LinkAccount/LinkAccount.tsx +2 -1
- package/src/global-account/react/utils/profileDisplay.ts +9 -0
|
@@ -20,6 +20,7 @@ const AUTH_METHODS = [
|
|
|
20
20
|
{ id: "x", label: "X (Twitter)", enabled: true },
|
|
21
21
|
{ id: "discord", label: "Discord", enabled: true },
|
|
22
22
|
{ id: "apple", label: "Apple", enabled: true },
|
|
23
|
+
{ id: "farcaster", label: "Farcaster", enabled: true },
|
|
23
24
|
];
|
|
24
25
|
function LinkAccount({ onSuccess: onSuccessCallback, onError, onClose, chain, partnerId, }) {
|
|
25
26
|
const { isLinking, linkingMethod, setLinkingState, navigateBack, setB3ModalContentType } = (0, useModalStore_1.useModalStore)();
|
|
@@ -22,6 +22,15 @@ function getProfileDisplayInfo(profile) {
|
|
|
22
22
|
type,
|
|
23
23
|
};
|
|
24
24
|
break;
|
|
25
|
+
case "farcaster":
|
|
26
|
+
displayInfo = {
|
|
27
|
+
title: details.name || details.username || "Unknown",
|
|
28
|
+
subtitle: details.username ? `@${details.username}` : "Farcaster Account",
|
|
29
|
+
imageUrl: details.profileImageUrl || null,
|
|
30
|
+
initial: "F",
|
|
31
|
+
type,
|
|
32
|
+
};
|
|
33
|
+
break;
|
|
25
34
|
case "google":
|
|
26
35
|
displayInfo = {
|
|
27
36
|
title: details.name || details.email || "Unknown",
|
|
@@ -17,6 +17,7 @@ const AUTH_METHODS = [
|
|
|
17
17
|
{ id: "x", label: "X (Twitter)", enabled: true },
|
|
18
18
|
{ id: "discord", label: "Discord", enabled: true },
|
|
19
19
|
{ id: "apple", label: "Apple", enabled: true },
|
|
20
|
+
{ id: "farcaster", label: "Farcaster", enabled: true },
|
|
20
21
|
];
|
|
21
22
|
export function LinkAccount({ onSuccess: onSuccessCallback, onError, onClose, chain, partnerId, }) {
|
|
22
23
|
const { isLinking, linkingMethod, setLinkingState, navigateBack, setB3ModalContentType } = useModalStore();
|
|
@@ -19,6 +19,15 @@ export function getProfileDisplayInfo(profile) {
|
|
|
19
19
|
type,
|
|
20
20
|
};
|
|
21
21
|
break;
|
|
22
|
+
case "farcaster":
|
|
23
|
+
displayInfo = {
|
|
24
|
+
title: details.name || details.username || "Unknown",
|
|
25
|
+
subtitle: details.username ? `@${details.username}` : "Farcaster Account",
|
|
26
|
+
imageUrl: details.profileImageUrl || null,
|
|
27
|
+
initial: "F",
|
|
28
|
+
type,
|
|
29
|
+
};
|
|
30
|
+
break;
|
|
22
31
|
case "google":
|
|
23
32
|
displayInfo = {
|
|
24
33
|
title: details.name || details.email || "Unknown",
|
package/package.json
CHANGED
|
@@ -10,7 +10,7 @@ import { getProfileDisplayInfo } from "../../utils/profileDisplay";
|
|
|
10
10
|
import { useB3 } from "../B3Provider/useB3";
|
|
11
11
|
import { Button } from "../ui/button";
|
|
12
12
|
type OTPStrategy = "email" | "phone";
|
|
13
|
-
type SocialStrategy = "google" | "x" | "discord" | "apple";
|
|
13
|
+
type SocialStrategy = "google" | "x" | "discord" | "apple" | "farcaster";
|
|
14
14
|
type Strategy = OTPStrategy | SocialStrategy;
|
|
15
15
|
|
|
16
16
|
interface AuthMethod {
|
|
@@ -27,6 +27,7 @@ const AUTH_METHODS: AuthMethod[] = [
|
|
|
27
27
|
{ id: "x", label: "X (Twitter)", enabled: true },
|
|
28
28
|
{ id: "discord", label: "Discord", enabled: true },
|
|
29
29
|
{ id: "apple", label: "Apple", enabled: true },
|
|
30
|
+
{ id: "farcaster", label: "Farcaster", enabled: true },
|
|
30
31
|
];
|
|
31
32
|
|
|
32
33
|
export function LinkAccount({
|
|
@@ -45,6 +45,15 @@ export function getProfileDisplayInfo(profile: ExtendedProfile): ProfileDisplayI
|
|
|
45
45
|
type,
|
|
46
46
|
};
|
|
47
47
|
break;
|
|
48
|
+
case "farcaster":
|
|
49
|
+
displayInfo = {
|
|
50
|
+
title: details.name || details.username || "Unknown",
|
|
51
|
+
subtitle: details.username ? `@${details.username}` : "Farcaster Account",
|
|
52
|
+
imageUrl: details.profileImageUrl || null,
|
|
53
|
+
initial: "F",
|
|
54
|
+
type,
|
|
55
|
+
};
|
|
56
|
+
break;
|
|
48
57
|
case "google":
|
|
49
58
|
displayInfo = {
|
|
50
59
|
title: details.name || details.email || "Unknown",
|