@pear-protocol/symmio-client 0.2.36 → 0.2.38
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 +40 -1
- package/dist/react/index.js.map +1 -1
- package/dist/react/index.mjs +40 -1
- package/dist/react/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/react/index.mjs
CHANGED
|
@@ -728,7 +728,7 @@ function logSymmAuth(event, details) {
|
|
|
728
728
|
if (typeof window === "undefined") {
|
|
729
729
|
return;
|
|
730
730
|
}
|
|
731
|
-
console.
|
|
731
|
+
console.log("[symm-auth]", event, details ?? {});
|
|
732
732
|
}
|
|
733
733
|
function extractSubaccountAddresses(summary) {
|
|
734
734
|
const accounts = summary?.data?.accounts;
|
|
@@ -824,6 +824,12 @@ function useSymmAuth(params) {
|
|
|
824
824
|
clearToken(address, chainId);
|
|
825
825
|
}
|
|
826
826
|
}, [address, chainId, clearToken]);
|
|
827
|
+
console.log("symm auth", {
|
|
828
|
+
address,
|
|
829
|
+
chainId,
|
|
830
|
+
walletClient,
|
|
831
|
+
symmCoreClient
|
|
832
|
+
});
|
|
827
833
|
useEffect(() => {
|
|
828
834
|
const previousAddress = previousAddressRef.current;
|
|
829
835
|
const previousChainId = previousChainIdRef.current;
|
|
@@ -843,12 +849,28 @@ function useSymmAuth(params) {
|
|
|
843
849
|
previousAddress,
|
|
844
850
|
previousChainId
|
|
845
851
|
});
|
|
852
|
+
console.log("bootstrap:dependencies", {
|
|
853
|
+
address,
|
|
854
|
+
chainId,
|
|
855
|
+
hasWalletClient: !!walletClient,
|
|
856
|
+
hasSymmCoreClient: !!symmCoreClient,
|
|
857
|
+
hasRefreshAuth: !!refreshAuthRef.current,
|
|
858
|
+
addressChanged,
|
|
859
|
+
chainChanged,
|
|
860
|
+
previousAddress,
|
|
861
|
+
previousChainId
|
|
862
|
+
});
|
|
846
863
|
if (!address) {
|
|
847
864
|
logSymmAuth("bootstrap:skip-no-address", {
|
|
848
865
|
chainId,
|
|
849
866
|
hasWalletClient: !!walletClient,
|
|
850
867
|
hasSymmCoreClient: !!symmCoreClient
|
|
851
868
|
});
|
|
869
|
+
console.log("bootstrap:skip-no-address", {
|
|
870
|
+
chainId,
|
|
871
|
+
hasWalletClient: !!walletClient,
|
|
872
|
+
hasSymmCoreClient: !!symmCoreClient
|
|
873
|
+
});
|
|
852
874
|
return;
|
|
853
875
|
}
|
|
854
876
|
const userAddress = address;
|
|
@@ -864,6 +886,13 @@ function useSymmAuth(params) {
|
|
|
864
886
|
hasSymmCoreClient: !!symmCoreClient,
|
|
865
887
|
hasRefreshAuth: !!refreshAuthRef.current
|
|
866
888
|
});
|
|
889
|
+
console.log("bootstrap:run", {
|
|
890
|
+
userAddress,
|
|
891
|
+
chainId,
|
|
892
|
+
hasWalletClient: !!walletClient,
|
|
893
|
+
hasSymmCoreClient: !!symmCoreClient,
|
|
894
|
+
hasRefreshAuth: !!refreshAuthRef.current
|
|
895
|
+
});
|
|
867
896
|
let targets = [userAddress];
|
|
868
897
|
if (symmCoreClient) {
|
|
869
898
|
try {
|
|
@@ -880,12 +909,22 @@ function useSymmAuth(params) {
|
|
|
880
909
|
chainId,
|
|
881
910
|
subaccounts
|
|
882
911
|
});
|
|
912
|
+
console.log("bootstrap:subaccounts-resolved", {
|
|
913
|
+
userAddress,
|
|
914
|
+
chainId,
|
|
915
|
+
subaccounts
|
|
916
|
+
});
|
|
883
917
|
} catch (error) {
|
|
884
918
|
logSymmAuth("bootstrap:subaccounts-failed", {
|
|
885
919
|
userAddress,
|
|
886
920
|
chainId,
|
|
887
921
|
error: error instanceof Error ? error.message : String(error)
|
|
888
922
|
});
|
|
923
|
+
console.log("bootstrap:subaccounts-failed", {
|
|
924
|
+
userAddress,
|
|
925
|
+
chainId,
|
|
926
|
+
error: error instanceof Error ? error.message : String(error)
|
|
927
|
+
});
|
|
889
928
|
}
|
|
890
929
|
}
|
|
891
930
|
const uniqueTargets = [...new Set(targets)].filter(
|