@dynamic-labs/starknet 1.4.16 → 1.4.18

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,18 @@
1
1
 
2
+ ### [1.4.18](https://github.com/dynamic-labs/DynamicAuth/compare/v1.4.17...v1.4.18) (2024-07-31)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * sdkHasLoaded flipping back to false with otp ([#6256](https://github.com/dynamic-labs/DynamicAuth/issues/6256)) ([#6451](https://github.com/dynamic-labs/DynamicAuth/issues/6451)) ([b4c86df](https://github.com/dynamic-labs/DynamicAuth/commit/b4c86dff136cc5a866c70610a12ffc75a8ae6d4f)), closes [/github.com/dynamic-labs/dynamic-auth/commit/4fc047f02f6f06d5c129d8de4eed42ee35b4545e#diff-cf5bbeb2e3bd88281d04fe5d30137f9f135011803101c2dec57d5f35cbb47aa0](https://github.com/dynamic-labs//github.com/dynamic-labs/dynamic-auth/commit/4fc047f02f6f06d5c129d8de4eed42ee35b4545e/issues/diff-cf5bbeb2e3bd88281d04fe5d30137f9f135011803101c2dec57d5f35cbb47aa0)
8
+
9
+ ### [1.4.17](https://github.com/dynamic-labs/DynamicAuth/compare/v1.4.16...v1.4.17) (2024-07-25)
10
+
11
+
12
+ ### Bug Fixes
13
+
14
+ * improvements to metamask starknet snap network polling ([#6424](https://github.com/dynamic-labs/DynamicAuth/issues/6424)) ([#6425](https://github.com/dynamic-labs/DynamicAuth/issues/6425)) ([5b565c8](https://github.com/dynamic-labs/DynamicAuth/commit/5b565c8ef4bee0d7dc076ef30170039d22b678fd))
15
+
2
16
  ### [1.4.16](https://github.com/dynamic-labs/DynamicAuth/compare/v1.4.15...v1.4.16) (2024-07-25)
3
17
 
4
18
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/starknet",
3
- "version": "1.4.16",
3
+ "version": "1.4.18",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -32,12 +32,12 @@
32
32
  "starknetkit": "1.1.3",
33
33
  "@dynamic-labs/sdk-api": "0.0.387",
34
34
  "@module-federation/runtime": "0.1.19",
35
- "@dynamic-labs/logger": "1.4.16",
36
- "@dynamic-labs/rpc-providers": "1.4.16",
37
- "@dynamic-labs/types": "1.4.16",
38
- "@dynamic-labs/utils": "1.4.16",
39
- "@dynamic-labs/wallet-book": "1.4.16",
40
- "@dynamic-labs/wallet-connector-core": "1.4.16"
35
+ "@dynamic-labs/logger": "1.4.18",
36
+ "@dynamic-labs/rpc-providers": "1.4.18",
37
+ "@dynamic-labs/types": "1.4.18",
38
+ "@dynamic-labs/utils": "1.4.18",
39
+ "@dynamic-labs/wallet-book": "1.4.18",
40
+ "@dynamic-labs/wallet-connector-core": "1.4.18"
41
41
  },
42
42
  "peerDependencies": {}
43
43
  }
@@ -68,6 +68,9 @@ class MetaMask extends starknetWalletConnector["default"] {
68
68
  });
69
69
  }
70
70
  setupEventListeners() {
71
+ if (this.intervalId) {
72
+ return;
73
+ }
71
74
  this.intervalId = setInterval(() => {
72
75
  this.getNetwork().then((chainId) => {
73
76
  if (!chainId) {
@@ -89,6 +92,12 @@ class MetaMask extends starknetWalletConnector["default"] {
89
92
  teardownEventListeners() {
90
93
  return _tslib.__awaiter(this, void 0, void 0, function* () {
91
94
  clearInterval(this.intervalId);
95
+ this.intervalId = undefined;
96
+ });
97
+ }
98
+ endSession() {
99
+ return _tslib.__awaiter(this, void 0, void 0, function* () {
100
+ this.teardownEventListeners();
92
101
  });
93
102
  }
94
103
  getConnectedAccounts() {
@@ -9,5 +9,6 @@ export declare class MetaMask extends StarknetProvider implements WalletConnecto
9
9
  getNetwork(): Promise<string | undefined>;
10
10
  setupEventListeners(): void;
11
11
  teardownEventListeners(): Promise<void>;
12
+ endSession(): Promise<void>;
12
13
  getConnectedAccounts(): Promise<string[]>;
13
14
  }
@@ -64,6 +64,9 @@ class MetaMask extends StarknetWalletConnector {
64
64
  });
65
65
  }
66
66
  setupEventListeners() {
67
+ if (this.intervalId) {
68
+ return;
69
+ }
67
70
  this.intervalId = setInterval(() => {
68
71
  this.getNetwork().then((chainId) => {
69
72
  if (!chainId) {
@@ -85,6 +88,12 @@ class MetaMask extends StarknetWalletConnector {
85
88
  teardownEventListeners() {
86
89
  return __awaiter(this, void 0, void 0, function* () {
87
90
  clearInterval(this.intervalId);
91
+ this.intervalId = undefined;
92
+ });
93
+ }
94
+ endSession() {
95
+ return __awaiter(this, void 0, void 0, function* () {
96
+ this.teardownEventListeners();
88
97
  });
89
98
  }
90
99
  getConnectedAccounts() {