@dynamic-labs/multi-wallet 1.0.0-alpha.8 → 1.0.0-alpha.9

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,28 @@
1
1
 
2
+ ## [1.0.0-alpha.9](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.8...v1.0.0-alpha.9) (2023-12-07)
3
+
4
+
5
+ ### ⚠ BREAKING CHANGES
6
+
7
+ * how to migrate
8
+ Whenever you would use the property wallets from the object returned by useDynamicContext, you must now rename it to walletConnectorOptions.
9
+
10
+ ### Features
11
+
12
+ * add support for eip6963 ([#4064](https://github.com/dynamic-labs/DynamicAuth/issues/4064)) ([3f8cf0e](https://github.com/dynamic-labs/DynamicAuth/commit/3f8cf0e4250945f3a331f701d491a308fab5f7b8))
13
+ * allow AA wallets to access owner features ([#4079](https://github.com/dynamic-labs/DynamicAuth/issues/4079)) ([9efc2be](https://github.com/dynamic-labs/DynamicAuth/commit/9efc2bee87ec9193c3682863d72024b3586de724))
14
+ * introduce UserWalletsContext ([#4083](https://github.com/dynamic-labs/DynamicAuth/issues/4083)) ([b9ca7f6](https://github.com/dynamic-labs/DynamicAuth/commit/b9ca7f6b0aff4b3992325b70cc9a903ece445c7f))
15
+
16
+
17
+ ### Bug Fixes
18
+
19
+ * ensure zero dev provider will receive a signer ([#4084](https://github.com/dynamic-labs/DynamicAuth/issues/4084)) ([f02a540](https://github.com/dynamic-labs/DynamicAuth/commit/f02a54036d39bfc5fb0c262f292acf914e4bd653))
20
+ * render recovery section only when turnkey provider is enabled ([#4093](https://github.com/dynamic-labs/DynamicAuth/issues/4093)) ([5f29bd2](https://github.com/dynamic-labs/DynamicAuth/commit/5f29bd23ccca2e307822377be28396edc7ab1fda))
21
+ * reset selected social provider on logout ([#4078](https://github.com/dynamic-labs/DynamicAuth/issues/4078)) ([85dc611](https://github.com/dynamic-labs/DynamicAuth/commit/85dc611d9c0e733bdb9d316b008bdaa35bcc2a91))
22
+
23
+
24
+ * rename wallets > walletConnectorOptions ([#4086](https://github.com/dynamic-labs/DynamicAuth/issues/4086)) ([10a7795](https://github.com/dynamic-labs/DynamicAuth/commit/10a779567e751469a667095726da52d78facbd57))
25
+
2
26
  ## [1.0.0-alpha.8](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2023-12-05)
3
27
 
4
28
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/multi-wallet",
3
- "version": "1.0.0-alpha.8",
3
+ "version": "1.0.0-alpha.9",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -9,11 +9,11 @@
9
9
  "dependencies": {
10
10
  "@dynamic-labs/sdk-api": "0.0.315",
11
11
  "tslib": "2.4.1",
12
- "@dynamic-labs/rpc-providers": "1.0.0-alpha.8",
13
- "@dynamic-labs/types": "1.0.0-alpha.8",
14
- "@dynamic-labs/utils": "1.0.0-alpha.8",
15
- "@dynamic-labs/wallet-book": "1.0.0-alpha.8",
16
- "@dynamic-labs/wallet-connector-core": "1.0.0-alpha.8"
12
+ "@dynamic-labs/rpc-providers": "1.0.0-alpha.9",
13
+ "@dynamic-labs/types": "1.0.0-alpha.9",
14
+ "@dynamic-labs/utils": "1.0.0-alpha.9",
15
+ "@dynamic-labs/wallet-book": "1.0.0-alpha.9",
16
+ "@dynamic-labs/wallet-connector-core": "1.0.0-alpha.9"
17
17
  },
18
18
  "devDependencies": {
19
19
  "@walletconnect/types": "2.4.2"
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
6
6
  var walletBook = require('@dynamic-labs/wallet-book');
7
7
  var utils = require('@dynamic-labs/utils');
8
+ var sdkApi = require('@dynamic-labs/sdk-api');
8
9
  var getApiProviders = require('./utils/getApiProviders.cjs');
9
10
 
10
11
  let wallets = [];
@@ -142,7 +143,15 @@ const getEnabledWallets = (props) => {
142
143
  const allEnabledWallets = supportedWallets.filter((wallet) => props.enabledChains.some((chain) => getSupportedChainsForWalletConnector(props.getSupportedWalletOpts.walletBook, wallet).includes(chain)) || wallet.key === 'magiclink');
143
144
  return allEnabledWallets;
144
145
  };
145
- const getEnabledProviders = (providers) => { var _a; return (_a = providers === null || providers === void 0 ? void 0 : providers.filter(({ enabledAt }) => Boolean(enabledAt))) !== null && _a !== void 0 ? _a : []; };
146
+ // get list of providers enabled in the sense that we should have wallet connectors for them
147
+ // note: magic and turnkey are considered enabled when a provider exists (for magic, a providerProjectId exists)
148
+ const getEnabledProviders = (providers) => {
149
+ var _a;
150
+ return (_a = providers === null || providers === void 0 ? void 0 : providers.filter((provider) => Boolean(provider.enabledAt) ||
151
+ (provider.provider === sdkApi.ProviderEnum.MagicLink &&
152
+ Boolean(provider.providerProjectId)) ||
153
+ provider.provider === sdkApi.ProviderEnum.Turnkey)) !== null && _a !== void 0 ? _a : [];
154
+ };
146
155
 
147
156
  exports.getEnabledProviders = getEnabledProviders;
148
157
  exports.getEnabledWallets = getEnabledWallets;
@@ -1,6 +1,7 @@
1
1
  import { isEmbeddedConnector } from '@dynamic-labs/wallet-connector-core';
2
2
  import { getWalletBookWallet, getWalletLinks } from '@dynamic-labs/wallet-book';
3
3
  import { isMobile, isIPad, isIPhone } from '@dynamic-labs/utils';
4
+ import { ProviderEnum } from '@dynamic-labs/sdk-api';
4
5
  import { getApiProviders } from './utils/getApiProviders.js';
5
6
 
6
7
  let wallets = [];
@@ -138,6 +139,14 @@ const getEnabledWallets = (props) => {
138
139
  const allEnabledWallets = supportedWallets.filter((wallet) => props.enabledChains.some((chain) => getSupportedChainsForWalletConnector(props.getSupportedWalletOpts.walletBook, wallet).includes(chain)) || wallet.key === 'magiclink');
139
140
  return allEnabledWallets;
140
141
  };
141
- const getEnabledProviders = (providers) => { var _a; return (_a = providers === null || providers === void 0 ? void 0 : providers.filter(({ enabledAt }) => Boolean(enabledAt))) !== null && _a !== void 0 ? _a : []; };
142
+ // get list of providers enabled in the sense that we should have wallet connectors for them
143
+ // note: magic and turnkey are considered enabled when a provider exists (for magic, a providerProjectId exists)
144
+ const getEnabledProviders = (providers) => {
145
+ var _a;
146
+ return (_a = providers === null || providers === void 0 ? void 0 : providers.filter((provider) => Boolean(provider.enabledAt) ||
147
+ (provider.provider === ProviderEnum.MagicLink &&
148
+ Boolean(provider.providerProjectId)) ||
149
+ provider.provider === ProviderEnum.Turnkey)) !== null && _a !== void 0 ? _a : [];
150
+ };
142
151
 
143
152
  export { getEnabledProviders, getEnabledWallets, getSupportedChainsForWalletConnector, getSupportedWallets };