@dynamic-labs/store 4.7.0 → 4.7.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/CHANGELOG.md CHANGED
@@ -1,4 +1,23 @@
1
1
 
2
+ ### [4.7.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.7.1...v4.7.2) (2025-02-22)
3
+
4
+ ### Features
5
+
6
+ * add bitcoin rune support for token balances ([95640](https://github.com/dynamic-labs/dynamic-auth/commit/956403dc0e427e9a99c62e189fc59de0d8b11e1b))
7
+
8
+ ### Bug Fixes
9
+
10
+ * hidrate the user state when a valid token is present ([#8116](https://github.com/dynamic-labs/dynamic-auth/issues/8116)) ([dad5837](https://github.com/dynamic-labs/dynamic-auth/commit/dad58373c4c2fe0c870d918474d6a1f541eae659))
11
+ * prompt to re-establish wallet connect session for secondary wallets ([#8111](https://github.com/dynamic-labs/dynamic-auth/issues/8111)) ([c713ead](https://github.com/dynamic-labs/dynamic-auth/commit/c713ead0611c658aea3d7aca534c2ba2c3cab584))
12
+ * upgrade elliptic ([#8106](https://github.com/dynamic-labs/dynamic-auth/issues/8106)) ([359c873](https://github.com/dynamic-labs/dynamic-auth/commit/359c8733fdd8c0510c2f0018ee0fefa337847aae))
13
+
14
+ ### [4.7.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.7.0...v4.7.1) (2025-02-20)
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * remove user logout when sdk version change ([#8112](https://github.com/dynamic-labs/dynamic-auth/issues/8112)) ([b1a321f](https://github.com/dynamic-labs/dynamic-auth/commit/b1a321f18231f083aeb365d4dc92e992897a7e1b))
20
+
2
21
  ## [4.7.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.6.3...v4.7.0) (2025-02-20)
3
22
 
4
23
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.7.0";
6
+ var version = "4.7.2";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.7.0";
2
+ var version = "4.7.2";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/store",
3
- "version": "4.7.0",
3
+ "version": "4.7.2",
4
4
  "description": "Store ",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -18,8 +18,8 @@
18
18
  "./package.json": "./package.json"
19
19
  },
20
20
  "dependencies": {
21
- "@dynamic-labs/assert-package-version": "4.7.0",
22
- "@dynamic-labs/logger": "4.7.0"
21
+ "@dynamic-labs/assert-package-version": "4.7.2",
22
+ "@dynamic-labs/logger": "4.7.2"
23
23
  },
24
24
  "peerDependencies": {}
25
25
  }
@@ -8,7 +8,7 @@ var logger = require('../utils/logger/logger.cjs');
8
8
  /**
9
9
  * Creates a persist middleware that saves the store state to the storage.
10
10
  */
11
- const persist = ({ name, version = '0', storage, store, partialize, onVersionChanged, }) => {
11
+ const persist = ({ name, version = '0', storage, store, partialize, }) => {
12
12
  store.subscribe((state) => {
13
13
  const persistedState = partialize(state);
14
14
  storage.setItem(name, JSON.stringify({ state: persistedState, version }));
@@ -20,9 +20,6 @@ const persist = ({ name, version = '0', storage, store, partialize, onVersionCha
20
20
  if (persistedVersion === version) {
21
21
  store.setState(Object.assign(store.getInitialState(), persistedState));
22
22
  }
23
- else if (onVersionChanged) {
24
- onVersionChanged(persistedVersion);
25
- }
26
23
  }
27
24
  catch (error) {
28
25
  logger.logger.error('Failed to load state from storage', error);
@@ -9,10 +9,9 @@ type CreatePersistProps<TStore extends object> = {
9
9
  storage: PersistStorage;
10
10
  partialize: (state: TStore) => Partial<TStore>;
11
11
  store: StoreApi<TStore>;
12
- onVersionChanged?: (persistedVersion: string) => void;
13
12
  };
14
13
  /**
15
14
  * Creates a persist middleware that saves the store state to the storage.
16
15
  */
17
- export declare const persist: <TStore extends object>({ name, version, storage, store, partialize, onVersionChanged, }: CreatePersistProps<TStore>) => StoreApi<TStore>;
16
+ export declare const persist: <TStore extends object>({ name, version, storage, store, partialize, }: CreatePersistProps<TStore>) => StoreApi<TStore>;
18
17
  export {};
@@ -4,7 +4,7 @@ import { logger } from '../utils/logger/logger.js';
4
4
  /**
5
5
  * Creates a persist middleware that saves the store state to the storage.
6
6
  */
7
- const persist = ({ name, version = '0', storage, store, partialize, onVersionChanged, }) => {
7
+ const persist = ({ name, version = '0', storage, store, partialize, }) => {
8
8
  store.subscribe((state) => {
9
9
  const persistedState = partialize(state);
10
10
  storage.setItem(name, JSON.stringify({ state: persistedState, version }));
@@ -16,9 +16,6 @@ const persist = ({ name, version = '0', storage, store, partialize, onVersionCha
16
16
  if (persistedVersion === version) {
17
17
  store.setState(Object.assign(store.getInitialState(), persistedState));
18
18
  }
19
- else if (onVersionChanged) {
20
- onVersionChanged(persistedVersion);
21
- }
22
19
  }
23
20
  catch (error) {
24
21
  logger.error('Failed to load state from storage', error);