@b3dotfun/sdk 0.0.50 → 0.0.51-alpha.0
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/hooks/useAuthentication.js +3 -2
- package/dist/cjs/global-account/react/hooks/useFirstEOA.d.ts +7670 -1
- package/dist/cjs/global-account/react/hooks/useFirstEOA.js +21 -1
- package/dist/cjs/shared/constants/chains/b3Chain.d.ts +9 -3
- package/dist/esm/global-account/react/hooks/useAuthentication.js +3 -2
- package/dist/esm/global-account/react/hooks/useFirstEOA.d.ts +7670 -1
- package/dist/esm/global-account/react/hooks/useFirstEOA.js +22 -2
- package/dist/esm/shared/constants/chains/b3Chain.d.ts +9 -3
- package/dist/types/global-account/react/hooks/useFirstEOA.d.ts +7670 -1
- package/dist/types/shared/constants/chains/b3Chain.d.ts +9 -3
- package/package.json +6 -5
- package/src/global-account/react/hooks/useAuthentication.ts +29 -25
- package/src/global-account/react/hooks/useFirstEOA.tsx +20 -2
|
@@ -171,7 +171,7 @@ function useAuthentication(partnerId) {
|
|
|
171
171
|
setIsConnected,
|
|
172
172
|
setUser,
|
|
173
173
|
]);
|
|
174
|
-
const logout = async (callback) => {
|
|
174
|
+
const logout = (0, react_2.useCallback)(async (callback) => {
|
|
175
175
|
if (activeWallet) {
|
|
176
176
|
debug("@@logout:activeWallet", activeWallet);
|
|
177
177
|
disconnect(activeWallet);
|
|
@@ -188,6 +188,7 @@ function useAuthentication(partnerId) {
|
|
|
188
188
|
localStorage.removeItem("thirdweb:connected-wallet-ids");
|
|
189
189
|
localStorage.removeItem("wagmi.store");
|
|
190
190
|
localStorage.removeItem("lastAuthProvider");
|
|
191
|
+
localStorage.removeItem("b3-user");
|
|
191
192
|
}
|
|
192
193
|
app_1.default.logout();
|
|
193
194
|
debug("@@logout:loggedOut");
|
|
@@ -195,7 +196,7 @@ function useAuthentication(partnerId) {
|
|
|
195
196
|
setIsConnected(false);
|
|
196
197
|
setUser();
|
|
197
198
|
callback?.();
|
|
198
|
-
};
|
|
199
|
+
}, [activeWallet, disconnect, wallets, setIsAuthenticated, setUser, setIsConnected]);
|
|
199
200
|
const { isLoading: useAutoConnectLoading } = (0, react_3.useAutoConnect)({
|
|
200
201
|
client: thirdweb_1.client,
|
|
201
202
|
wallets: [wallet],
|