@pear-protocol/symmio-client 0.2.35 → 0.2.37
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.js
CHANGED
|
@@ -730,7 +730,7 @@ function logSymmAuth(event, details) {
|
|
|
730
730
|
if (typeof window === "undefined") {
|
|
731
731
|
return;
|
|
732
732
|
}
|
|
733
|
-
console.
|
|
733
|
+
console.log("[symm-auth]", event, details ?? {});
|
|
734
734
|
}
|
|
735
735
|
function extractSubaccountAddresses(summary) {
|
|
736
736
|
const accounts = summary?.data?.accounts;
|
|
@@ -834,7 +834,23 @@ function useSymmAuth(params) {
|
|
|
834
834
|
let cancelled = false;
|
|
835
835
|
previousAddressRef.current = address;
|
|
836
836
|
previousChainIdRef.current = chainId;
|
|
837
|
+
logSymmAuth("bootstrap:dependencies", {
|
|
838
|
+
address,
|
|
839
|
+
chainId,
|
|
840
|
+
hasWalletClient: !!walletClient,
|
|
841
|
+
hasSymmCoreClient: !!symmCoreClient,
|
|
842
|
+
hasRefreshAuth: !!refreshAuthRef.current,
|
|
843
|
+
addressChanged,
|
|
844
|
+
chainChanged,
|
|
845
|
+
previousAddress,
|
|
846
|
+
previousChainId
|
|
847
|
+
});
|
|
837
848
|
if (!address) {
|
|
849
|
+
logSymmAuth("bootstrap:skip-no-address", {
|
|
850
|
+
chainId,
|
|
851
|
+
hasWalletClient: !!walletClient,
|
|
852
|
+
hasSymmCoreClient: !!symmCoreClient
|
|
853
|
+
});
|
|
838
854
|
return;
|
|
839
855
|
}
|
|
840
856
|
const userAddress = address;
|
|
@@ -843,6 +859,13 @@ function useSymmAuth(params) {
|
|
|
843
859
|
clearToken(previousAddress, previousChainId);
|
|
844
860
|
}
|
|
845
861
|
async function bootstrapAuth() {
|
|
862
|
+
logSymmAuth("bootstrap:run", {
|
|
863
|
+
userAddress,
|
|
864
|
+
chainId,
|
|
865
|
+
hasWalletClient: !!walletClient,
|
|
866
|
+
hasSymmCoreClient: !!symmCoreClient,
|
|
867
|
+
hasRefreshAuth: !!refreshAuthRef.current
|
|
868
|
+
});
|
|
846
869
|
let targets = [userAddress];
|
|
847
870
|
if (symmCoreClient) {
|
|
848
871
|
try {
|
|
@@ -887,7 +910,7 @@ function useSymmAuth(params) {
|
|
|
887
910
|
return () => {
|
|
888
911
|
cancelled = true;
|
|
889
912
|
};
|
|
890
|
-
}, [address, walletClient, chainId]);
|
|
913
|
+
}, [address, walletClient, chainId, symmCoreClient]);
|
|
891
914
|
return {
|
|
892
915
|
accessToken: token,
|
|
893
916
|
authToken: token,
|