@dynamic-labs/wallet-book 0.17.3 → 0.18.0-RC.1

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,20 +1,23 @@
1
1
 
2
- ### [0.17.3](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.2...v0.17.3) (2023-06-14)
2
+ ## [0.18.0-RC.1](https://github.com/dynamic-labs/DynamicAuth/compare/v0.18.0-RC.0...v0.18.0-RC.1) (2023-06-14)
3
3
 
4
4
 
5
5
  ### Bug Fixes
6
6
 
7
- * await setEmailInput in handleSubmit for LoginWithemailForm ([#2336](https://github.com/dynamic-labs/DynamicAuth/issues/2336)) ([#2337](https://github.com/dynamic-labs/DynamicAuth/issues/2337)) ([2e3b3cf](https://github.com/dynamic-labs/DynamicAuth/commit/2e3b3cf1f5dc3a52d1f77b458d1c958908207c2f))
7
+ * await setEmailInput in handleSubmit for LoginWithemailForm ([#2336](https://github.com/dynamic-labs/DynamicAuth/issues/2336)) ([05b1fe0](https://github.com/dynamic-labs/DynamicAuth/commit/05b1fe09abaa1563fb187cf410b1e0e991f29c60))
8
+ * don't remove project settings from ls if there's a connected wallet ([#2329](https://github.com/dynamic-labs/DynamicAuth/issues/2329)) ([bc2f627](https://github.com/dynamic-labs/DynamicAuth/commit/bc2f627a80d0a8e6a4637dc60c699ffd07362a19))
8
9
 
9
- ### [0.17.2](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.1...v0.17.2) (2023-06-14)
10
+ ## [0.18.0-RC.0](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0...v0.18.0-RC.0) (2023-06-14)
10
11
 
11
- ### [0.17.1](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0...v0.17.1) (2023-06-14)
12
+
13
+ ### Features
14
+
15
+ * **DYN-1260:** support for building groups in wallet list builder ([#2272](https://github.com/dynamic-labs/DynamicAuth/issues/2272)) ([a120f98](https://github.com/dynamic-labs/DynamicAuth/commit/a120f9848def97ae70565e06c9058a2a992ad4bb))
12
16
 
13
17
 
14
18
  ### Bug Fixes
15
19
 
16
- * display social icons in correct order ([#2320](https://github.com/dynamic-labs/DynamicAuth/issues/2320)) ([#2325](https://github.com/dynamic-labs/DynamicAuth/issues/2325)) ([6012bd9](https://github.com/dynamic-labs/DynamicAuth/commit/6012bd95030ff5076ce8a82d490c2e617eb05bdb))
17
- * set min-height on social overlay modal
20
+ * **social:** display social icons is current order ([#2320](https://github.com/dynamic-labs/DynamicAuth/issues/2320)) ([ca8099f](https://github.com/dynamic-labs/DynamicAuth/commit/ca8099f23e17313f23b0aaa1ba02f1903565da37))
18
21
 
19
22
  ## [0.17.0](https://github.com/dynamic-labs/DynamicAuth/compare/v0.17.0-RC.33...v0.17.0) (2023-06-13)
20
23
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/wallet-book",
3
- "version": "0.17.3",
3
+ "version": "0.18.0-RC.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -29,6 +29,6 @@
29
29
  "react-dom": "^17.0.2 || ^18.0.0"
30
30
  },
31
31
  "dependencies": {
32
- "@dynamic-labs/logger": "0.17.3"
32
+ "@dynamic-labs/logger": "0.18.0-RC.1"
33
33
  }
34
34
  }
@@ -1 +1,41 @@
1
- export {};
1
+ import { WalletRecordsSchema } from '../schemas';
2
+ /**
3
+ * Create a fallback wallet book with only the wallets that are in the fallback list.
4
+ * They must exist in the main wallet book
5
+ * @param wallets
6
+ * @returns
7
+ */
8
+ export declare const generateWalletFallbacks: (wallets: WalletRecordsSchema) => Record<string, {
9
+ name: string;
10
+ brand?: {
11
+ alt?: string | undefined;
12
+ imageId?: string | undefined;
13
+ primaryColor?: string | undefined;
14
+ spriteId?: string | undefined;
15
+ } | undefined;
16
+ chains?: string[] | undefined;
17
+ desktop?: {
18
+ chromeId?: string | undefined;
19
+ edgeId?: string | undefined;
20
+ firefoxId?: string | undefined;
21
+ native?: string | undefined;
22
+ operaId?: string | undefined;
23
+ safariId?: string | undefined;
24
+ universal?: string | undefined;
25
+ } | undefined;
26
+ group?: string | undefined;
27
+ mobile?: {
28
+ android?: string | null | undefined;
29
+ androidId?: string | undefined;
30
+ ios?: string | null | undefined;
31
+ iosId?: string | undefined;
32
+ native?: string | undefined;
33
+ universal?: string | undefined;
34
+ } | undefined;
35
+ shortName?: string | undefined;
36
+ showOnlyIfInstalled?: boolean | undefined;
37
+ switchNetworkOnlyFromWallet?: boolean | undefined;
38
+ walletConnect?: {
39
+ sdks?: string[] | undefined;
40
+ } | undefined;
41
+ }>;
@@ -1,3 +1,4 @@
1
1
  export * from './firstParty';
2
2
  export * from './walletConnect';
3
3
  export * from './walletConnectOverrides';
4
+ export * from './walletGroups';
@@ -1,4 +1,5 @@
1
1
  export declare const walletConnectSourceData: Record<string, {
2
+ name: string;
2
3
  chains: string[];
3
4
  desktop: {
4
5
  native: string | null;
@@ -8,7 +9,6 @@ export declare const walletConnectSourceData: Record<string, {
8
9
  native: string | null;
9
10
  universal: string | null;
10
11
  };
11
- name: string;
12
12
  sdks: string[];
13
13
  app: {
14
14
  android: string | null;
@@ -0,0 +1,2 @@
1
+ import { WalletGroupRecordSchema } from '../../../schemas';
2
+ export declare const walletGroups: WalletGroupRecordSchema;
@@ -0,0 +1,18 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var getWalletGroup = require('./getWalletGroup.cjs');
6
+ var logger = require('./logger.cjs');
7
+
8
+ const findWalletGroup = (walletGroup) => {
9
+ try {
10
+ return getWalletGroup.getWalletGroup(walletGroup);
11
+ }
12
+ catch (err) {
13
+ logger.logger.error(err);
14
+ return undefined;
15
+ }
16
+ };
17
+
18
+ exports.findWalletGroup = findWalletGroup;
@@ -1,39 +1,6 @@
1
1
  export declare const findWalletGroup: (walletGroup: string) => {
2
2
  key: string;
3
- wallets: {
4
- name: string;
5
- brand?: {
6
- alt?: string | undefined;
7
- imageId?: string | undefined;
8
- primaryColor?: string | undefined;
9
- spriteId?: string | undefined;
10
- } | undefined;
11
- chains?: string[] | undefined;
12
- desktop?: {
13
- chromeId?: string | undefined;
14
- edgeId?: string | undefined;
15
- firefoxId?: string | undefined;
16
- native?: string | undefined;
17
- operaId?: string | undefined;
18
- safariId?: string | undefined;
19
- universal?: string | undefined;
20
- } | undefined;
21
- group?: string | undefined;
22
- mobile?: {
23
- android?: string | null | undefined;
24
- androidId?: string | undefined;
25
- ios?: string | null | undefined;
26
- iosId?: string | undefined;
27
- native?: string | undefined;
28
- universal?: string | undefined;
29
- } | undefined;
30
- shortName?: string | undefined;
31
- showOnlyIfInstalled?: boolean | undefined;
32
- switchNetworkOnlyFromWallet?: boolean | undefined;
33
- walletConnect?: {
34
- sdks?: string[] | undefined;
35
- } | undefined;
36
- }[];
3
+ name: string;
37
4
  brand?: {
38
5
  alt?: string | undefined;
39
6
  imageId?: string | undefined;
@@ -0,0 +1,14 @@
1
+ import { getWalletGroup } from './getWalletGroup.js';
2
+ import { logger } from './logger.js';
3
+
4
+ const findWalletGroup = (walletGroup) => {
5
+ try {
6
+ return getWalletGroup(walletGroup);
7
+ }
8
+ catch (err) {
9
+ logger.error(err);
10
+ return undefined;
11
+ }
12
+ };
13
+
14
+ export { findWalletGroup };
@@ -1,40 +1,7 @@
1
1
  export declare const useWalletBookCdn: () => {
2
2
  groups: Record<string, {
3
3
  key: string;
4
- wallets: {
5
- name: string;
6
- brand?: {
7
- alt?: string | undefined;
8
- imageId?: string | undefined;
9
- primaryColor?: string | undefined;
10
- spriteId?: string | undefined;
11
- } | undefined;
12
- chains?: string[] | undefined;
13
- desktop?: {
14
- chromeId?: string | undefined;
15
- edgeId?: string | undefined;
16
- firefoxId?: string | undefined;
17
- native?: string | undefined;
18
- operaId?: string | undefined;
19
- safariId?: string | undefined;
20
- universal?: string | undefined;
21
- } | undefined;
22
- group?: string | undefined;
23
- mobile?: {
24
- android?: string | null | undefined;
25
- androidId?: string | undefined;
26
- ios?: string | null | undefined;
27
- iosId?: string | undefined;
28
- native?: string | undefined;
29
- universal?: string | undefined;
30
- } | undefined;
31
- shortName?: string | undefined;
32
- showOnlyIfInstalled?: boolean | undefined;
33
- switchNetworkOnlyFromWallet?: boolean | undefined;
34
- walletConnect?: {
35
- sdks?: string[] | undefined;
36
- } | undefined;
37
- }[];
4
+ name: string;
38
5
  brand?: {
39
6
  alt?: string | undefined;
40
7
  imageId?: string | undefined;
package/src/index.cjs CHANGED
@@ -6,8 +6,10 @@ var getIconUrl = require('./helpers/getIconUrl.cjs');
6
6
  var getWalletBookWallet = require('./helpers/getWalletBookWallet.cjs');
7
7
  var getWalletLinks = require('./helpers/getWalletLinks.cjs');
8
8
  var getWalletPrimaryColor = require('./helpers/getWalletPrimaryColor.cjs');
9
+ var findWalletBookWallet = require('./helpers/findWalletBookWallet.cjs');
9
10
  require('./helpers/logger.cjs');
10
11
  var getWalletGroup = require('./helpers/getWalletGroup.cjs');
12
+ var findWalletGroup = require('./helpers/findWalletGroup.cjs');
11
13
  var getWalletBookCdnUrl = require('./helpers/getWalletBookCdnUrl.cjs');
12
14
  var useWalletBook = require('./hooks/useWalletBook.cjs');
13
15
  require('react');
@@ -19,7 +21,9 @@ exports.getWalletIconUrl = getIconUrl.getWalletIconUrl;
19
21
  exports.getWalletBookWallet = getWalletBookWallet.getWalletBookWallet;
20
22
  exports.getWalletLinks = getWalletLinks.getWalletLinks;
21
23
  exports.getWalletPrimaryColor = getWalletPrimaryColor.getWalletPrimaryColor;
24
+ exports.findWalletBookWallet = findWalletBookWallet.findWalletBookWallet;
22
25
  exports.getWalletGroup = getWalletGroup.getWalletGroup;
26
+ exports.findWalletGroup = findWalletGroup.findWalletGroup;
23
27
  exports.getWalletBookCdnUrl = getWalletBookCdnUrl.getWalletBookCdnUrl;
24
28
  exports.useWalletBook = useWalletBook.useWalletBook;
25
29
  exports.WalletIcon = WalletIcon.WalletIcon;
package/src/index.d.ts CHANGED
@@ -7,7 +7,7 @@ export type { WalletLinks } from './helpers';
7
7
  /**
8
8
  * HELPERS
9
9
  */
10
- export { getWalletBookWallet, getWalletIconUrl, getWalletLinks, getWalletPrimaryColor, getWalletGroup, getWalletBookCdnUrl, } from './helpers';
10
+ export { getWalletBookWallet, getWalletIconUrl, getWalletLinks, getWalletPrimaryColor, getWalletGroup, getWalletBookCdnUrl, findWalletBookWallet, findWalletGroup, } from './helpers';
11
11
  /**
12
12
  * HOOKS
13
13
  */
package/src/index.js CHANGED
@@ -2,8 +2,10 @@ export { getWalletIconUrl } from './helpers/getIconUrl.js';
2
2
  export { getWalletBookWallet } from './helpers/getWalletBookWallet.js';
3
3
  export { getWalletLinks } from './helpers/getWalletLinks.js';
4
4
  export { getWalletPrimaryColor } from './helpers/getWalletPrimaryColor.js';
5
+ export { findWalletBookWallet } from './helpers/findWalletBookWallet.js';
5
6
  import './helpers/logger.js';
6
7
  export { getWalletGroup } from './helpers/getWalletGroup.js';
8
+ export { findWalletGroup } from './helpers/findWalletGroup.js';
7
9
  export { getWalletBookCdnUrl } from './helpers/getWalletBookCdnUrl.js';
8
10
  export { useWalletBook } from './hooks/useWalletBook.js';
9
11
  import 'react';