@dynamic-labs/multi-wallet 4.0.0-alpha.39 → 4.0.0-alpha.40

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,18 @@
1
1
 
2
+ ## [4.0.0-alpha.40](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.39...v4.0.0-alpha.40) (2024-12-03)
3
+
4
+
5
+ ### Features
6
+
7
+ * detect all eip6963 wallets, even if not in wallet-book ([#7515](https://github.com/dynamic-labs/dynamic-auth/issues/7515)) ([b658740](https://github.com/dynamic-labs/dynamic-auth/commit/b658740c16d8d26877eb955dc403077c8e9840fb))
8
+ * useWalletOptions provides chain and allows filtering ([#7533](https://github.com/dynamic-labs/dynamic-auth/issues/7533)) ([da47608](https://github.com/dynamic-labs/dynamic-auth/commit/da476084bcc72b2bf0b6fa599992be640d59724c))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **QNTM-1845:** use smaller log in button sizing ([#7526](https://github.com/dynamic-labs/dynamic-auth/issues/7526)) ([264810b](https://github.com/dynamic-labs/dynamic-auth/commit/264810b3b9cddf7006c1f653b4cc10f23804ae50))
14
+ * update twitter to X in social provide label ([#7530](https://github.com/dynamic-labs/dynamic-auth/issues/7530)) ([c02fca0](https://github.com/dynamic-labs/dynamic-auth/commit/c02fca03de2f46a9e50d19c9e7ef2dfba0b33efc))
15
+
2
16
  ## [4.0.0-alpha.39](https://github.com/dynamic-labs/dynamic-auth/compare/v4.0.0-alpha.38...v4.0.0-alpha.39) (2024-12-02)
3
17
 
4
18
 
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.39";
6
+ var version = "4.0.0-alpha.40";
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.39";
2
+ var version = "4.0.0-alpha.40";
3
3
 
4
4
  export { version };
package/package.json CHANGED
@@ -1,15 +1,15 @@
1
1
  {
2
2
  "name": "@dynamic-labs/multi-wallet",
3
- "version": "4.0.0-alpha.39",
3
+ "version": "4.0.0-alpha.40",
4
4
  "dependencies": {
5
5
  "@dynamic-labs/sdk-api-core": "0.0.570",
6
6
  "tslib": "2.4.1",
7
- "@dynamic-labs/assert-package-version": "4.0.0-alpha.39",
8
- "@dynamic-labs/rpc-providers": "4.0.0-alpha.39",
9
- "@dynamic-labs/types": "4.0.0-alpha.39",
10
- "@dynamic-labs/utils": "4.0.0-alpha.39",
11
- "@dynamic-labs/wallet-book": "4.0.0-alpha.39",
12
- "@dynamic-labs/wallet-connector-core": "4.0.0-alpha.39"
7
+ "@dynamic-labs/assert-package-version": "4.0.0-alpha.40",
8
+ "@dynamic-labs/rpc-providers": "4.0.0-alpha.40",
9
+ "@dynamic-labs/types": "4.0.0-alpha.40",
10
+ "@dynamic-labs/utils": "4.0.0-alpha.40",
11
+ "@dynamic-labs/wallet-book": "4.0.0-alpha.40",
12
+ "@dynamic-labs/wallet-connector-core": "4.0.0-alpha.40"
13
13
  },
14
14
  "devDependencies": {
15
15
  "@walletconnect/types": "2.10.6"
@@ -11,7 +11,10 @@ const chainStringToChains = {
11
11
  };
12
12
  const getSupportedChainsForWalletConnector = (walletBook$1, walletConnector) => {
13
13
  var _a;
14
- const metadata = walletBook.getWalletBookWallet(walletBook$1, walletConnector.key, walletConnector.walletFallback);
14
+ const walletBookWallet = walletBook.findWalletBookWallet(walletBook$1, walletConnector.key);
15
+ if (!walletBookWallet) {
16
+ return [];
17
+ }
15
18
  /**
16
19
  * chains could contain multiple eth networks eg
17
20
  * "eip155:1",
@@ -22,7 +25,7 @@ const getSupportedChainsForWalletConnector = (walletBook$1, walletConnector) =>
22
25
  * so we will use a set to ensure uniqueness
23
26
  */
24
27
  const chainSet = new Set();
25
- const chainStringList = (_a = metadata.chains) !== null && _a !== void 0 ? _a : [];
28
+ const chainStringList = (_a = walletBookWallet.chains) !== null && _a !== void 0 ? _a : [];
26
29
  chainStringList.forEach((chainString) => {
27
30
  const chains = chainStringToChains[chainString];
28
31
  chains === null || chains === void 0 ? void 0 : chains.forEach((chain) => {
@@ -1,5 +1,5 @@
1
1
  'use client'
2
- import { getWalletBookWallet } from '@dynamic-labs/wallet-book';
2
+ import { findWalletBookWallet } from '@dynamic-labs/wallet-book';
3
3
 
4
4
  const chainStringToChains = {
5
5
  'eip155:1': ['ETH', 'EVM'],
@@ -7,7 +7,10 @@ const chainStringToChains = {
7
7
  };
8
8
  const getSupportedChainsForWalletConnector = (walletBook, walletConnector) => {
9
9
  var _a;
10
- const metadata = getWalletBookWallet(walletBook, walletConnector.key, walletConnector.walletFallback);
10
+ const walletBookWallet = findWalletBookWallet(walletBook, walletConnector.key);
11
+ if (!walletBookWallet) {
12
+ return [];
13
+ }
11
14
  /**
12
15
  * chains could contain multiple eth networks eg
13
16
  * "eip155:1",
@@ -18,7 +21,7 @@ const getSupportedChainsForWalletConnector = (walletBook, walletConnector) => {
18
21
  * so we will use a set to ensure uniqueness
19
22
  */
20
23
  const chainSet = new Set();
21
- const chainStringList = (_a = metadata.chains) !== null && _a !== void 0 ? _a : [];
24
+ const chainStringList = (_a = walletBookWallet.chains) !== null && _a !== void 0 ? _a : [];
22
25
  chainStringList.forEach((chainString) => {
23
26
  const chains = chainStringToChains[chainString];
24
27
  chains === null || chains === void 0 ? void 0 : chains.forEach((chain) => {
@@ -6,8 +6,8 @@ Object.defineProperty(exports, '__esModule', { value: true });
6
6
  var walletBook = require('@dynamic-labs/wallet-book');
7
7
 
8
8
  const applyLinksOverrides = (walletBook$1, wallets) => wallets.map((wallet) => {
9
- const walletData = walletBook.getWalletBookWallet(walletBook$1, wallet.key, wallet.walletFallback);
10
- if (walletData.switchNetworkOnlyFromWallet !== undefined) {
9
+ const walletData = walletBook.findWalletBookWallet(walletBook$1, wallet.key);
10
+ if ((walletData === null || walletData === void 0 ? void 0 : walletData.switchNetworkOnlyFromWallet) !== undefined) {
11
11
  wallet.switchNetworkOnlyFromWallet =
12
12
  walletData.switchNetworkOnlyFromWallet;
13
13
  }
@@ -1,9 +1,9 @@
1
1
  'use client'
2
- import { getWalletBookWallet } from '@dynamic-labs/wallet-book';
2
+ import { findWalletBookWallet } from '@dynamic-labs/wallet-book';
3
3
 
4
4
  const applyLinksOverrides = (walletBook, wallets) => wallets.map((wallet) => {
5
- const walletData = getWalletBookWallet(walletBook, wallet.key, wallet.walletFallback);
6
- if (walletData.switchNetworkOnlyFromWallet !== undefined) {
5
+ const walletData = findWalletBookWallet(walletBook, wallet.key);
6
+ if ((walletData === null || walletData === void 0 ? void 0 : walletData.switchNetworkOnlyFromWallet) !== undefined) {
7
7
  wallet.switchNetworkOnlyFromWallet =
8
8
  walletData.switchNetworkOnlyFromWallet;
9
9
  }
@@ -9,7 +9,7 @@ var walletBook = require('@dynamic-labs/wallet-book');
9
9
  var handleMobileWalletFilter = require('../handleMobileWalletFilter/handleMobileWalletFilter.cjs');
10
10
 
11
11
  const filterWalletsForPlatform = (walletBook$1, connectors) => connectors.filter((connector) => {
12
- const walletBookWallet = walletBook.getWalletBookWallet(walletBook$1, connector.key, connector.walletFallback);
12
+ const walletBookWallet = walletBook.findWalletBookWallet(walletBook$1, connector.key);
13
13
  if (connector.isInstalledOnBrowser()) {
14
14
  return true;
15
15
  }
@@ -1,11 +1,11 @@
1
1
  'use client'
2
2
  import { isEmbeddedConnector } from '@dynamic-labs/wallet-connector-core';
3
3
  import { isMobile } from '@dynamic-labs/utils';
4
- import { getWalletBookWallet } from '@dynamic-labs/wallet-book';
4
+ import { findWalletBookWallet } from '@dynamic-labs/wallet-book';
5
5
  import { handleMobileWalletFilter } from '../handleMobileWalletFilter/handleMobileWalletFilter.js';
6
6
 
7
7
  const filterWalletsForPlatform = (walletBook, connectors) => connectors.filter((connector) => {
8
- const walletBookWallet = getWalletBookWallet(walletBook, connector.key, connector.walletFallback);
8
+ const walletBookWallet = findWalletBookWallet(walletBook, connector.key);
9
9
  if (connector.isInstalledOnBrowser()) {
10
10
  return true;
11
11
  }
@@ -57,7 +57,7 @@ const getSupportedWallets = (args) => {
57
57
  return true;
58
58
  // if current wallet is WalletConnect, check if there is another wallet with the same key that is
59
59
  // not WalletConnect
60
- // if there is, return false(filter out WC wallet)
60
+ // if there is, return false (filter out WC wallet)
61
61
  // if there is no other wallet with the same key that is not WalletConnect, return true (keep WC wallet)
62
62
  return !allWalletConnectors.some((wc) => wc.key === walletConnector.key &&
63
63
  !wc.isWalletConnect &&
@@ -53,7 +53,7 @@ const getSupportedWallets = (args) => {
53
53
  return true;
54
54
  // if current wallet is WalletConnect, check if there is another wallet with the same key that is
55
55
  // not WalletConnect
56
- // if there is, return false(filter out WC wallet)
56
+ // if there is, return false (filter out WC wallet)
57
57
  // if there is no other wallet with the same key that is not WalletConnect, return true (keep WC wallet)
58
58
  return !allWalletConnectors.some((wc) => wc.key === walletConnector.key &&
59
59
  !wc.isWalletConnect &&