@dynamic-labs/wallet-connector-core 4.45.2 → 4.46.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,28 @@
1
1
 
2
+ ## [4.46.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.45.3...v4.46.0) (2025-11-19)
3
+
4
+
5
+ ### Features
6
+
7
+ * **react-native:** add client.solana.simulateTransaction method ([#9910](https://github.com/dynamic-labs/dynamic-auth/issues/9910)) ([61bbe45](https://github.com/dynamic-labs/dynamic-auth/commit/61bbe453eeb2790dffc533aa57f6bc050c3c0461))
8
+ * **react-native:** add simulateEVMTransactionAA and simulateEVMTransaction methods ([#9907](https://github.com/dynamic-labs/dynamic-auth/issues/9907)) ([e54d63e](https://github.com/dynamic-labs/dynamic-auth/commit/e54d63eaa80c2bc865ef6199405b0ed7943d4b83))
9
+
10
+ ### [4.45.3](https://github.com/dynamic-labs/dynamic-auth/compare/v4.45.2...v4.45.3) (2025-11-18)
11
+
12
+
13
+ ### Features
14
+
15
+ * add trc20 token transfer to dynamic widget ([#9877](https://github.com/dynamic-labs/dynamic-auth/issues/9877)) ([4365102](https://github.com/dynamic-labs/dynamic-auth/commit/436510253436239d64d4f47b7d0532e65401c19d))
16
+ * add trc20 tokens to sendBalance ([#9873](https://github.com/dynamic-labs/dynamic-auth/issues/9873)) ([fec5e67](https://github.com/dynamic-labs/dynamic-auth/commit/fec5e6715f87fd6a3f7b2ca21c94e4f32ec86031))
17
+
18
+
19
+ ### Bug Fixes
20
+
21
+ * don't allow mobileExperience override to redirect for wallets that don't support it ([#9865](https://github.com/dynamic-labs/dynamic-auth/issues/9865)) ([b34ada5](https://github.com/dynamic-labs/dynamic-auth/commit/b34ada5ac0450667bf33b3cf2ce13e5c16235cfc))
22
+ * **global-wallet:** validate the redirect url ([#9894](https://github.com/dynamic-labs/dynamic-auth/issues/9894)) ([4cf27b5](https://github.com/dynamic-labs/dynamic-auth/commit/4cf27b538da5a9d1da04160faad009880f15f175))
23
+ * temporarily skip Phantom account creation steps due to extension… ([#9893](https://github.com/dynamic-labs/dynamic-auth/issues/9893)) ([87f8a2e](https://github.com/dynamic-labs/dynamic-auth/commit/87f8a2e1185be09c255e7865980f02b13e916db4))
24
+ * wallet book is required console errors ([#9887](https://github.com/dynamic-labs/dynamic-auth/issues/9887)) ([417605d](https://github.com/dynamic-labs/dynamic-auth/commit/417605d605f70ee558dd550b1fb50c996f219b31))
25
+
2
26
  ### [4.45.2](https://github.com/dynamic-labs/dynamic-auth/compare/v4.45.1...v4.45.2) (2025-11-17)
3
27
 
4
28
 
package/package.cjs CHANGED
@@ -3,6 +3,6 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.45.2";
6
+ var version = "4.46.0";
7
7
 
8
8
  exports.version = version;
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
1
  'use client'
2
- var version = "4.45.2";
2
+ var version = "4.46.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.45.2",
3
+ "version": "4.46.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",
@@ -19,12 +19,12 @@
19
19
  "homepage": "https://www.dynamic.xyz/",
20
20
  "dependencies": {
21
21
  "@dynamic-labs/sdk-api-core": "0.0.821",
22
- "@dynamic-labs/assert-package-version": "4.45.2",
23
- "@dynamic-labs/logger": "4.45.2",
24
- "@dynamic-labs/rpc-providers": "4.45.2",
25
- "@dynamic-labs/types": "4.45.2",
26
- "@dynamic-labs/utils": "4.45.2",
27
- "@dynamic-labs/wallet-book": "4.45.2",
22
+ "@dynamic-labs/assert-package-version": "4.46.0",
23
+ "@dynamic-labs/logger": "4.46.0",
24
+ "@dynamic-labs/rpc-providers": "4.46.0",
25
+ "@dynamic-labs/types": "4.46.0",
26
+ "@dynamic-labs/utils": "4.46.0",
27
+ "@dynamic-labs/wallet-book": "4.46.0",
28
28
  "eventemitter3": "5.0.1"
29
29
  },
30
30
  "peerDependencies": {}
@@ -6,22 +6,55 @@ Object.defineProperty(exports, '__esModule', { value: true });
6
6
  var walletBook = require('@dynamic-labs/wallet-book');
7
7
  var logger = require('../logger.cjs');
8
8
 
9
+ /**
10
+ * The mobileExperience prop can be:
11
+ * - a string:
12
+ * in older versions of the SDK, this was the only way to set the mobile experience
13
+ * - an object with the wallet key set:
14
+ * this is the way to set the mobile experience for a specific wallet
15
+ * - an object with the default set:
16
+ * this was the way to set the default mobile experience for all wallets, unless a specific wallet key is set
17
+ */
18
+ const getMobileExperienceFromProp = ({ mobileExperienceProp, walletKey, }) => {
19
+ if (!mobileExperienceProp) {
20
+ return undefined;
21
+ }
22
+ // if the legacy prop is set, use that
23
+ if (typeof mobileExperienceProp === 'string') {
24
+ return mobileExperienceProp;
25
+ }
26
+ // set the mobile experience for a specific wallet
27
+ if (mobileExperienceProp[walletKey]) {
28
+ return mobileExperienceProp[walletKey];
29
+ }
30
+ // set the default mobile experience for all wallets, unless a specific wallet key is set
31
+ if (mobileExperienceProp.default) {
32
+ return mobileExperienceProp.default;
33
+ }
34
+ return undefined;
35
+ };
36
+ /**
37
+ * We first try to use the mobile experience from the context settings
38
+ * If no set, we try to use the default set in wallet-book
39
+ * If no set in wallet-book, we default to redirect for WC wallets and in-app-browser for other wallets
40
+ */
9
41
  const getMobileExperience = ({ mobileExperienceProp, walletBook: walletBook$1, walletKey, walletConnector, }) => {
10
42
  logger.logger.logVerboseTroubleshootingMessage('[getMobileExperience]', {
11
43
  mobileExperienceProp,
12
44
  walletKey,
13
45
  });
14
- if (mobileExperienceProp) {
15
- // if the legacy prop is set, use that
16
- if (typeof mobileExperienceProp === 'string') {
17
- return mobileExperienceProp;
18
- }
19
- else if (mobileExperienceProp[walletKey]) {
20
- return mobileExperienceProp[walletKey];
21
- }
22
- else if (mobileExperienceProp.default) {
23
- return mobileExperienceProp.default;
24
- }
46
+ const mobileExperienceFromProp = getMobileExperienceFromProp({
47
+ mobileExperienceProp,
48
+ walletKey,
49
+ });
50
+ // if the mobile experience is set in the props
51
+ // use it unless it's redirect and redirect is not supported
52
+ // usually only WC wallets or wallets that can be connected via popup support redirect
53
+ const supportsRedirect = walletConnector.isWalletConnect ||
54
+ walletConnector.canConnectViaCustodialService;
55
+ if (mobileExperienceFromProp &&
56
+ (supportsRedirect || mobileExperienceFromProp !== 'redirect')) {
57
+ return mobileExperienceFromProp;
25
58
  }
26
59
  const walletBookRecord = walletBook.findWalletBookWallet(walletBook$1, walletKey);
27
60
  logger.logger.logVerboseTroubleshootingMessage('[getMobileExperience]', {
@@ -1,6 +1,11 @@
1
1
  import { MobileExperience } from '@dynamic-labs/types';
2
2
  import { WalletBookSchema } from '@dynamic-labs/wallet-book';
3
3
  import { WalletConnectorBase } from '../../WalletConnectorBase/WalletConnectorBase';
4
+ /**
5
+ * We first try to use the mobile experience from the context settings
6
+ * If no set, we try to use the default set in wallet-book
7
+ * If no set in wallet-book, we default to redirect for WC wallets and in-app-browser for other wallets
8
+ */
4
9
  export declare const getMobileExperience: ({ mobileExperienceProp, walletBook, walletKey, walletConnector, }: {
5
10
  mobileExperienceProp?: MobileExperience;
6
11
  walletBook: WalletBookSchema;
@@ -2,22 +2,55 @@
2
2
  import { findWalletBookWallet } from '@dynamic-labs/wallet-book';
3
3
  import { logger } from '../logger.js';
4
4
 
5
+ /**
6
+ * The mobileExperience prop can be:
7
+ * - a string:
8
+ * in older versions of the SDK, this was the only way to set the mobile experience
9
+ * - an object with the wallet key set:
10
+ * this is the way to set the mobile experience for a specific wallet
11
+ * - an object with the default set:
12
+ * this was the way to set the default mobile experience for all wallets, unless a specific wallet key is set
13
+ */
14
+ const getMobileExperienceFromProp = ({ mobileExperienceProp, walletKey, }) => {
15
+ if (!mobileExperienceProp) {
16
+ return undefined;
17
+ }
18
+ // if the legacy prop is set, use that
19
+ if (typeof mobileExperienceProp === 'string') {
20
+ return mobileExperienceProp;
21
+ }
22
+ // set the mobile experience for a specific wallet
23
+ if (mobileExperienceProp[walletKey]) {
24
+ return mobileExperienceProp[walletKey];
25
+ }
26
+ // set the default mobile experience for all wallets, unless a specific wallet key is set
27
+ if (mobileExperienceProp.default) {
28
+ return mobileExperienceProp.default;
29
+ }
30
+ return undefined;
31
+ };
32
+ /**
33
+ * We first try to use the mobile experience from the context settings
34
+ * If no set, we try to use the default set in wallet-book
35
+ * If no set in wallet-book, we default to redirect for WC wallets and in-app-browser for other wallets
36
+ */
5
37
  const getMobileExperience = ({ mobileExperienceProp, walletBook, walletKey, walletConnector, }) => {
6
38
  logger.logVerboseTroubleshootingMessage('[getMobileExperience]', {
7
39
  mobileExperienceProp,
8
40
  walletKey,
9
41
  });
10
- if (mobileExperienceProp) {
11
- // if the legacy prop is set, use that
12
- if (typeof mobileExperienceProp === 'string') {
13
- return mobileExperienceProp;
14
- }
15
- else if (mobileExperienceProp[walletKey]) {
16
- return mobileExperienceProp[walletKey];
17
- }
18
- else if (mobileExperienceProp.default) {
19
- return mobileExperienceProp.default;
20
- }
42
+ const mobileExperienceFromProp = getMobileExperienceFromProp({
43
+ mobileExperienceProp,
44
+ walletKey,
45
+ });
46
+ // if the mobile experience is set in the props
47
+ // use it unless it's redirect and redirect is not supported
48
+ // usually only WC wallets or wallets that can be connected via popup support redirect
49
+ const supportsRedirect = walletConnector.isWalletConnect ||
50
+ walletConnector.canConnectViaCustodialService;
51
+ if (mobileExperienceFromProp &&
52
+ (supportsRedirect || mobileExperienceFromProp !== 'redirect')) {
53
+ return mobileExperienceFromProp;
21
54
  }
22
55
  const walletBookRecord = findWalletBookWallet(walletBook, walletKey);
23
56
  logger.logVerboseTroubleshootingMessage('[getMobileExperience]', {