@dynamic-labs/sdk-react-core 1.0.1 → 1.0.2

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,14 @@
1
1
 
2
+ ### [1.0.2](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.1...v1.0.2) (2023-12-18)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * prevent duplicated brave wallet connector ([#4209](https://github.com/dynamic-labs/DynamicAuth/issues/4209)) ([31589b9](https://github.com/dynamic-labs/DynamicAuth/commit/31589b92ea067a5e7ca5a5bd9adb881d086d7868))
8
+ * ensure wagmi connects to primary wallet ([#4206](https://github.com/dynamic-labs/DynamicAuth/issues/4206)) ([#4210](https://github.com/dynamic-labs/DynamicAuth/issues/4210)) ([072bb05](https://github.com/dynamic-labs/DynamicAuth/commit/072bb05a5a9fd5b82f5498c20ff74ca966f3ea9f))
9
+ * ensure wallets group view shows multiple options ([#4184](https://github.com/dynamic-labs/DynamicAuth/issues/4184)) ([#4187](https://github.com/dynamic-labs/DynamicAuth/issues/4187)) ([b751f49](https://github.com/dynamic-labs/DynamicAuth/commit/b751f4952ea5a46b536edc999f37ea134348f8ef)), closes [#4186](https://github.com/dynamic-labs/DynamicAuth/issues/4186)
10
+ * enable brave to read the connected network ([#4198](https://github.com/dynamic-labs/DynamicAuth/issues/4198)) ([979e866](https://github.com/dynamic-labs/DynamicAuth/commit/979e86660f13982992cd43b1d9a8218150437e8b))
11
+
2
12
  ### [1.0.1](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0...v1.0.1) (2023-12-14)
3
13
 
4
14
 
package/package.cjs CHANGED
@@ -2,10 +2,10 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = "1.0.1";
5
+ var version = "1.0.2";
6
6
  var dependencies = {
7
7
  "@dynamic-labs/iconic": "0.1.45",
8
- "@dynamic-labs/sdk-api": "0.0.323",
8
+ "@dynamic-labs/sdk-api": "0.0.330",
9
9
  "@hcaptcha/react-hcaptcha": "1.4.4",
10
10
  "country-list": "2.3.0",
11
11
  formik: "2.2.9",
package/package.js CHANGED
@@ -1,7 +1,7 @@
1
- var version = "1.0.1";
1
+ var version = "1.0.2";
2
2
  var dependencies = {
3
3
  "@dynamic-labs/iconic": "0.1.45",
4
- "@dynamic-labs/sdk-api": "0.0.323",
4
+ "@dynamic-labs/sdk-api": "0.0.330",
5
5
  "@hcaptcha/react-hcaptcha": "1.4.4",
6
6
  "country-list": "2.3.0",
7
7
  formik: "2.2.9",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "1.0.1",
3
+ "version": "1.0.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -8,7 +8,7 @@
8
8
  },
9
9
  "dependencies": {
10
10
  "@dynamic-labs/iconic": "0.1.45",
11
- "@dynamic-labs/sdk-api": "0.0.323",
11
+ "@dynamic-labs/sdk-api": "0.0.330",
12
12
  "@hcaptcha/react-hcaptcha": "1.4.4",
13
13
  "country-list": "2.3.0",
14
14
  "formik": "2.2.9",
@@ -17,15 +17,15 @@
17
17
  "react-focus-lock": "2.9.2",
18
18
  "react-i18next": "^13.2.0",
19
19
  "yup": "0.32.11",
20
- "@dynamic-labs/ethereum": "1.0.1",
21
- "@dynamic-labs/logger": "1.0.1",
22
- "@dynamic-labs/multi-wallet": "1.0.1",
23
- "@dynamic-labs/rpc-providers": "1.0.1",
24
- "@dynamic-labs/types": "1.0.1",
25
- "@dynamic-labs/utils": "1.0.1",
26
- "@dynamic-labs/viem-utils": "1.0.1",
27
- "@dynamic-labs/wallet-book": "1.0.1",
28
- "@dynamic-labs/wallet-connector-core": "1.0.1",
20
+ "@dynamic-labs/ethereum": "1.0.2",
21
+ "@dynamic-labs/logger": "1.0.2",
22
+ "@dynamic-labs/multi-wallet": "1.0.2",
23
+ "@dynamic-labs/rpc-providers": "1.0.2",
24
+ "@dynamic-labs/types": "1.0.2",
25
+ "@dynamic-labs/utils": "1.0.2",
26
+ "@dynamic-labs/viem-utils": "1.0.2",
27
+ "@dynamic-labs/wallet-book": "1.0.2",
28
+ "@dynamic-labs/wallet-connector-core": "1.0.2",
29
29
  "eventemitter3": "5.0.1"
30
30
  },
31
31
  "devDependencies": {
@@ -28,9 +28,11 @@ const groupWalletOptions = (walletBook$1, walletOptionList) => {
28
28
  // Validate if there is any other wallet with the same group
29
29
  const isThereWalletOptionWithSameGroup = walletOptionList.some((walletOption) => {
30
30
  var _a;
31
- return currentWalletOption.group === walletOption.group &&
32
- (((_a = walletOption.injectedConfig) === null || _a === void 0 ? void 0 : _a.length) ||
33
- currentWalletOption.key !== walletOption.key);
31
+ const isSameGroup = currentWalletOption.group === walletOption.group;
32
+ const isDifferentKey = currentWalletOption.key !== walletOption.key;
33
+ const hasInjectedConfig = ((_a = walletOption.injectedConfig) === null || _a === void 0 ? void 0 : _a.length) &&
34
+ walletOption.injectedConfig.length > 1;
35
+ return isSameGroup && (hasInjectedConfig || isDifferentKey);
34
36
  });
35
37
  // Avoid group creation if there only one wallet in group
36
38
  if (!isThereWalletOptionWithSameGroup) {
@@ -24,9 +24,11 @@ const groupWalletOptions = (walletBook, walletOptionList) => {
24
24
  // Validate if there is any other wallet with the same group
25
25
  const isThereWalletOptionWithSameGroup = walletOptionList.some((walletOption) => {
26
26
  var _a;
27
- return currentWalletOption.group === walletOption.group &&
28
- (((_a = walletOption.injectedConfig) === null || _a === void 0 ? void 0 : _a.length) ||
29
- currentWalletOption.key !== walletOption.key);
27
+ const isSameGroup = currentWalletOption.group === walletOption.group;
28
+ const isDifferentKey = currentWalletOption.key !== walletOption.key;
29
+ const hasInjectedConfig = ((_a = walletOption.injectedConfig) === null || _a === void 0 ? void 0 : _a.length) &&
30
+ walletOption.injectedConfig.length > 1;
31
+ return isSameGroup && (hasInjectedConfig || isDifferentKey);
30
32
  });
31
33
  // Avoid group creation if there only one wallet in group
32
34
  if (!isThereWalletOptionWithSameGroup) {