@b3dotfun/sdk 0.0.61-alpha.2 → 0.0.61-alpha.3
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/B3Provider/B3Provider.d.ts +2 -1
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +2 -2
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +2 -1
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +2 -2
- package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +2 -1
- package/package.json +1 -1
- package/src/global-account/react/components/B3Provider/B3Provider.tsx +3 -1
|
@@ -7,7 +7,7 @@ import { B3ContextType } from "./types";
|
|
|
7
7
|
/**
|
|
8
8
|
* Main B3Provider component
|
|
9
9
|
*/
|
|
10
|
-
export declare function B3Provider({ theme, children, accountOverride, environment, automaticallySetFirstEoa, simDuneApiKey, toaster, clientType, rpcUrls, partnerId, onConnect, connectors, }: {
|
|
10
|
+
export declare function B3Provider({ theme, children, accountOverride, environment, automaticallySetFirstEoa, simDuneApiKey, toaster, clientType, rpcUrls, partnerId, onConnect, connectors, overrideDefaultConnectors, }: {
|
|
11
11
|
theme: "light" | "dark";
|
|
12
12
|
children: React.ReactNode;
|
|
13
13
|
accountOverride?: Account;
|
|
@@ -23,6 +23,7 @@ export declare function B3Provider({ theme, children, accountOverride, environme
|
|
|
23
23
|
partnerId: string;
|
|
24
24
|
onConnect?: (wallet: Wallet, b3Jwt: string) => void | Promise<void>;
|
|
25
25
|
connectors?: CreateConnectorFn[];
|
|
26
|
+
overrideDefaultConnectors?: boolean;
|
|
26
27
|
}): import("react/jsx-runtime").JSX.Element;
|
|
27
28
|
/**
|
|
28
29
|
* Inner provider component that provides the actual B3Context
|
|
@@ -32,7 +32,7 @@ const queryClient = new react_query_1.QueryClient();
|
|
|
32
32
|
/**
|
|
33
33
|
* Main B3Provider component
|
|
34
34
|
*/
|
|
35
|
-
function B3Provider({ theme = "light", children, accountOverride, environment, automaticallySetFirstEoa, simDuneApiKey, toaster, clientType = "rest", rpcUrls, partnerId, onConnect, connectors, }) {
|
|
35
|
+
function B3Provider({ theme = "light", children, accountOverride, environment, automaticallySetFirstEoa, simDuneApiKey, toaster, clientType = "rest", rpcUrls, partnerId, onConnect, connectors, overrideDefaultConnectors = false, }) {
|
|
36
36
|
// Initialize Google Analytics on mount
|
|
37
37
|
(0, react_2.useEffect)(() => {
|
|
38
38
|
(0, analytics_1.loadGA4Script)();
|
|
@@ -41,7 +41,7 @@ function B3Provider({ theme = "light", children, accountOverride, environment, a
|
|
|
41
41
|
(0, react_2.useEffect)(() => {
|
|
42
42
|
(0, client_manager_1.setClientType)(clientType);
|
|
43
43
|
}, [clientType]);
|
|
44
|
-
const wagmiConfig = (0, createWagmiConfig_1.createWagmiConfig)({ partnerId, rpcUrls, connectors });
|
|
44
|
+
const wagmiConfig = (0, createWagmiConfig_1.createWagmiConfig)({ partnerId, rpcUrls, connectors, overrideDefaultConnectors });
|
|
45
45
|
return ((0, jsx_runtime_1.jsx)(react_3.ThirdwebProvider, { children: (0, jsx_runtime_1.jsx)(wagmi_1.WagmiProvider, { config: wagmiConfig, reconnectOnMount: false, children: (0, jsx_runtime_1.jsx)(react_query_1.QueryClientProvider, { client: queryClient, children: (0, jsx_runtime_1.jsx)(react_1.TooltipProvider, { children: (0, jsx_runtime_1.jsx)(LocalSDKProvider_1.LocalSDKProvider, { onConnectCallback: onConnect, children: (0, jsx_runtime_1.jsx)(InnerProvider, { accountOverride: accountOverride, environment: environment, theme: theme, automaticallySetFirstEoa: !!automaticallySetFirstEoa, clientType: clientType, partnerId: partnerId, children: (0, jsx_runtime_1.jsxs)(react_1.RelayKitProviderWrapper, { simDuneApiKey: simDuneApiKey, children: [children, (0, jsx_runtime_1.jsx)(StyleRoot_1.StyleRoot, { id: "b3-root" }), (0, jsx_runtime_1.jsx)(sonner_1.Toaster, { theme: theme, position: toaster?.position, style: toaster?.style })] }) }) }) }) }) }) }));
|
|
46
46
|
}
|
|
47
47
|
/**
|
|
@@ -7,7 +7,7 @@ import { B3ContextType } from "./types";
|
|
|
7
7
|
/**
|
|
8
8
|
* Main B3Provider component
|
|
9
9
|
*/
|
|
10
|
-
export declare function B3Provider({ theme, children, accountOverride, environment, automaticallySetFirstEoa, simDuneApiKey, toaster, clientType, rpcUrls, partnerId, onConnect, connectors, }: {
|
|
10
|
+
export declare function B3Provider({ theme, children, accountOverride, environment, automaticallySetFirstEoa, simDuneApiKey, toaster, clientType, rpcUrls, partnerId, onConnect, connectors, overrideDefaultConnectors, }: {
|
|
11
11
|
theme: "light" | "dark";
|
|
12
12
|
children: React.ReactNode;
|
|
13
13
|
accountOverride?: Account;
|
|
@@ -23,6 +23,7 @@ export declare function B3Provider({ theme, children, accountOverride, environme
|
|
|
23
23
|
partnerId: string;
|
|
24
24
|
onConnect?: (wallet: Wallet, b3Jwt: string) => void | Promise<void>;
|
|
25
25
|
connectors?: CreateConnectorFn[];
|
|
26
|
+
overrideDefaultConnectors?: boolean;
|
|
26
27
|
}): import("react/jsx-runtime").JSX.Element;
|
|
27
28
|
/**
|
|
28
29
|
* Inner provider component that provides the actual B3Context
|
|
@@ -28,7 +28,7 @@ const queryClient = new QueryClient();
|
|
|
28
28
|
/**
|
|
29
29
|
* Main B3Provider component
|
|
30
30
|
*/
|
|
31
|
-
export function B3Provider({ theme = "light", children, accountOverride, environment, automaticallySetFirstEoa, simDuneApiKey, toaster, clientType = "rest", rpcUrls, partnerId, onConnect, connectors, }) {
|
|
31
|
+
export function B3Provider({ theme = "light", children, accountOverride, environment, automaticallySetFirstEoa, simDuneApiKey, toaster, clientType = "rest", rpcUrls, partnerId, onConnect, connectors, overrideDefaultConnectors = false, }) {
|
|
32
32
|
// Initialize Google Analytics on mount
|
|
33
33
|
useEffect(() => {
|
|
34
34
|
loadGA4Script();
|
|
@@ -37,7 +37,7 @@ export function B3Provider({ theme = "light", children, accountOverride, environ
|
|
|
37
37
|
useEffect(() => {
|
|
38
38
|
setClientType(clientType);
|
|
39
39
|
}, [clientType]);
|
|
40
|
-
const wagmiConfig = createWagmiConfig({ partnerId, rpcUrls, connectors });
|
|
40
|
+
const wagmiConfig = createWagmiConfig({ partnerId, rpcUrls, connectors, overrideDefaultConnectors });
|
|
41
41
|
return (_jsx(ThirdwebProvider, { children: _jsx(WagmiProvider, { config: wagmiConfig, reconnectOnMount: false, children: _jsx(QueryClientProvider, { client: queryClient, children: _jsx(TooltipProvider, { children: _jsx(LocalSDKProvider, { onConnectCallback: onConnect, children: _jsx(InnerProvider, { accountOverride: accountOverride, environment: environment, theme: theme, automaticallySetFirstEoa: !!automaticallySetFirstEoa, clientType: clientType, partnerId: partnerId, children: _jsxs(RelayKitProviderWrapper, { simDuneApiKey: simDuneApiKey, children: [children, _jsx(StyleRoot, { id: "b3-root" }), _jsx(Toaster, { theme: theme, position: toaster?.position, style: toaster?.style })] }) }) }) }) }) }) }));
|
|
42
42
|
}
|
|
43
43
|
/**
|
|
@@ -7,7 +7,7 @@ import { B3ContextType } from "./types";
|
|
|
7
7
|
/**
|
|
8
8
|
* Main B3Provider component
|
|
9
9
|
*/
|
|
10
|
-
export declare function B3Provider({ theme, children, accountOverride, environment, automaticallySetFirstEoa, simDuneApiKey, toaster, clientType, rpcUrls, partnerId, onConnect, connectors, }: {
|
|
10
|
+
export declare function B3Provider({ theme, children, accountOverride, environment, automaticallySetFirstEoa, simDuneApiKey, toaster, clientType, rpcUrls, partnerId, onConnect, connectors, overrideDefaultConnectors, }: {
|
|
11
11
|
theme: "light" | "dark";
|
|
12
12
|
children: React.ReactNode;
|
|
13
13
|
accountOverride?: Account;
|
|
@@ -23,6 +23,7 @@ export declare function B3Provider({ theme, children, accountOverride, environme
|
|
|
23
23
|
partnerId: string;
|
|
24
24
|
onConnect?: (wallet: Wallet, b3Jwt: string) => void | Promise<void>;
|
|
25
25
|
connectors?: CreateConnectorFn[];
|
|
26
|
+
overrideDefaultConnectors?: boolean;
|
|
26
27
|
}): import("react/jsx-runtime").JSX.Element;
|
|
27
28
|
/**
|
|
28
29
|
* Inner provider component that provides the actual B3Context
|
package/package.json
CHANGED
|
@@ -57,6 +57,7 @@ export function B3Provider({
|
|
|
57
57
|
partnerId,
|
|
58
58
|
onConnect,
|
|
59
59
|
connectors,
|
|
60
|
+
overrideDefaultConnectors = false,
|
|
60
61
|
}: {
|
|
61
62
|
theme: "light" | "dark";
|
|
62
63
|
children: React.ReactNode;
|
|
@@ -73,6 +74,7 @@ export function B3Provider({
|
|
|
73
74
|
partnerId: string;
|
|
74
75
|
onConnect?: (wallet: Wallet, b3Jwt: string) => void | Promise<void>;
|
|
75
76
|
connectors?: CreateConnectorFn[];
|
|
77
|
+
overrideDefaultConnectors?: boolean;
|
|
76
78
|
}) {
|
|
77
79
|
// Initialize Google Analytics on mount
|
|
78
80
|
useEffect(() => {
|
|
@@ -83,7 +85,7 @@ export function B3Provider({
|
|
|
83
85
|
useEffect(() => {
|
|
84
86
|
setClientType(clientType);
|
|
85
87
|
}, [clientType]);
|
|
86
|
-
const wagmiConfig = createWagmiConfig({ partnerId, rpcUrls, connectors });
|
|
88
|
+
const wagmiConfig = createWagmiConfig({ partnerId, rpcUrls, connectors, overrideDefaultConnectors });
|
|
87
89
|
|
|
88
90
|
return (
|
|
89
91
|
<ThirdwebProvider>
|