@b3dotfun/sdk 0.0.50-alpha.0 → 0.0.50-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.
- package/dist/cjs/bondkit/bondkitToken.js +2 -2
- package/dist/cjs/global-account/react/hooks/useAuthentication.js +3 -2
- package/dist/cjs/global-account/react/hooks/useFirstEOA.d.ts +1 -7663
- package/dist/cjs/global-account/react/hooks/useFirstEOA.js +1 -21
- package/dist/esm/bondkit/bondkitToken.js +2 -2
- package/dist/esm/global-account/react/hooks/useAuthentication.js +3 -2
- package/dist/esm/global-account/react/hooks/useFirstEOA.d.ts +1 -7663
- package/dist/esm/global-account/react/hooks/useFirstEOA.js +2 -22
- package/dist/types/global-account/react/hooks/useFirstEOA.d.ts +1 -7663
- package/package.json +2 -2
- package/src/bondkit/bondkitToken.ts +2 -2
- package/src/global-account/react/hooks/useAuthentication.ts +29 -25
- package/src/global-account/react/hooks/useFirstEOA.tsx +2 -20
|
@@ -61,7 +61,7 @@ class BondkitToken {
|
|
|
61
61
|
});
|
|
62
62
|
this.publicClient = (0, viem_1.createPublicClient)({
|
|
63
63
|
chain: this.chain,
|
|
64
|
-
transport,
|
|
64
|
+
transport: (0, viem_1.http)(this.rpcUrl),
|
|
65
65
|
});
|
|
66
66
|
this.contract = (0, viem_1.getContract)({
|
|
67
67
|
address: this.contractAddress,
|
|
@@ -108,7 +108,7 @@ class BondkitToken {
|
|
|
108
108
|
});
|
|
109
109
|
this.publicClient = (0, viem_1.createPublicClient)({
|
|
110
110
|
chain: this.chain,
|
|
111
|
-
transport,
|
|
111
|
+
transport: (0, viem_1.http)(this.rpcUrl),
|
|
112
112
|
});
|
|
113
113
|
this.contract = (0, viem_1.getContract)({
|
|
114
114
|
address: this.contractAddress,
|
|
@@ -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],
|