@dynamic-labs/sdk-react-core 0.17.20 → 0.17.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,19 @@
1
1
 
2
+ ### [0.17.22](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.21...v0.17.22) (2023-07-10)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * **MagicWalletConnector:** check if user is logged when getting balance ([#2615](https://github.com/dynamic-labs/DynamicAuth/issues/2615)) ([ece4073](https://github.com/dynamic-labs/DynamicAuth/commit/ece407333f4e4aadde3601aab51a99fdffb1932b))
8
+ * **useValidateSession:** only check for bridge on wallet connect wallets ([#2616](https://github.com/dynamic-labs/DynamicAuth/issues/2616)) ([063828b](https://github.com/dynamic-labs/DynamicAuth/commit/063828b14855fc0601c39f232dde959330b474a7))
9
+
10
+ ### [0.17.21](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.20...v0.17.21) (2023-07-06)
11
+
12
+
13
+ ### Bug Fixes
14
+
15
+ * metamask getConnectedAccounts triggering an infinite loop ([#2580](https://github.com/dynamic-labs/DynamicAuth/issues/2580)) ([b67e149](https://github.com/dynamic-labs/DynamicAuth/commit/b67e14985285fb28197adb8e8e1aab9c04506a2d))
16
+
2
17
  ### [0.17.20](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.19...v0.17.20) (2023-07-03)
3
18
 
4
19
 
package/package.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = "0.17.20";
5
+ var version = "0.17.22";
6
6
  var dependencies = {
7
7
  "react-focus-lock": "2.9.2",
8
8
  "@dynamic-labs/iconic": "0.1.23",
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
- var version = "0.17.20";
1
+ var version = "0.17.22";
2
2
  var dependencies = {
3
3
  "react-focus-lock": "2.9.2",
4
4
  "@dynamic-labs/iconic": "0.1.23",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "0.17.20",
3
+ "version": "0.17.22",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -16,13 +16,13 @@
16
16
  "formik": "2.2.9",
17
17
  "qrcode": "1.5.1",
18
18
  "ethers": "5.7.2",
19
- "@dynamic-labs/logger": "0.17.20",
20
- "@dynamic-labs/multi-wallet": "0.17.20",
21
- "@dynamic-labs/rpc-providers": "0.17.20",
22
- "@dynamic-labs/types": "0.17.20",
23
- "@dynamic-labs/utils": "0.17.20",
24
- "@dynamic-labs/wallet-book": "0.17.20",
25
- "@dynamic-labs/wallet-connector-core": "0.17.20"
19
+ "@dynamic-labs/logger": "0.17.22",
20
+ "@dynamic-labs/multi-wallet": "0.17.22",
21
+ "@dynamic-labs/rpc-providers": "0.17.22",
22
+ "@dynamic-labs/types": "0.17.22",
23
+ "@dynamic-labs/utils": "0.17.22",
24
+ "@dynamic-labs/wallet-book": "0.17.22",
25
+ "@dynamic-labs/wallet-connector-core": "0.17.22"
26
26
  },
27
27
  "devDependencies": {
28
28
  "semver": "7.3.8"
@@ -15,7 +15,10 @@ const useSyncPrimaryWallet = ({ computeConnectedStateForWallets, handleLogOut, m
15
15
  ...secondaryWallets,
16
16
  ]);
17
17
  if (!connectedWalletIsLinked) {
18
- const connectedSecondaryWallet = secondaryWallets.find((wallet) => wallet.connected);
18
+ // MM returns all connected wallets now, so we need to check if the active account
19
+ // is not in the same wallet as the primary wallet before automatically switching
20
+ // to a connected secondary wallet as it was causing an infinite loop
21
+ const connectedSecondaryWallet = secondaryWallets.find((wallet) => wallet.connected && primaryWallet.connector !== wallet.connector);
19
22
  if (!connectedSecondaryWallet) {
20
23
  setMultiWalletWidgetState('awaiting_account_switch', 'primary_not_connected');
21
24
  return;
@@ -11,7 +11,10 @@ const useSyncPrimaryWallet = ({ computeConnectedStateForWallets, handleLogOut, m
11
11
  ...secondaryWallets,
12
12
  ]);
13
13
  if (!connectedWalletIsLinked) {
14
- const connectedSecondaryWallet = secondaryWallets.find((wallet) => wallet.connected);
14
+ // MM returns all connected wallets now, so we need to check if the active account
15
+ // is not in the same wallet as the primary wallet before automatically switching
16
+ // to a connected secondary wallet as it was causing an infinite loop
17
+ const connectedSecondaryWallet = secondaryWallets.find((wallet) => wallet.connected && primaryWallet.connector !== wallet.connector);
15
18
  if (!connectedSecondaryWallet) {
16
19
  setMultiWalletWidgetState('awaiting_account_switch', 'primary_not_connected');
17
20
  return;
@@ -40,6 +40,9 @@ const useValidateSession = ({ handleLogOut, user, authToken, walletConnectV1Brid
40
40
  let currentWalletConnectV1Bridge;
41
41
  if (walletConnectors) {
42
42
  for (const connector of walletConnectors) {
43
+ if (!connector.isWalletConnect) {
44
+ continue;
45
+ }
43
46
  const session = yield connector.getSession();
44
47
  const bridge = session && (session === null || session === void 0 ? void 0 : session.bridge);
45
48
  if (bridge) {
@@ -36,6 +36,9 @@ const useValidateSession = ({ handleLogOut, user, authToken, walletConnectV1Brid
36
36
  let currentWalletConnectV1Bridge;
37
37
  if (walletConnectors) {
38
38
  for (const connector of walletConnectors) {
39
+ if (!connector.isWalletConnect) {
40
+ continue;
41
+ }
39
42
  const session = yield connector.getSession();
40
43
  const bridge = session && (session === null || session === void 0 ? void 0 : session.bridge);
41
44
  if (bridge) {