@b3dotfun/sdk 0.0.88-alpha.1 → 0.0.88-alpha.2
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.
|
@@ -53,6 +53,11 @@ function InnerProvider({ children, accountOverride, environment, defaultPermissi
|
|
|
53
53
|
const isAuthenticated = (0, react_1.useAuthStore)(state => state.isAuthenticated);
|
|
54
54
|
//const isConnected = useAuthStore(state => state.isConnected);
|
|
55
55
|
//const justCompletedLogin = useAuthStore(state => state.justCompletedLogin);
|
|
56
|
+
// Note: This fixes a bug where useAuthentication is no longer rendered on every page, as of this PR https://github.com/b3-fun/b3/pull/385/files#diff-3ef996931b8fc8e49021ba1b42ddaa97535214681610dc5fdacf63542e261af7
|
|
57
|
+
// The above PR removes useAuthentication from the overall B3Provider. useAuthentication should be everywhere the provider is, since it sets the overall auth state
|
|
58
|
+
// By just calling it manually, we fix that issue
|
|
59
|
+
// As a follow up, we should fix the SDK directly
|
|
60
|
+
(0, react_1.useAuthentication)(partnerId);
|
|
56
61
|
// Use given accountOverride or activeAccount from thirdweb
|
|
57
62
|
// WOJ: why if isAuthenticated is false, we don't use activeAccount, which should be undefined?
|
|
58
63
|
// skip isAuthenticated check ?
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { RelayKitProviderWrapper, TooltipProvider, useAuthStore } from "../../../../global-account/react/index.js";
|
|
2
|
+
import { RelayKitProviderWrapper, TooltipProvider, useAuthentication, useAuthStore, } from "../../../../global-account/react/index.js";
|
|
3
3
|
import { useAutoSelectWallet } from "../../../../global-account/react/hooks/useAutoSelectWallet.js";
|
|
4
4
|
import { createWagmiConfig } from "../../../../global-account/react/utils/createWagmiConfig.js";
|
|
5
5
|
import { loadGA4Script } from "../../../../global-account/utils/analytics.js";
|
|
@@ -49,6 +49,11 @@ export function InnerProvider({ children, accountOverride, environment, defaultP
|
|
|
49
49
|
const isAuthenticated = useAuthStore(state => state.isAuthenticated);
|
|
50
50
|
//const isConnected = useAuthStore(state => state.isConnected);
|
|
51
51
|
//const justCompletedLogin = useAuthStore(state => state.justCompletedLogin);
|
|
52
|
+
// Note: This fixes a bug where useAuthentication is no longer rendered on every page, as of this PR https://github.com/b3-fun/b3/pull/385/files#diff-3ef996931b8fc8e49021ba1b42ddaa97535214681610dc5fdacf63542e261af7
|
|
53
|
+
// The above PR removes useAuthentication from the overall B3Provider. useAuthentication should be everywhere the provider is, since it sets the overall auth state
|
|
54
|
+
// By just calling it manually, we fix that issue
|
|
55
|
+
// As a follow up, we should fix the SDK directly
|
|
56
|
+
useAuthentication(partnerId);
|
|
52
57
|
// Use given accountOverride or activeAccount from thirdweb
|
|
53
58
|
// WOJ: why if isAuthenticated is false, we don't use activeAccount, which should be undefined?
|
|
54
59
|
// skip isAuthenticated check ?
|
package/package.json
CHANGED
|
@@ -1,6 +1,11 @@
|
|
|
1
1
|
import { CreateOnrampOrderParams } from "@b3dotfun/sdk/anyspend/react/hooks/useAnyspendCreateOnrampOrder";
|
|
2
2
|
import { CreateOrderParams } from "@b3dotfun/sdk/anyspend/react/hooks/useAnyspendCreateOrder";
|
|
3
|
-
import {
|
|
3
|
+
import {
|
|
4
|
+
RelayKitProviderWrapper,
|
|
5
|
+
TooltipProvider,
|
|
6
|
+
useAuthentication,
|
|
7
|
+
useAuthStore,
|
|
8
|
+
} from "@b3dotfun/sdk/global-account/react";
|
|
4
9
|
import { useAutoSelectWallet } from "@b3dotfun/sdk/global-account/react/hooks/useAutoSelectWallet";
|
|
5
10
|
import { createWagmiConfig } from "@b3dotfun/sdk/global-account/react/utils/createWagmiConfig";
|
|
6
11
|
import { PermissionsConfig } from "@b3dotfun/sdk/global-account/types/permissions";
|
|
@@ -155,6 +160,12 @@ export function InnerProvider({
|
|
|
155
160
|
//const isConnected = useAuthStore(state => state.isConnected);
|
|
156
161
|
//const justCompletedLogin = useAuthStore(state => state.justCompletedLogin);
|
|
157
162
|
|
|
163
|
+
// Note: This fixes a bug where useAuthentication is no longer rendered on every page, as of this PR https://github.com/b3-fun/b3/pull/385/files#diff-3ef996931b8fc8e49021ba1b42ddaa97535214681610dc5fdacf63542e261af7
|
|
164
|
+
// The above PR removes useAuthentication from the overall B3Provider. useAuthentication should be everywhere the provider is, since it sets the overall auth state
|
|
165
|
+
// By just calling it manually, we fix that issue
|
|
166
|
+
// As a follow up, we should fix the SDK directly
|
|
167
|
+
useAuthentication(partnerId);
|
|
168
|
+
|
|
158
169
|
// Use given accountOverride or activeAccount from thirdweb
|
|
159
170
|
// WOJ: why if isAuthenticated is false, we don't use activeAccount, which should be undefined?
|
|
160
171
|
// skip isAuthenticated check ?
|