@pear-protocol/symmio-client 0.2.34 → 0.2.36
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/react/index.js +25 -2
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +25 -2
- package/dist/react/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react/index.mjs
CHANGED
|
@@ -832,7 +832,23 @@ function useSymmAuth(params) {
|
|
|
832
832
|
let cancelled = false;
|
|
833
833
|
previousAddressRef.current = address;
|
|
834
834
|
previousChainIdRef.current = chainId;
|
|
835
|
+
logSymmAuth("bootstrap:dependencies", {
|
|
836
|
+
address,
|
|
837
|
+
chainId,
|
|
838
|
+
hasWalletClient: !!walletClient,
|
|
839
|
+
hasSymmCoreClient: !!symmCoreClient,
|
|
840
|
+
hasRefreshAuth: !!refreshAuthRef.current,
|
|
841
|
+
addressChanged,
|
|
842
|
+
chainChanged,
|
|
843
|
+
previousAddress,
|
|
844
|
+
previousChainId
|
|
845
|
+
});
|
|
835
846
|
if (!address) {
|
|
847
|
+
logSymmAuth("bootstrap:skip-no-address", {
|
|
848
|
+
chainId,
|
|
849
|
+
hasWalletClient: !!walletClient,
|
|
850
|
+
hasSymmCoreClient: !!symmCoreClient
|
|
851
|
+
});
|
|
836
852
|
return;
|
|
837
853
|
}
|
|
838
854
|
const userAddress = address;
|
|
@@ -841,6 +857,13 @@ function useSymmAuth(params) {
|
|
|
841
857
|
clearToken(previousAddress, previousChainId);
|
|
842
858
|
}
|
|
843
859
|
async function bootstrapAuth() {
|
|
860
|
+
logSymmAuth("bootstrap:run", {
|
|
861
|
+
userAddress,
|
|
862
|
+
chainId,
|
|
863
|
+
hasWalletClient: !!walletClient,
|
|
864
|
+
hasSymmCoreClient: !!symmCoreClient,
|
|
865
|
+
hasRefreshAuth: !!refreshAuthRef.current
|
|
866
|
+
});
|
|
844
867
|
let targets = [userAddress];
|
|
845
868
|
if (symmCoreClient) {
|
|
846
869
|
try {
|
|
@@ -881,11 +904,11 @@ function useSymmAuth(params) {
|
|
|
881
904
|
await refreshAuthRef.current(accountAddress);
|
|
882
905
|
}
|
|
883
906
|
}
|
|
884
|
-
|
|
907
|
+
bootstrapAuth();
|
|
885
908
|
return () => {
|
|
886
909
|
cancelled = true;
|
|
887
910
|
};
|
|
888
|
-
}, [address, walletClient, chainId,
|
|
911
|
+
}, [address, walletClient, chainId, symmCoreClient]);
|
|
889
912
|
return {
|
|
890
913
|
accessToken: token,
|
|
891
914
|
authToken: token,
|