@dynamic-labs/starknet 1.1.0-alpha.20 → 1.1.0-alpha.22

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,25 @@
1
1
 
2
+ ## [1.1.0-alpha.22](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.21...v1.1.0-alpha.22) (2024-02-01)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * onAuthFlowClose not being called ([#4563](https://github.com/dynamic-labs/DynamicAuth/issues/4563)) ([c4b2648](https://github.com/dynamic-labs/DynamicAuth/commit/c4b264885b7dba6e204ef49bf642d25c7d287b04))
8
+
9
+ ## [1.1.0-alpha.21](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.20...v1.1.0-alpha.21) (2024-02-01)
10
+
11
+
12
+ ### Features
13
+
14
+ * add phantom redirect handling context ([#4479](https://github.com/dynamic-labs/DynamicAuth/issues/4479)) ([e0218ee](https://github.com/dynamic-labs/DynamicAuth/commit/e0218eec1a67787f5c0e7483d542a5f773e911ef))
15
+ * add signPsbt method to bitcoin wallet connectors ([dfdc0fe](https://github.com/dynamic-labs/DynamicAuth/commit/dfdc0fe0e6894c1307b286e89b43a4c58a8808f3))
16
+
17
+
18
+ ### Bug Fixes
19
+
20
+ * relax passkey feature detection check in sdk to avoid false nega… ([#4556](https://github.com/dynamic-labs/DynamicAuth/issues/4556)) ([4554f7d](https://github.com/dynamic-labs/DynamicAuth/commit/4554f7d7c5339859481cdecca95a9c07fae4ba5c))
21
+ * workaround braavos undefined selectedWallet on chainChange event ([#4552](https://github.com/dynamic-labs/DynamicAuth/issues/4552)) ([aa35df0](https://github.com/dynamic-labs/DynamicAuth/commit/aa35df0e894feafa0606aa1c87bd3d3879ebc594))
22
+
2
23
  ## [1.1.0-alpha.20](https://github.com/dynamic-labs/DynamicAuth/compare/v1.1.0-alpha.19...v1.1.0-alpha.20) (2024-01-31)
3
24
 
4
25
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/starknet",
3
- "version": "1.1.0-alpha.20",
3
+ "version": "1.1.0-alpha.22",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -31,11 +31,11 @@
31
31
  "text-encoding": "0.7.0",
32
32
  "starknetkit": "1.1.3",
33
33
  "@dynamic-labs/sdk-api": "0.0.356",
34
- "@dynamic-labs/rpc-providers": "1.1.0-alpha.20",
35
- "@dynamic-labs/types": "1.1.0-alpha.20",
36
- "@dynamic-labs/utils": "1.1.0-alpha.20",
37
- "@dynamic-labs/wallet-book": "1.1.0-alpha.20",
38
- "@dynamic-labs/wallet-connector-core": "1.1.0-alpha.20"
34
+ "@dynamic-labs/rpc-providers": "1.1.0-alpha.22",
35
+ "@dynamic-labs/types": "1.1.0-alpha.22",
36
+ "@dynamic-labs/utils": "1.1.0-alpha.22",
37
+ "@dynamic-labs/wallet-book": "1.1.0-alpha.22",
38
+ "@dynamic-labs/wallet-connector-core": "1.1.0-alpha.22"
39
39
  },
40
40
  "peerDependencies": {}
41
41
  }
@@ -181,7 +181,14 @@ class StarknetWalletConnector extends walletConnectorCore.WalletConnectorBase {
181
181
  if (needsReconnection) {
182
182
  yield this.connect();
183
183
  }
184
- return wallet.selectedAddress ? [wallet.selectedAddress] : [];
184
+ const getSelectedAddress = () => wallet.selectedAddress
185
+ ? Promise.resolve([wallet.selectedAddress])
186
+ : Promise.reject();
187
+ return utils.retryableFn(getSelectedAddress, {
188
+ fallbackValue: [],
189
+ retryIntervalMs: 100,
190
+ retryStrategy: 'timeout-and-rejection',
191
+ });
185
192
  });
186
193
  }
187
194
  setupEventListeners() {
@@ -2,7 +2,7 @@ import { __awaiter } from '../_virtual/_tslib.js';
2
2
  import { getStarknet } from 'get-starknet-core';
3
3
  import { RpcProvider, Contract, cairo, constants } from 'starknet';
4
4
  import { WalletConnectorBase, logger } from '@dynamic-labs/wallet-connector-core';
5
- import { DynamicError } from '@dynamic-labs/utils';
5
+ import { DynamicError, retryableFn } from '@dynamic-labs/utils';
6
6
  import { ProviderChain } from '@dynamic-labs/rpc-providers';
7
7
  import { ETH_STARKNET_ADDRESS } from './constants.js';
8
8
  import ETH_CONTRACT_ABI from './ethereumContractAbi.js';
@@ -177,7 +177,14 @@ class StarknetWalletConnector extends WalletConnectorBase {
177
177
  if (needsReconnection) {
178
178
  yield this.connect();
179
179
  }
180
- return wallet.selectedAddress ? [wallet.selectedAddress] : [];
180
+ const getSelectedAddress = () => wallet.selectedAddress
181
+ ? Promise.resolve([wallet.selectedAddress])
182
+ : Promise.reject();
183
+ return retryableFn(getSelectedAddress, {
184
+ fallbackValue: [],
185
+ retryIntervalMs: 100,
186
+ retryStrategy: 'timeout-and-rejection',
187
+ });
181
188
  });
182
189
  }
183
190
  setupEventListeners() {