@dynamic-labs/sdk-react-core 2.2.0-alpha.4 → 3.0.0-alpha.0

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,15 @@
1
1
 
2
+ ## [3.0.0-alpha.0](https://github.com/dynamic-labs/DynamicAuth/compare/v2.2.0-alpha.5...v3.0.0-alpha.0) (2024-06-10)
3
+
4
+ ## [2.2.0-alpha.5](https://github.com/dynamic-labs/DynamicAuth/compare/v2.2.0-alpha.4...v2.2.0-alpha.5) (2024-06-08)
5
+
6
+
7
+ ### Bug Fixes
8
+
9
+ * find solana provider from wallet standard ([#5897](https://github.com/dynamic-labs/DynamicAuth/issues/5897)) ([2144041](https://github.com/dynamic-labs/DynamicAuth/commit/21440410c3a75983195260ce57f4442177480c65))
10
+ * remove force consent and account selection even for returning google users ([#5911](https://github.com/dynamic-labs/DynamicAuth/issues/5911)) ([8b2a358](https://github.com/dynamic-labs/DynamicAuth/commit/8b2a3586ee559c553a1615a57c34226c175db2f9))
11
+ * retrieve connected account from cache when MagicEden wallet is secondary and locked ([#5885](https://github.com/dynamic-labs/DynamicAuth/issues/5885)) ([fb35a65](https://github.com/dynamic-labs/DynamicAuth/commit/fb35a651dc18dbdc2bfaad87b7528bfae977f7e3))
12
+
2
13
  ## [2.2.0-alpha.4](https://github.com/dynamic-labs/DynamicAuth/compare/v2.2.0-alpha.3...v2.2.0-alpha.4) (2024-06-06)
3
14
 
4
15
 
package/package.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "2.2.0-alpha.4";
6
+ var version = "3.0.0-alpha.0";
7
7
  var dependencies = {
8
8
  "@dynamic-labs/sdk-api-core": "0.0.460",
9
9
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client'
2
- var version = "2.2.0-alpha.4";
2
+ var version = "3.0.0-alpha.0";
3
3
  var dependencies = {
4
4
  "@dynamic-labs/sdk-api-core": "0.0.460",
5
5
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "2.2.0-alpha.4",
3
+ "version": "3.0.0-alpha.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/dynamic-labs/dynamic-auth.git",
@@ -17,18 +17,18 @@
17
17
  "react-i18next": "13.5.0",
18
18
  "yup": "0.32.11",
19
19
  "react-international-phone": "4.2.5",
20
- "@dynamic-labs/iconic": "2.2.0-alpha.4",
21
- "@dynamic-labs/logger": "2.2.0-alpha.4",
22
- "@dynamic-labs/multi-wallet": "2.2.0-alpha.4",
23
- "@dynamic-labs/rpc-provider-ethereum": "2.2.0-alpha.4",
24
- "@dynamic-labs/rpc-provider-solana": "2.2.0-alpha.4",
25
- "@dynamic-labs/rpc-providers": "2.2.0-alpha.4",
26
- "@dynamic-labs/store": "2.2.0-alpha.4",
27
- "@dynamic-labs/types": "2.2.0-alpha.4",
28
- "@dynamic-labs/utils": "2.2.0-alpha.4",
29
- "@dynamic-labs/viem-utils": "2.2.0-alpha.4",
30
- "@dynamic-labs/wallet-book": "2.2.0-alpha.4",
31
- "@dynamic-labs/wallet-connector-core": "2.2.0-alpha.4",
20
+ "@dynamic-labs/iconic": "3.0.0-alpha.0",
21
+ "@dynamic-labs/logger": "3.0.0-alpha.0",
22
+ "@dynamic-labs/multi-wallet": "3.0.0-alpha.0",
23
+ "@dynamic-labs/rpc-provider-ethereum": "3.0.0-alpha.0",
24
+ "@dynamic-labs/rpc-provider-solana": "3.0.0-alpha.0",
25
+ "@dynamic-labs/rpc-providers": "3.0.0-alpha.0",
26
+ "@dynamic-labs/store": "3.0.0-alpha.0",
27
+ "@dynamic-labs/types": "3.0.0-alpha.0",
28
+ "@dynamic-labs/utils": "3.0.0-alpha.0",
29
+ "@dynamic-labs/viem-utils": "3.0.0-alpha.0",
30
+ "@dynamic-labs/wallet-book": "3.0.0-alpha.0",
31
+ "@dynamic-labs/wallet-connector-core": "3.0.0-alpha.0",
32
32
  "eventemitter3": "5.0.1"
33
33
  },
34
34
  "devDependencies": {
@@ -32,7 +32,6 @@ const OAUTH_LOGIN_DATA = {
32
32
  url: 'https://github.com/login/oauth/authorize',
33
33
  },
34
34
  google: {
35
- prompt: ['select_account', 'consent'],
36
35
  scope: ['profile', 'email'],
37
36
  url: 'https://accounts.google.com/o/oauth2/v2/auth',
38
37
  },
@@ -28,7 +28,6 @@ const OAUTH_LOGIN_DATA = {
28
28
  url: 'https://github.com/login/oauth/authorize',
29
29
  },
30
30
  google: {
31
- prompt: ['select_account', 'consent'],
32
31
  scope: ['profile', 'email'],
33
32
  url: 'https://accounts.google.com/o/oauth2/v2/auth',
34
33
  },
@@ -5,11 +5,11 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var _tslib = require('../../../../../_virtual/_tslib.cjs');
7
7
  var React = require('react');
8
+ var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
8
9
  var UserWalletsContext = require('../../../context/UserWalletsContext/UserWalletsContext.cjs');
9
10
  require('@dynamic-labs/sdk-api-core');
10
11
  require('../../../shared/logger.cjs');
11
12
  require('@dynamic-labs/iconic');
12
- require('@dynamic-labs/wallet-connector-core');
13
13
  require('react/jsx-runtime');
14
14
  require('../../../context/ViewContext/ViewContext.cjs');
15
15
  require('@dynamic-labs/wallet-book');
@@ -53,6 +53,11 @@ const useHandleUnlinkWallet = ({ verifiedCredentials, environmentId, primaryWall
53
53
  const numberOfLinkedWallets = verifiedCredentials.filter((account) => account.walletName === ((wallet === null || wallet === void 0 ? void 0 : wallet.connector.key) || '')).length;
54
54
  // If there's only 1, it's the one being removed and we can kill the session
55
55
  if (numberOfLinkedWallets === 1) {
56
+ if (wallet && walletConnectorCore.isBitcoinConnector(wallet.connector)) {
57
+ // to avoid the infinite wallet popup issue experienced with the ME wallet
58
+ // we only want to clear the cached connected accounts when we unlink, but not on logout
59
+ yield (wallet === null || wallet === void 0 ? void 0 : wallet.connector.clearConnectedAccounts());
60
+ }
56
61
  yield (wallet === null || wallet === void 0 ? void 0 : wallet.connector.endSession());
57
62
  }
58
63
  removedWalletsIds.current.push(walletId);
@@ -1,11 +1,11 @@
1
1
  'use client'
2
2
  import { __awaiter } from '../../../../../_virtual/_tslib.js';
3
3
  import { useCallback } from 'react';
4
+ import { isBitcoinConnector } from '@dynamic-labs/wallet-connector-core';
4
5
  import { useInternalUserWallets } from '../../../context/UserWalletsContext/UserWalletsContext.js';
5
6
  import '@dynamic-labs/sdk-api-core';
6
7
  import '../../../shared/logger.js';
7
8
  import '@dynamic-labs/iconic';
8
- import '@dynamic-labs/wallet-connector-core';
9
9
  import 'react/jsx-runtime';
10
10
  import '../../../context/ViewContext/ViewContext.js';
11
11
  import '@dynamic-labs/wallet-book';
@@ -49,6 +49,11 @@ const useHandleUnlinkWallet = ({ verifiedCredentials, environmentId, primaryWall
49
49
  const numberOfLinkedWallets = verifiedCredentials.filter((account) => account.walletName === ((wallet === null || wallet === void 0 ? void 0 : wallet.connector.key) || '')).length;
50
50
  // If there's only 1, it's the one being removed and we can kill the session
51
51
  if (numberOfLinkedWallets === 1) {
52
+ if (wallet && isBitcoinConnector(wallet.connector)) {
53
+ // to avoid the infinite wallet popup issue experienced with the ME wallet
54
+ // we only want to clear the cached connected accounts when we unlink, but not on logout
55
+ yield (wallet === null || wallet === void 0 ? void 0 : wallet.connector.clearConnectedAccounts());
56
+ }
52
57
  yield (wallet === null || wallet === void 0 ? void 0 : wallet.connector.endSession());
53
58
  }
54
59
  removedWalletsIds.current.push(walletId);