@dynamic-labs/sdk-react-core 0.18.100-viem.20 → 0.18.100-viem.21

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,12 @@
1
1
 
2
+ ### [0.18.100-viem.21](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.20...v0.18.100-viem.21) (2023-09-28)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * better handling for starknet account changed event ([#3441](https://github.com/dynamic-labs/DynamicAuth/issues/3441)) ([#3453](https://github.com/dynamic-labs/DynamicAuth/issues/3453)) ([0d1fd05](https://github.com/dynamic-labs/DynamicAuth/commit/0d1fd05e365bd060dbf4d5a30dcfad1fff5b31ca))
8
+ * wait for networks to fetch wallets ([#3430](https://github.com/dynamic-labs/DynamicAuth/issues/3430)) ([69cac51](https://github.com/dynamic-labs/DynamicAuth/commit/69cac51479c7c8789bab7f8311c7c34dd5cf67fc))
9
+
2
10
  ### [0.18.100-viem.20](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.100-viem.19...v0.18.100-viem.20) (2023-09-25)
3
11
 
4
12
 
package/package.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = "0.18.100-viem.20";
5
+ var version = "0.18.100-viem.21";
6
6
  var dependencies = {
7
7
  "react-focus-lock": "2.9.2",
8
8
  "@dynamic-labs/iconic": "0.1.30",
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
- var version = "0.18.100-viem.20";
1
+ var version = "0.18.100-viem.21";
2
2
  var dependencies = {
3
3
  "react-focus-lock": "2.9.2",
4
4
  "@dynamic-labs/iconic": "0.1.30",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "0.18.100-viem.20",
3
+ "version": "0.18.100-viem.21",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -15,13 +15,13 @@
15
15
  "yup": "0.32.11",
16
16
  "formik": "2.2.9",
17
17
  "qrcode": "1.5.1",
18
- "@dynamic-labs/logger": "0.18.100-viem.20",
19
- "@dynamic-labs/multi-wallet": "0.18.100-viem.20",
20
- "@dynamic-labs/rpc-providers": "0.18.100-viem.20",
21
- "@dynamic-labs/types": "0.18.100-viem.20",
22
- "@dynamic-labs/utils": "0.18.100-viem.20",
23
- "@dynamic-labs/wallet-book": "0.18.100-viem.20",
24
- "@dynamic-labs/wallet-connector-core": "0.18.100-viem.20",
18
+ "@dynamic-labs/logger": "0.18.100-viem.21",
19
+ "@dynamic-labs/multi-wallet": "0.18.100-viem.21",
20
+ "@dynamic-labs/rpc-providers": "0.18.100-viem.21",
21
+ "@dynamic-labs/types": "0.18.100-viem.21",
22
+ "@dynamic-labs/utils": "0.18.100-viem.21",
23
+ "@dynamic-labs/wallet-book": "0.18.100-viem.21",
24
+ "@dynamic-labs/wallet-connector-core": "0.18.100-viem.21",
25
25
  "eventemitter3": "5.0.1"
26
26
  },
27
27
  "devDependencies": {
@@ -114,10 +114,6 @@ const useConnectWallet = ({ authMode, clearPrimaryWalletId, enableVisitTrackingO
114
114
  return;
115
115
  }
116
116
  }
117
- if (!currentWalletConnectorAddress) {
118
- walletConnectorCore.logger.error('Could not refresh the wallet. The wallet address is not available');
119
- return;
120
- }
121
117
  const currentWalletConnectorNetwork = yield walletConnector.getNetwork();
122
118
  updateConnectedWalletById(walletId, {
123
119
  address: currentWalletConnectorAddress,
@@ -110,10 +110,6 @@ const useConnectWallet = ({ authMode, clearPrimaryWalletId, enableVisitTrackingO
110
110
  return;
111
111
  }
112
112
  }
113
- if (!currentWalletConnectorAddress) {
114
- logger.error('Could not refresh the wallet. The wallet address is not available');
115
- return;
116
- }
117
113
  const currentWalletConnectorNetwork = yield walletConnector.getNetwork();
118
114
  updateConnectedWalletById(walletId, {
119
115
  address: currentWalletConnectorAddress,
@@ -8,7 +8,9 @@ var verifyMagicIsSetup = require('./utils/verifyMagicIsSetup/verifyMagicIsSetup.
8
8
 
9
9
  const useWallets = ({ projectSettings, appLogoUrl, appName, deepLinkPreference, flowNetwork, networkConfigurations, walletBook, walletConnectV1Bridge, walletUiUtils, walletConnectorsProp, }) => {
10
10
  const wallets = React.useMemo(() => {
11
- if (!projectSettings || !Object.keys(walletBook !== null && walletBook !== void 0 ? walletBook : {}).length)
11
+ if (!projectSettings ||
12
+ !Object.keys(walletBook !== null && walletBook !== void 0 ? walletBook : {}).length ||
13
+ !networkConfigurations)
12
14
  return [];
13
15
  return data.getWallets({
14
16
  getSupportedWalletOpts: {
@@ -36,6 +38,7 @@ const useWallets = ({ projectSettings, appLogoUrl, appName, deepLinkPreference,
36
38
  walletConnectV1Bridge,
37
39
  flowNetwork,
38
40
  Object.keys(walletBook !== null && walletBook !== void 0 ? walletBook : {}).length,
41
+ networkConfigurations,
39
42
  ]);
40
43
  React.useEffect(() => {
41
44
  if (!projectSettings || wallets.length === 0)
@@ -4,7 +4,9 @@ import { verifyMagicIsSetup } from './utils/verifyMagicIsSetup/verifyMagicIsSetu
4
4
 
5
5
  const useWallets = ({ projectSettings, appLogoUrl, appName, deepLinkPreference, flowNetwork, networkConfigurations, walletBook, walletConnectV1Bridge, walletUiUtils, walletConnectorsProp, }) => {
6
6
  const wallets = useMemo(() => {
7
- if (!projectSettings || !Object.keys(walletBook !== null && walletBook !== void 0 ? walletBook : {}).length)
7
+ if (!projectSettings ||
8
+ !Object.keys(walletBook !== null && walletBook !== void 0 ? walletBook : {}).length ||
9
+ !networkConfigurations)
8
10
  return [];
9
11
  return getWallets({
10
12
  getSupportedWalletOpts: {
@@ -32,6 +34,7 @@ const useWallets = ({ projectSettings, appLogoUrl, appName, deepLinkPreference,
32
34
  walletConnectV1Bridge,
33
35
  flowNetwork,
34
36
  Object.keys(walletBook !== null && walletBook !== void 0 ? walletBook : {}).length,
37
+ networkConfigurations,
35
38
  ]);
36
39
  useEffect(() => {
37
40
  if (!projectSettings || wallets.length === 0)