@dynamic-labs/wallet-connector-core 4.14.0 → 4.16.0

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,35 @@
1
1
 
2
+ ## [4.16.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.15.0...v4.16.0) (2025-05-03)
3
+
4
+
5
+ ### Features
6
+
7
+ * (GVTY-3020) add send balance to waas sui connector ([#8638](https://github.com/dynamic-labs/dynamic-auth/issues/8638)) ([97f0af0](https://github.com/dynamic-labs/dynamic-auth/commit/97f0af0504a0079ebf0958fde1f8edc34c035927))
8
+ * add isAtomicSupported and isPaymasterServiceSupported methods to EthereumWallet ([#8627](https://github.com/dynamic-labs/dynamic-auth/issues/8627)) ([df82b9e](https://github.com/dynamic-labs/dynamic-auth/commit/df82b9e86eafea9dd6c505227722450bc56d7c57))
9
+ * add solana mpc to global wallets ([#8605](https://github.com/dynamic-labs/dynamic-auth/issues/8605)) ([6261bf9](https://github.com/dynamic-labs/dynamic-auth/commit/6261bf9bec45b1d1afa13869cf5d10cda215783e))
10
+
11
+ ## [4.15.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.14.0...v4.15.0) (2025-04-30)
12
+
13
+
14
+ ### Features
15
+
16
+ * add end session override for waas sui connector ([#8602](https://github.com/dynamic-labs/dynamic-auth/issues/8602)) ([6c9e6fd](https://github.com/dynamic-labs/dynamic-auth/commit/6c9e6fda4581a4e3b9e1544f22d6e5f03723d928))
17
+ * add presets and demo fixes ([#8609](https://github.com/dynamic-labs/dynamic-auth/issues/8609)) ([2201914](https://github.com/dynamic-labs/dynamic-auth/commit/2201914d2029ff0b67dfc2c6e696f728f32f57b3))
18
+ * add ShareConfig component with modal and styling ([74aff97](https://github.com/dynamic-labs/dynamic-auth/commit/74aff97689c9e7c9abc892c1deac4d748b498909))
19
+ * add wallet actions section and update UI components ([#8598](https://github.com/dynamic-labs/dynamic-auth/issues/8598)) ([d6170b7](https://github.com/dynamic-labs/dynamic-auth/commit/d6170b7f6abd963e6a081541e2c674b7141f1c15))
20
+ * dynamic waas to sign 7702 authorization ([#8603](https://github.com/dynamic-labs/dynamic-auth/issues/8603)) ([74e1722](https://github.com/dynamic-labs/dynamic-auth/commit/74e1722f417aab621f4062093e109dc45cf542ea))
21
+ * add signMessage feature to global wallet client ([#8563](https://github.com/dynamic-labs/dynamic-auth/issues/8563)) ([c3f9734](https://github.com/dynamic-labs/dynamic-auth/commit/c3f9734c097f5c9b88c35e0f642632f261e40fe7))
22
+ * allow displaying custom links in the global wallet profile dropdown menu ([#8617](https://github.com/dynamic-labs/dynamic-auth/issues/8617)) ([5fb956c](https://github.com/dynamic-labs/dynamic-auth/commit/5fb956c0c2b681fece56104b330a0e90fc8fb936))
23
+
24
+
25
+ ### Bug Fixes
26
+
27
+ * add default base api url for dynamic waas config on connector initialization ([#8604](https://github.com/dynamic-labs/dynamic-auth/issues/8604)) ([6218a7e](https://github.com/dynamic-labs/dynamic-auth/commit/6218a7edda4feb9028be548acfe8eff64578f0a0))
28
+ * enables caching for sprite.svg ([#8610](https://github.com/dynamic-labs/dynamic-auth/issues/8610)) ([decdb69](https://github.com/dynamic-labs/dynamic-auth/commit/decdb69b4df8bc2d97ee579fa423e9682ab1720b))
29
+ * change mobile experience to redirect ([#8003](https://github.com/dynamic-labs/dynamic-auth/issues/8003)) ([2e8a1d8](https://github.com/dynamic-labs/dynamic-auth/commit/2e8a1d8b54f54386e1abc9f4e6e5e9acf859e5fa))
30
+ * optimize wallet finder when performing eth and sol operations in global wallet popup ([#8564](https://github.com/dynamic-labs/dynamic-auth/issues/8564)) ([2eaf424](https://github.com/dynamic-labs/dynamic-auth/commit/2eaf4244d4aa1b1cc5c6e32574db10ab34f8ed80))
31
+ * loading state for v3 connect-only embedded wallet generation ([#8600](https://github.com/dynamic-labs/dynamic-auth/issues/8600)) ([af34d16](https://github.com/dynamic-labs/dynamic-auth/commit/af34d168a765aa82867116541e73c59672ab2341))
32
+
2
33
  ## [4.14.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.13.0...v4.14.0) (2025-04-25)
3
34
 
4
35
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.14.0";
6
+ var version = "4.16.0";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.14.0";
2
+ var version = "4.16.0";
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.14.0",
3
+ "version": "4.16.0",
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",
@@ -18,13 +18,13 @@
18
18
  },
19
19
  "homepage": "https://www.dynamic.xyz/",
20
20
  "dependencies": {
21
- "@dynamic-labs/sdk-api-core": "0.0.658",
22
- "@dynamic-labs/assert-package-version": "4.14.0",
23
- "@dynamic-labs/logger": "4.14.0",
24
- "@dynamic-labs/rpc-providers": "4.14.0",
25
- "@dynamic-labs/types": "4.14.0",
26
- "@dynamic-labs/utils": "4.14.0",
27
- "@dynamic-labs/wallet-book": "4.14.0",
21
+ "@dynamic-labs/sdk-api-core": "0.0.660",
22
+ "@dynamic-labs/assert-package-version": "4.16.0",
23
+ "@dynamic-labs/logger": "4.16.0",
24
+ "@dynamic-labs/rpc-providers": "4.16.0",
25
+ "@dynamic-labs/types": "4.16.0",
26
+ "@dynamic-labs/utils": "4.16.0",
27
+ "@dynamic-labs/wallet-book": "4.16.0",
28
28
  "eventemitter3": "5.0.1"
29
29
  },
30
30
  "peerDependencies": {}
@@ -150,6 +150,7 @@ class WalletConnectorBase extends EventEmitter__default["default"] {
150
150
  return getMobileExperience.getMobileExperience({
151
151
  mobileExperienceProp: this.constructorProps.mobileExperience,
152
152
  walletBook: this.walletBook,
153
+ walletConnector: this,
153
154
  walletKey: this.key,
154
155
  });
155
156
  }
@@ -142,6 +142,7 @@ class WalletConnectorBase extends EventEmitter {
142
142
  return getMobileExperience({
143
143
  mobileExperienceProp: this.constructorProps.mobileExperience,
144
144
  walletBook: this.walletBook,
145
+ walletConnector: this,
145
146
  walletKey: this.key,
146
147
  });
147
148
  }
@@ -5,19 +5,31 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var walletBook = require('@dynamic-labs/wallet-book');
7
7
 
8
- const getMobileExperience = ({ mobileExperienceProp, walletBook: walletBook$1, walletKey, }) => {
9
- // if the legacy prop is set, use that
10
- if (mobileExperienceProp && typeof mobileExperienceProp === 'string')
11
- return mobileExperienceProp;
12
- // if the wallet has a deeplink preference set from the DynamicContext, use that
13
- if (mobileExperienceProp === null || mobileExperienceProp === void 0 ? void 0 : mobileExperienceProp[walletKey])
14
- return mobileExperienceProp[walletKey];
15
- // if the wallet has a deeplink preference set in the wallet book, use that
16
- const walletRecord = walletBook.findWalletBookWallet(walletBook$1, walletKey);
17
- if (walletRecord === null || walletRecord === void 0 ? void 0 : walletRecord.mobileExperience)
18
- return walletRecord.mobileExperience;
19
- if (mobileExperienceProp === null || mobileExperienceProp === void 0 ? void 0 : mobileExperienceProp.default)
20
- return mobileExperienceProp.default;
8
+ const getMobileExperience = ({ mobileExperienceProp, walletBook: walletBook$1, walletKey, walletConnector, }) => {
9
+ if (mobileExperienceProp) {
10
+ // if the legacy prop is set, use that
11
+ if (typeof mobileExperienceProp === 'string') {
12
+ return mobileExperienceProp;
13
+ }
14
+ else if (mobileExperienceProp[walletKey]) {
15
+ return mobileExperienceProp[walletKey];
16
+ }
17
+ else if (mobileExperienceProp.default) {
18
+ return mobileExperienceProp.default;
19
+ }
20
+ }
21
+ const walletBookRecord = walletBook.findWalletBookWallet(walletBook$1, walletKey);
22
+ if (walletBookRecord === null || walletBookRecord === void 0 ? void 0 : walletBookRecord.mobileExperience) {
23
+ return walletBookRecord.mobileExperience;
24
+ }
25
+ // a hack to only apply this experience on v4+ sdks, otherwise we would have it changed to redirect
26
+ if (walletKey === 'metamask') {
27
+ return 'redirect';
28
+ }
29
+ // default to redirect for WC wallets
30
+ if (walletConnector.isWalletConnect) {
31
+ return 'redirect';
32
+ }
21
33
  return 'in-app-browser';
22
34
  };
23
35
 
@@ -1,7 +1,9 @@
1
1
  import { MobileExperience } from '@dynamic-labs/types';
2
2
  import { WalletBookSchema } from '@dynamic-labs/wallet-book';
3
- export declare const getMobileExperience: ({ mobileExperienceProp, walletBook, walletKey, }: {
3
+ import { WalletConnectorBase } from '../../WalletConnectorBase/WalletConnectorBase';
4
+ export declare const getMobileExperience: ({ mobileExperienceProp, walletBook, walletKey, walletConnector, }: {
4
5
  mobileExperienceProp?: MobileExperience;
5
6
  walletBook: WalletBookSchema;
6
7
  walletKey: string;
8
+ walletConnector: WalletConnectorBase;
7
9
  }) => MobileExperience;
@@ -1,19 +1,31 @@
1
1
  'use client'
2
2
  import { findWalletBookWallet } from '@dynamic-labs/wallet-book';
3
3
 
4
- const getMobileExperience = ({ mobileExperienceProp, walletBook, walletKey, }) => {
5
- // if the legacy prop is set, use that
6
- if (mobileExperienceProp && typeof mobileExperienceProp === 'string')
7
- return mobileExperienceProp;
8
- // if the wallet has a deeplink preference set from the DynamicContext, use that
9
- if (mobileExperienceProp === null || mobileExperienceProp === void 0 ? void 0 : mobileExperienceProp[walletKey])
10
- return mobileExperienceProp[walletKey];
11
- // if the wallet has a deeplink preference set in the wallet book, use that
12
- const walletRecord = findWalletBookWallet(walletBook, walletKey);
13
- if (walletRecord === null || walletRecord === void 0 ? void 0 : walletRecord.mobileExperience)
14
- return walletRecord.mobileExperience;
15
- if (mobileExperienceProp === null || mobileExperienceProp === void 0 ? void 0 : mobileExperienceProp.default)
16
- return mobileExperienceProp.default;
4
+ const getMobileExperience = ({ mobileExperienceProp, walletBook, walletKey, walletConnector, }) => {
5
+ if (mobileExperienceProp) {
6
+ // if the legacy prop is set, use that
7
+ if (typeof mobileExperienceProp === 'string') {
8
+ return mobileExperienceProp;
9
+ }
10
+ else if (mobileExperienceProp[walletKey]) {
11
+ return mobileExperienceProp[walletKey];
12
+ }
13
+ else if (mobileExperienceProp.default) {
14
+ return mobileExperienceProp.default;
15
+ }
16
+ }
17
+ const walletBookRecord = findWalletBookWallet(walletBook, walletKey);
18
+ if (walletBookRecord === null || walletBookRecord === void 0 ? void 0 : walletBookRecord.mobileExperience) {
19
+ return walletBookRecord.mobileExperience;
20
+ }
21
+ // a hack to only apply this experience on v4+ sdks, otherwise we would have it changed to redirect
22
+ if (walletKey === 'metamask') {
23
+ return 'redirect';
24
+ }
25
+ // default to redirect for WC wallets
26
+ if (walletConnector.isWalletConnect) {
27
+ return 'redirect';
28
+ }
17
29
  return 'in-app-browser';
18
30
  };
19
31