@dynamic-labs/wallet-connector-core 4.0.0-alpha.43 → 4.0.0-alpha.45

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,31 @@
1
1
 
2
+ ## [4.0.0-alpha.45](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.44...v4.0.0-alpha.45) (2024-12-11)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * don't throw error if wallet no found in walletbook when fetching metadata ([#7579](https://github.com/dynamic-labs/dynamic-auth/issues/7579)) ([93074a1](https://github.com/dynamic-labs/dynamic-auth/commit/93074a11da1b843cd44ad986c7cfd1f243f2a65d))
8
+
9
+ ## [4.0.0-alpha.44](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.43...v4.0.0-alpha.44) (2024-12-09)
10
+
11
+
12
+ ### ⚠ BREAKING CHANGES
13
+
14
+ * Removes the `eventsCallbacks` prop which has been deprecated for a while. Use the `events` prop instead.
15
+
16
+ ### Features
17
+
18
+ * allows changing the storage postfix ([#7558](https://github.com/dynamic-labs/dynamic-auth/issues/7558)) ([f0aac70](https://github.com/dynamic-labs/dynamic-auth/commit/f0aac703732a69615f11876023684509ad87af62))
19
+ * allows filtering tokens ([#7561](https://github.com/dynamic-labs/dynamic-auth/issues/7561)) ([e73b56c](https://github.com/dynamic-labs/dynamic-auth/commit/e73b56cd41ead7e4f693d19ccb2670602d1107c5))
20
+
21
+
22
+ ### Bug Fixes
23
+
24
+ * fetch and store public key for onekey btc wallet ([#7577](https://github.com/dynamic-labs/dynamic-auth/issues/7577)) ([634e7ac](https://github.com/dynamic-labs/dynamic-auth/commit/634e7ac40dcbe6780f7b52f2aaf6b0a90f1e7325))
25
+
26
+
27
+ * remove eventsCallbacks ([#7571](https://github.com/dynamic-labs/dynamic-auth/issues/7571)) ([7006db3](https://github.com/dynamic-labs/dynamic-auth/commit/7006db3f23ee87b23b075941e16d216d1b8bc356))
28
+
2
29
  ## [4.0.0-alpha.43](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.42...v4.0.0-alpha.43) (2024-12-09)
3
30
 
4
31
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.0.0-alpha.43";
6
+ var version = "4.0.0-alpha.45";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.0.0-alpha.43";
2
+ var version = "4.0.0-alpha.45";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/wallet-connector-core",
3
- "version": "4.0.0-alpha.43",
3
+ "version": "4.0.0-alpha.45",
4
4
  "description": "Core package for utilities and types for handling multiple wallet/chain support Dynamic SDK",
5
5
  "author": "Dynamic Labs, Inc.",
6
6
  "license": "MIT",
@@ -21,12 +21,12 @@
21
21
  "@dynamic-labs/sdk-api-core": "0.0.570"
22
22
  },
23
23
  "peerDependencies": {
24
- "@dynamic-labs/assert-package-version": "4.0.0-alpha.43",
25
- "@dynamic-labs/logger": "4.0.0-alpha.43",
26
- "@dynamic-labs/rpc-providers": "4.0.0-alpha.43",
27
- "@dynamic-labs/types": "4.0.0-alpha.43",
28
- "@dynamic-labs/utils": "4.0.0-alpha.43",
29
- "@dynamic-labs/wallet-book": "4.0.0-alpha.43",
24
+ "@dynamic-labs/assert-package-version": "4.0.0-alpha.45",
25
+ "@dynamic-labs/logger": "4.0.0-alpha.45",
26
+ "@dynamic-labs/rpc-providers": "4.0.0-alpha.45",
27
+ "@dynamic-labs/types": "4.0.0-alpha.45",
28
+ "@dynamic-labs/utils": "4.0.0-alpha.45",
29
+ "@dynamic-labs/wallet-book": "4.0.0-alpha.45",
30
30
  "eventemitter3": "5.0.1"
31
31
  }
32
32
  }
@@ -19,28 +19,36 @@ const getWalletMetadataFromWalletBook = ({ walletKey, walletBookWallet, walletBo
19
19
  logger.logger.warn('Wallet book is required');
20
20
  return;
21
21
  }
22
- const wallet = walletBookWallet !== null && walletBookWallet !== void 0 ? walletBookWallet : walletBook.getWalletBookWallet(walletBook$1, walletKey, walletFallback);
23
- // if no walletBookWallet is provided and no wallet is found in the wallet book, throw an error
24
- if (!wallet) {
25
- logger.logger.warn('Wallet not found in wallet book');
22
+ try {
23
+ const wallet = walletBookWallet !== null && walletBookWallet !== void 0 ? walletBookWallet : walletBook.getWalletBookWallet(walletBook$1, walletKey, walletFallback);
24
+ // if no walletBookWallet is provided and no wallet is found in the wallet book, throw an error
25
+ if (!wallet) {
26
+ logger.logger.warn('Wallet not found in wallet book');
27
+ return;
28
+ }
29
+ return {
30
+ brandColor: getValidHexColor.getValidHexColor((_a = wallet === null || wallet === void 0 ? void 0 : wallet.brand) === null || _a === void 0 ? void 0 : _a.primaryColor),
31
+ deepLinks: getDeepLinks.getDeepLinks({
32
+ desktop: wallet === null || wallet === void 0 ? void 0 : wallet.desktop,
33
+ mobile: wallet === null || wallet === void 0 ? void 0 : wallet.mobile,
34
+ }),
35
+ downloadLinks: getDownloadLinks.getDownloadLinks(wallet),
36
+ groupKey: (_b = wallet === null || wallet === void 0 ? void 0 : wallet.chainGroup) !== null && _b !== void 0 ? _b : wallet === null || wallet === void 0 ? void 0 : wallet.walletGroup,
37
+ icon: (_d = getIconUrl.getIconUrl((_c = wallet === null || wallet === void 0 ? void 0 : wallet.brand) === null || _c === void 0 ? void 0 : _c.spriteId)) !== null && _d !== void 0 ? _d : '',
38
+ id: walletKey,
39
+ inAppBrowserUrl: (_f = (_e = wallet.mobile) === null || _e === void 0 ? void 0 : _e.inAppBrowser) !== null && _f !== void 0 ? _f : undefined,
40
+ name: wallet.name,
41
+ rdns: (_g = wallet.eip6963Config) === null || _g === void 0 ? void 0 : _g.rdns,
42
+ supportedHardwareWallets: wallet.hardwareWallets,
43
+ walletLimitations: getWalletLimitations.getWalletLimitations(wallet.walletLimitations),
44
+ };
45
+ }
46
+ catch (e) {
47
+ logger.logger.warn('Error getting wallet metadata from wallet book', {
48
+ error: e,
49
+ });
26
50
  return;
27
51
  }
28
- return {
29
- brandColor: getValidHexColor.getValidHexColor((_a = wallet === null || wallet === void 0 ? void 0 : wallet.brand) === null || _a === void 0 ? void 0 : _a.primaryColor),
30
- deepLinks: getDeepLinks.getDeepLinks({
31
- desktop: wallet === null || wallet === void 0 ? void 0 : wallet.desktop,
32
- mobile: wallet === null || wallet === void 0 ? void 0 : wallet.mobile,
33
- }),
34
- downloadLinks: getDownloadLinks.getDownloadLinks(wallet),
35
- groupKey: (_b = wallet === null || wallet === void 0 ? void 0 : wallet.chainGroup) !== null && _b !== void 0 ? _b : wallet === null || wallet === void 0 ? void 0 : wallet.walletGroup,
36
- icon: (_d = getIconUrl.getIconUrl((_c = wallet === null || wallet === void 0 ? void 0 : wallet.brand) === null || _c === void 0 ? void 0 : _c.spriteId)) !== null && _d !== void 0 ? _d : '',
37
- id: walletKey,
38
- inAppBrowserUrl: (_f = (_e = wallet.mobile) === null || _e === void 0 ? void 0 : _e.inAppBrowser) !== null && _f !== void 0 ? _f : undefined,
39
- name: wallet.name,
40
- rdns: (_g = wallet.eip6963Config) === null || _g === void 0 ? void 0 : _g.rdns,
41
- supportedHardwareWallets: wallet.hardwareWallets,
42
- walletLimitations: getWalletLimitations.getWalletLimitations(wallet.walletLimitations),
43
- };
44
52
  };
45
53
 
46
54
  exports.getWalletMetadataFromWalletBook = getWalletMetadataFromWalletBook;
@@ -15,28 +15,36 @@ const getWalletMetadataFromWalletBook = ({ walletKey, walletBookWallet, walletBo
15
15
  logger.warn('Wallet book is required');
16
16
  return;
17
17
  }
18
- const wallet = walletBookWallet !== null && walletBookWallet !== void 0 ? walletBookWallet : getWalletBookWallet(walletBook, walletKey, walletFallback);
19
- // if no walletBookWallet is provided and no wallet is found in the wallet book, throw an error
20
- if (!wallet) {
21
- logger.warn('Wallet not found in wallet book');
18
+ try {
19
+ const wallet = walletBookWallet !== null && walletBookWallet !== void 0 ? walletBookWallet : getWalletBookWallet(walletBook, walletKey, walletFallback);
20
+ // if no walletBookWallet is provided and no wallet is found in the wallet book, throw an error
21
+ if (!wallet) {
22
+ logger.warn('Wallet not found in wallet book');
23
+ return;
24
+ }
25
+ return {
26
+ brandColor: getValidHexColor((_a = wallet === null || wallet === void 0 ? void 0 : wallet.brand) === null || _a === void 0 ? void 0 : _a.primaryColor),
27
+ deepLinks: getDeepLinks({
28
+ desktop: wallet === null || wallet === void 0 ? void 0 : wallet.desktop,
29
+ mobile: wallet === null || wallet === void 0 ? void 0 : wallet.mobile,
30
+ }),
31
+ downloadLinks: getDownloadLinks(wallet),
32
+ groupKey: (_b = wallet === null || wallet === void 0 ? void 0 : wallet.chainGroup) !== null && _b !== void 0 ? _b : wallet === null || wallet === void 0 ? void 0 : wallet.walletGroup,
33
+ icon: (_d = getIconUrl((_c = wallet === null || wallet === void 0 ? void 0 : wallet.brand) === null || _c === void 0 ? void 0 : _c.spriteId)) !== null && _d !== void 0 ? _d : '',
34
+ id: walletKey,
35
+ inAppBrowserUrl: (_f = (_e = wallet.mobile) === null || _e === void 0 ? void 0 : _e.inAppBrowser) !== null && _f !== void 0 ? _f : undefined,
36
+ name: wallet.name,
37
+ rdns: (_g = wallet.eip6963Config) === null || _g === void 0 ? void 0 : _g.rdns,
38
+ supportedHardwareWallets: wallet.hardwareWallets,
39
+ walletLimitations: getWalletLimitations(wallet.walletLimitations),
40
+ };
41
+ }
42
+ catch (e) {
43
+ logger.warn('Error getting wallet metadata from wallet book', {
44
+ error: e,
45
+ });
22
46
  return;
23
47
  }
24
- return {
25
- brandColor: getValidHexColor((_a = wallet === null || wallet === void 0 ? void 0 : wallet.brand) === null || _a === void 0 ? void 0 : _a.primaryColor),
26
- deepLinks: getDeepLinks({
27
- desktop: wallet === null || wallet === void 0 ? void 0 : wallet.desktop,
28
- mobile: wallet === null || wallet === void 0 ? void 0 : wallet.mobile,
29
- }),
30
- downloadLinks: getDownloadLinks(wallet),
31
- groupKey: (_b = wallet === null || wallet === void 0 ? void 0 : wallet.chainGroup) !== null && _b !== void 0 ? _b : wallet === null || wallet === void 0 ? void 0 : wallet.walletGroup,
32
- icon: (_d = getIconUrl((_c = wallet === null || wallet === void 0 ? void 0 : wallet.brand) === null || _c === void 0 ? void 0 : _c.spriteId)) !== null && _d !== void 0 ? _d : '',
33
- id: walletKey,
34
- inAppBrowserUrl: (_f = (_e = wallet.mobile) === null || _e === void 0 ? void 0 : _e.inAppBrowser) !== null && _f !== void 0 ? _f : undefined,
35
- name: wallet.name,
36
- rdns: (_g = wallet.eip6963Config) === null || _g === void 0 ? void 0 : _g.rdns,
37
- supportedHardwareWallets: wallet.hardwareWallets,
38
- walletLimitations: getWalletLimitations(wallet.walletLimitations),
39
- };
40
48
  };
41
49
 
42
50
  export { getWalletMetadataFromWalletBook };