@dynamic-labs/sdk-react-core 3.8.4 → 3.8.5

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/CHANGELOG.md CHANGED
@@ -1,4 +1,11 @@
1
1
 
2
+ ### [3.8.5](https://github.com/dynamic-labs/DynamicAuth/compare/v3.8.4...v3.8.5) (2024-11-29)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * sdkHasLoaded always false in cookie enabled env ([#7516](https://github.com/dynamic-labs/DynamicAuth/issues/7516)) ([#7517](https://github.com/dynamic-labs/DynamicAuth/issues/7517)) ([91ecc30](https://github.com/dynamic-labs/DynamicAuth/commit/91ecc307c0bba8ef0f9f66240074adeb45f8ad5f))
8
+
2
9
  ### [3.8.4](https://github.com/dynamic-labs/DynamicAuth/compare/v3.8.3...v3.8.4) (2024-11-27)
3
10
 
4
11
 
package/package.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "3.8.4";
6
+ var version = "3.8.5";
7
7
  var dependencies = {
8
8
  "@dynamic-labs/sdk-api-core": "0.0.570",
9
9
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client'
2
- var version = "3.8.4";
2
+ var version = "3.8.5";
3
3
  var dependencies = {
4
4
  "@dynamic-labs/sdk-api-core": "0.0.570",
5
5
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "3.8.4",
3
+ "version": "3.8.5",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
@@ -17,16 +17,16 @@
17
17
  "react-i18next": "13.5.0",
18
18
  "yup": "0.32.11",
19
19
  "react-international-phone": "4.2.5",
20
- "@dynamic-labs/assert-package-version": "3.8.4",
21
- "@dynamic-labs/iconic": "3.8.4",
22
- "@dynamic-labs/logger": "3.8.4",
23
- "@dynamic-labs/multi-wallet": "3.8.4",
24
- "@dynamic-labs/rpc-providers": "3.8.4",
25
- "@dynamic-labs/store": "3.8.4",
26
- "@dynamic-labs/types": "3.8.4",
27
- "@dynamic-labs/utils": "3.8.4",
28
- "@dynamic-labs/wallet-book": "3.8.4",
29
- "@dynamic-labs/wallet-connector-core": "3.8.4",
20
+ "@dynamic-labs/assert-package-version": "3.8.5",
21
+ "@dynamic-labs/iconic": "3.8.5",
22
+ "@dynamic-labs/logger": "3.8.5",
23
+ "@dynamic-labs/multi-wallet": "3.8.5",
24
+ "@dynamic-labs/rpc-providers": "3.8.5",
25
+ "@dynamic-labs/store": "3.8.5",
26
+ "@dynamic-labs/types": "3.8.5",
27
+ "@dynamic-labs/utils": "3.8.5",
28
+ "@dynamic-labs/wallet-book": "3.8.5",
29
+ "@dynamic-labs/wallet-connector-core": "3.8.5",
30
30
  "bs58": "5.0.0",
31
31
  "eventemitter3": "5.0.1"
32
32
  },
@@ -27,7 +27,7 @@ var isCookieEnabled = require('../../functions/isCookieEnabled/isCookieEnabled.c
27
27
  var useDynamicEvents = require('../events/useDynamicEvents/useDynamicEvents.cjs');
28
28
 
29
29
  const useResetCookieLocalStorage = ({ environmentId, projectSettings, setPrimaryWalletId, }) => {
30
- const isLoadingRef = React.useRef(true);
30
+ const [isLoading, setIsLoading] = React.useState(true);
31
31
  const didRefreshUserRef = React.useRef(false);
32
32
  const user$2 = user.getUser();
33
33
  /**
@@ -77,7 +77,7 @@ const useResetCookieLocalStorage = ({ environmentId, projectSettings, setPrimary
77
77
  if (projectSettings) {
78
78
  // only set to false if projectSettings are available,
79
79
  // otherwise isCookieEnabled might be a false negative
80
- isLoadingRef.current = false;
80
+ setIsLoading(false);
81
81
  }
82
82
  });
83
83
  // Ensure this effect only runs once
@@ -85,9 +85,7 @@ const useResetCookieLocalStorage = ({ environmentId, projectSettings, setPrimary
85
85
  return;
86
86
  maybeInitUserRefresh();
87
87
  }, [user$2, projectSettings, environmentId, setPrimaryWalletId]);
88
- return {
89
- isLoading: isLoadingRef.current,
90
- };
88
+ return { isLoading };
91
89
  };
92
90
 
93
91
  exports.useResetCookieLocalStorage = useResetCookieLocalStorage;
@@ -1,6 +1,6 @@
1
1
  'use client'
2
2
  import { __awaiter } from '../../../../../_virtual/_tslib.js';
3
- import { useRef, useEffect } from 'react';
3
+ import { useState, useRef, useEffect } from 'react';
4
4
  import { JwtVerifiedCredentialFormatEnum } from '@dynamic-labs/sdk-api-core';
5
5
  import { logger } from '../../../shared/logger.js';
6
6
  import '@dynamic-labs/iconic';
@@ -23,7 +23,7 @@ import { isCookieEnabled } from '../../functions/isCookieEnabled/isCookieEnabled
23
23
  import { useInternalDynamicEvents } from '../events/useDynamicEvents/useDynamicEvents.js';
24
24
 
25
25
  const useResetCookieLocalStorage = ({ environmentId, projectSettings, setPrimaryWalletId, }) => {
26
- const isLoadingRef = useRef(true);
26
+ const [isLoading, setIsLoading] = useState(true);
27
27
  const didRefreshUserRef = useRef(false);
28
28
  const user = getUser();
29
29
  /**
@@ -73,7 +73,7 @@ const useResetCookieLocalStorage = ({ environmentId, projectSettings, setPrimary
73
73
  if (projectSettings) {
74
74
  // only set to false if projectSettings are available,
75
75
  // otherwise isCookieEnabled might be a false negative
76
- isLoadingRef.current = false;
76
+ setIsLoading(false);
77
77
  }
78
78
  });
79
79
  // Ensure this effect only runs once
@@ -81,9 +81,7 @@ const useResetCookieLocalStorage = ({ environmentId, projectSettings, setPrimary
81
81
  return;
82
82
  maybeInitUserRefresh();
83
83
  }, [user, projectSettings, environmentId, setPrimaryWalletId]);
84
- return {
85
- isLoading: isLoadingRef.current,
86
- };
84
+ return { isLoading };
87
85
  };
88
86
 
89
87
  export { useResetCookieLocalStorage };