@dynamic-labs/sdk-react-core 4.102.0 → 4.104.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.
Files changed (28) hide show
  1. package/CHANGELOG.md +29 -0
  2. package/package.cjs +3 -3
  3. package/package.js +3 -3
  4. package/package.json +14 -14
  5. package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +3 -4
  6. package/src/lib/components/NeedHelpSection/NeedHelpSection.d.ts +4 -1
  7. package/src/lib/components/NeedHelpSection/NeedHelpSection.js +3 -4
  8. package/src/lib/components/TransactionCard/SendBalanceTransactionCard.cjs +8 -8
  9. package/src/lib/components/TransactionCard/SendBalanceTransactionCard.d.ts +3 -1
  10. package/src/lib/components/TransactionCard/SendBalanceTransactionCard.js +8 -8
  11. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +1 -1
  12. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +1 -1
  13. package/src/lib/shared/types/embeddedWallets.d.ts +2 -0
  14. package/src/lib/store/utils/settingsUtils/settingsUtils.cjs +21 -2
  15. package/src/lib/store/utils/settingsUtils/settingsUtils.js +21 -2
  16. package/src/lib/styles/index.shadow.cjs +1 -1
  17. package/src/lib/styles/index.shadow.js +1 -1
  18. package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs +10 -6
  19. package/src/lib/utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js +10 -6
  20. package/src/lib/utils/hooks/useSyncDynamicWaas/useSyncDynamicWaas.cjs +3 -1
  21. package/src/lib/utils/hooks/useSyncDynamicWaas/useSyncDynamicWaas.js +3 -1
  22. package/src/lib/views/BackupUnsuccessfulView/BackupUnsuccessfulView.cjs +2 -2
  23. package/src/lib/views/BackupUnsuccessfulView/BackupUnsuccessfulView.d.ts +4 -1
  24. package/src/lib/views/BackupUnsuccessfulView/BackupUnsuccessfulView.js +2 -2
  25. package/src/lib/views/WalletUpgradeFlowView/WalletUpgradeFlowView.cjs +28 -7
  26. package/src/lib/views/WalletUpgradeFlowView/WalletUpgradeFlowView.d.ts +1 -0
  27. package/src/lib/views/WalletUpgradeFlowView/WalletUpgradeFlowView.js +30 -9
  28. package/src/lib/views/viewToComponentMap.d.ts +3 -1
package/CHANGELOG.md CHANGED
@@ -1,4 +1,33 @@
1
1
 
2
+ ## [4.104.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.103.0...v4.104.0) (2026-11-03)
3
+
4
+
5
+ ### Features
6
+
7
+ * **sdk-react-core:** offer passkey recovery when export fails in upgrade flow [v4] ([#12641](https://github.com/dynamic-labs/dynamic-auth/issues/12641)) ([916829f](https://github.com/dynamic-labs/dynamic-auth/commit/916829f1eaf9f6cae7d8c0b5069512fceafa15a4))
8
+ * **webview:** forward policiesConsentLabels manifest field to SDK settings [v4] ([#12608](https://github.com/dynamic-labs/dynamic-auth/issues/12608)) ([b9ef167](https://github.com/dynamic-labs/dynamic-auth/commit/b9ef1676576eea8452c7149308492aea578b6c91))
9
+
10
+
11
+ ### Bug Fixes
12
+
13
+ * **iconic:** add Zerion wallet icon [v4] ([#12651](https://github.com/dynamic-labs/dynamic-auth/issues/12651)) ([f5257ee](https://github.com/dynamic-labs/dynamic-auth/commit/f5257ee28fc7e8d46657957f59c13503e7eccce8))
14
+ * **react-native:** serialize WalletConnect native storage values as JSON strings ([#12682](https://github.com/dynamic-labs/dynamic-auth/issues/12682)) ([df2795a](https://github.com/dynamic-labs/dynamic-auth/commit/df2795aa432a94e429859082468b89705226dc70))
15
+ * **sdk-react-core:** default wallet return redirectUrl to current page [v4] ([#12660](https://github.com/dynamic-labs/dynamic-auth/issues/12660)) ([29b8f38](https://github.com/dynamic-labs/dynamic-auth/commit/29b8f380858ef65c52187aeb50123a287eb7b4ec))
16
+ * **waas-svm:** keep the blockhash of a transaction another key already signed ([#12678](https://github.com/dynamic-labs/dynamic-auth/issues/12678)) ([549553c](https://github.com/dynamic-labs/dynamic-auth/commit/549553c1275b3cc3995e183966a32a5f6ae63534)), closes [#12676](https://github.com/dynamic-labs/dynamic-auth/issues/12676)
17
+
18
+ ## [4.103.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.102.0...v4.103.0) (2026-10-27)
19
+
20
+
21
+ ### Features
22
+
23
+ * surface wallet creation error on backup-unsuccessful view (v4) ([#12601](https://github.com/dynamic-labs/dynamic-auth/issues/12601)) ([86b45e5](https://github.com/dynamic-labs/dynamic-auth/commit/86b45e59e64df117082257d735997ea140844453))
24
+
25
+
26
+ ### Bug Fixes
27
+
28
+ * **react-native-extension:** vendor NativeICloudBackup TurboModule spec (v4) ([#12614](https://github.com/dynamic-labs/dynamic-auth/issues/12614)) ([833e7f4](https://github.com/dynamic-labs/dynamic-auth/commit/833e7f4741f41d327bcf1e5ea25a72d4f2d386ad))
29
+ * **sdk-react-core:** show signing wallet's network in SendBalanceTransactionCard [DYNT-2337] ([#12574](https://github.com/dynamic-labs/dynamic-auth/issues/12574)) ([f9ea046](https://github.com/dynamic-labs/dynamic-auth/commit/f9ea04620e8203d62ff7029dd2ab6324f2c1eec1)), closes [#12063](https://github.com/dynamic-labs/dynamic-auth/issues/12063) [#12425](https://github.com/dynamic-labs/dynamic-auth/issues/12425) [dynamic-waas-sdk#1786](https://github.com/dynamic-labs/dynamic-waas-sdk/issues/1786) [#1787](https://github.com/dynamic-labs/dynamic-auth/issues/1787)
30
+
2
31
  ## [4.102.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.101.0...v4.102.0) (2026-10-16)
3
32
 
4
33
  ## [4.101.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.100.5...v4.101.0) (2026-10-16)
package/package.cjs CHANGED
@@ -3,10 +3,10 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.102.0";
6
+ var version = "4.104.0";
7
7
  var dependencies = {
8
- "@dynamic-labs/sdk-api-core": "0.104.0",
9
- "@dynamic-labs-sdk/client": "1.41.0",
8
+ "@dynamic-labs/sdk-api-core": "0.142.0",
9
+ "@dynamic-labs-sdk/client": "1.48.0",
10
10
  "@dynamic-labs-wallet/browser-wallet-client": "1.1.43",
11
11
  "@dynamic-labs-wallet/forward-mpc-client": "2.0.2",
12
12
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.js CHANGED
@@ -1,8 +1,8 @@
1
1
  'use client'
2
- var version = "4.102.0";
2
+ var version = "4.104.0";
3
3
  var dependencies = {
4
- "@dynamic-labs/sdk-api-core": "0.104.0",
5
- "@dynamic-labs-sdk/client": "1.41.0",
4
+ "@dynamic-labs/sdk-api-core": "0.142.0",
5
+ "@dynamic-labs-sdk/client": "1.48.0",
6
6
  "@dynamic-labs-wallet/browser-wallet-client": "1.1.43",
7
7
  "@dynamic-labs-wallet/forward-mpc-client": "2.0.2",
8
8
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.json CHANGED
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "4.102.0",
3
+ "version": "4.104.0",
4
4
  "dependencies": {
5
- "@dynamic-labs/sdk-api-core": "0.104.0",
6
- "@dynamic-labs-sdk/client": "1.41.0",
5
+ "@dynamic-labs/sdk-api-core": "0.142.0",
6
+ "@dynamic-labs-sdk/client": "1.48.0",
7
7
  "@dynamic-labs-wallet/browser-wallet-client": "1.1.43",
8
8
  "@dynamic-labs-wallet/forward-mpc-client": "2.0.2",
9
9
  "@hcaptcha/react-hcaptcha": "1.4.4",
@@ -18,17 +18,17 @@
18
18
  "react-i18next": "13.5.0",
19
19
  "react-international-phone": "4.5.0",
20
20
  "yup": "0.32.11",
21
- "@dynamic-labs/assert-package-version": "4.102.0",
22
- "@dynamic-labs/iconic": "4.102.0",
23
- "@dynamic-labs/locale": "4.102.0",
24
- "@dynamic-labs/logger": "4.102.0",
25
- "@dynamic-labs/multi-wallet": "4.102.0",
26
- "@dynamic-labs/rpc-providers": "4.102.0",
27
- "@dynamic-labs/store": "4.102.0",
28
- "@dynamic-labs/types": "4.102.0",
29
- "@dynamic-labs/utils": "4.102.0",
30
- "@dynamic-labs/wallet-book": "4.102.0",
31
- "@dynamic-labs/wallet-connector-core": "4.102.0",
21
+ "@dynamic-labs/assert-package-version": "4.104.0",
22
+ "@dynamic-labs/iconic": "4.104.0",
23
+ "@dynamic-labs/locale": "4.104.0",
24
+ "@dynamic-labs/logger": "4.104.0",
25
+ "@dynamic-labs/multi-wallet": "4.104.0",
26
+ "@dynamic-labs/rpc-providers": "4.104.0",
27
+ "@dynamic-labs/store": "4.104.0",
28
+ "@dynamic-labs/types": "4.104.0",
29
+ "@dynamic-labs/utils": "4.104.0",
30
+ "@dynamic-labs/wallet-book": "4.104.0",
31
+ "@dynamic-labs/wallet-connector-core": "4.104.0",
32
32
  "eventemitter3": "5.0.1"
33
33
  },
34
34
  "devDependencies": {
@@ -15,7 +15,7 @@ var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
15
15
  require('../../context/DynamicContext/useDynamicContext/useDynamicContext.cjs');
16
16
  var useInternalDynamicContext = require('../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.cjs');
17
17
 
18
- const NeedHelpSection = ({ isRecoveryFlow = false, isExport = false, walletCredential, }) => {
18
+ const NeedHelpSection = ({ isRecoveryFlow = false, isExport = false, walletCredential, goBack, wallet, }) => {
19
19
  var _a, _b, _c, _d, _e, _f;
20
20
  const { projectSettings } = useInternalDynamicContext.useInternalDynamicContext();
21
21
  const { t } = reactI18next.useTranslation();
@@ -36,9 +36,8 @@ const NeedHelpSection = ({ isRecoveryFlow = false, isExport = false, walletCrede
36
36
  return (jsxRuntime.jsx(TextButton.TextButton, { copykey: 'dyn_need_help_section.help_button', className: classNames.classNames('need-help-section__helper-link'), onClick: () => initPasskeyRecoveryProcess(undefined, {
37
37
  settings: isExport
38
38
  ? {
39
- goBack: () => {
40
- pushView('embedded-reveal-view');
41
- },
39
+ goBack: goBack !== null && goBack !== void 0 ? goBack : (() => pushView('embedded-reveal-view')),
40
+ wallet,
42
41
  }
43
42
  : undefined,
44
43
  type: 'helpSession',
@@ -1,9 +1,12 @@
1
1
  /// <reference types="react" />
2
2
  import { JwtVerifiedCredential } from '@dynamic-labs/sdk-api-core';
3
+ import { Wallet, WalletConnectorCore } from '@dynamic-labs/wallet-connector-core';
3
4
  type Props = {
4
5
  isRecoveryFlow?: boolean;
5
6
  isExport?: boolean;
6
7
  walletCredential?: JwtVerifiedCredential;
8
+ goBack?: () => void;
9
+ wallet?: Wallet<WalletConnectorCore.WalletConnector>;
7
10
  };
8
- export declare const NeedHelpSection: ({ isRecoveryFlow, isExport, walletCredential, }: Props) => JSX.Element | null;
11
+ export declare const NeedHelpSection: ({ isRecoveryFlow, isExport, walletCredential, goBack, wallet, }: Props) => JSX.Element | null;
9
12
  export {};
@@ -11,7 +11,7 @@ import { useViewContext } from '../../context/ViewContext/ViewContext.js';
11
11
  import '../../context/DynamicContext/useDynamicContext/useDynamicContext.js';
12
12
  import { useInternalDynamicContext } from '../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.js';
13
13
 
14
- const NeedHelpSection = ({ isRecoveryFlow = false, isExport = false, walletCredential, }) => {
14
+ const NeedHelpSection = ({ isRecoveryFlow = false, isExport = false, walletCredential, goBack, wallet, }) => {
15
15
  var _a, _b, _c, _d, _e, _f;
16
16
  const { projectSettings } = useInternalDynamicContext();
17
17
  const { t } = useTranslation();
@@ -32,9 +32,8 @@ const NeedHelpSection = ({ isRecoveryFlow = false, isExport = false, walletCrede
32
32
  return (jsx(TextButton, { copykey: 'dyn_need_help_section.help_button', className: classNames('need-help-section__helper-link'), onClick: () => initPasskeyRecoveryProcess(undefined, {
33
33
  settings: isExport
34
34
  ? {
35
- goBack: () => {
36
- pushView('embedded-reveal-view');
37
- },
35
+ goBack: goBack !== null && goBack !== void 0 ? goBack : (() => pushView('embedded-reveal-view')),
36
+ wallet,
38
37
  }
39
38
  : undefined,
40
39
  type: 'helpSession',
@@ -124,33 +124,33 @@ require('../../store/state/multichainBalances.cjs');
124
124
  require('@dynamic-labs/store');
125
125
  require('../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
126
126
 
127
- const SendBalanceTransactionCard = ({ transaction, currentToken, currencySymbol, valueRounded, transactionValue, isGasSponsored, gasFiatValue, totalGasFiatValue, currency, total, t, onFeeUpdate, }) => {
128
- var _a, _b;
127
+ const SendBalanceTransactionCard = ({ transaction, currentToken, currencySymbol, valueRounded, transactionValue, isGasSponsored, gasFiatValue, totalGasFiatValue, currency, total, t, onFeeUpdate, walletConnector, }) => {
129
128
  const { primaryWallet, projectSettings, overrides } = useInternalDynamicContext.useInternalDynamicContext();
130
129
  const networkInfo = useNetworkConfigurationsFromProjectSettings.useNetworkConfigurationsFromProjectSettings({
131
130
  evmNetworksOverrides: overrides === null || overrides === void 0 ? void 0 : overrides.evmNetworks,
132
131
  projectSettings,
133
132
  });
134
- const { chain } = useFetchChain.useFetchChain(primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector);
133
+ const activeConnector = walletConnector !== null && walletConnector !== void 0 ? walletConnector : primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
134
+ const { chain } = useFetchChain.useFetchChain(activeConnector);
135
135
  const networkInfoEntry = networksAndChains.getNetworkInfoEntry({
136
- chain: (_a = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector) === null || _a === void 0 ? void 0 : _a.connectedChain,
136
+ chain: activeConnector === null || activeConnector === void 0 ? void 0 : activeConnector.connectedChain,
137
137
  networkId: chain === null || chain === void 0 ? void 0 : chain.chainId,
138
138
  networkInfo,
139
139
  });
140
140
  // Check if this is a Bitcoin transaction
141
141
  const isBitcoinTransaction = transaction.chain === 'BTC' ||
142
- ((_b = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector) === null || _b === void 0 ? void 0 : _b.connectedChain) === 'BTC' ||
143
- ((primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector) && walletConnectorCore.isBitcoinConnector(primaryWallet.connector));
142
+ (activeConnector === null || activeConnector === void 0 ? void 0 : activeConnector.connectedChain) === 'BTC' ||
143
+ (activeConnector && walletConnectorCore.isBitcoinConnector(activeConnector));
144
144
  const hasFeeToken = Boolean(transaction.feeTokenSymbol);
145
145
  const bitcoinTransaction = transaction;
146
146
  const [feePriority, setFeePriority] = React.useState((bitcoinTransaction === null || bitcoinTransaction === void 0 ? void 0 : bitcoinTransaction.feePriority) || 'medium');
147
147
  const handleFeePriorityChange = React.useCallback((newPriority) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
148
- var _c;
148
+ var _a;
149
149
  if (!isBitcoinTransaction || feePriority === newPriority) {
150
150
  return;
151
151
  }
152
152
  setFeePriority(newPriority);
153
- yield ((_c = bitcoinTransaction.updateFeePriority) === null || _c === void 0 ? void 0 : _c.call(bitcoinTransaction, newPriority));
153
+ yield ((_a = bitcoinTransaction.updateFeePriority) === null || _a === void 0 ? void 0 : _a.call(bitcoinTransaction, newPriority));
154
154
  onFeeUpdate === null || onFeeUpdate === void 0 ? void 0 : onFeeUpdate();
155
155
  }), [isBitcoinTransaction, feePriority, bitcoinTransaction, onFeeUpdate]);
156
156
  const renderTransferDetails = () => (jsxRuntime.jsx("div", { className: 'transaction-card', children: jsxRuntime.jsx("div", { className: 'transaction-card__assets-container', children: jsxRuntime.jsx("div", { className: 'transaction-card__out', children: jsxRuntime.jsxs("div", { className: 'transaction-card__info-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', children: t('dyn_send_transaction.confirmation.data.transfer.send') }), jsxRuntime.jsxs("div", { className: 'transaction-card__amount-symbol', children: [jsxRuntime.jsxs("div", { className: 'transaction-card__token-info', children: [jsxRuntime.jsxs("div", { className: 'transaction-card__token-row', children: [jsxRuntime.jsxs(Typography.Typography, { variant: 'body_normal', color: 'error-1', "data-testid": 'transaction-transfer-amount', children: ["-", valueRounded ||
@@ -1,7 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { TokenBalance } from '@dynamic-labs/sdk-api-core';
3
3
  import { IUITransaction } from '@dynamic-labs/types';
4
- export declare const SendBalanceTransactionCard: ({ transaction, currentToken, currencySymbol, valueRounded, transactionValue, isGasSponsored, gasFiatValue, totalGasFiatValue, currency, total, t, onFeeUpdate, }: {
4
+ import { WalletConnector } from '@dynamic-labs/wallet-connector-core';
5
+ export declare const SendBalanceTransactionCard: ({ transaction, currentToken, currencySymbol, valueRounded, transactionValue, isGasSponsored, gasFiatValue, totalGasFiatValue, currency, total, t, onFeeUpdate, walletConnector, }: {
5
6
  transaction: IUITransaction;
6
7
  currentToken: TokenBalance | undefined;
7
8
  currencySymbol: string | undefined;
@@ -14,4 +15,5 @@ export declare const SendBalanceTransactionCard: ({ transaction, currentToken, c
14
15
  total: bigint | undefined;
15
16
  t: (key: string) => string;
16
17
  onFeeUpdate?: () => void;
18
+ walletConnector?: WalletConnector;
17
19
  }) => JSX.Element;
@@ -120,33 +120,33 @@ import '../../store/state/multichainBalances.js';
120
120
  import '@dynamic-labs/store';
121
121
  import '../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
122
122
 
123
- const SendBalanceTransactionCard = ({ transaction, currentToken, currencySymbol, valueRounded, transactionValue, isGasSponsored, gasFiatValue, totalGasFiatValue, currency, total, t, onFeeUpdate, }) => {
124
- var _a, _b;
123
+ const SendBalanceTransactionCard = ({ transaction, currentToken, currencySymbol, valueRounded, transactionValue, isGasSponsored, gasFiatValue, totalGasFiatValue, currency, total, t, onFeeUpdate, walletConnector, }) => {
125
124
  const { primaryWallet, projectSettings, overrides } = useInternalDynamicContext();
126
125
  const networkInfo = useNetworkConfigurationsFromProjectSettings({
127
126
  evmNetworksOverrides: overrides === null || overrides === void 0 ? void 0 : overrides.evmNetworks,
128
127
  projectSettings,
129
128
  });
130
- const { chain } = useFetchChain(primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector);
129
+ const activeConnector = walletConnector !== null && walletConnector !== void 0 ? walletConnector : primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
130
+ const { chain } = useFetchChain(activeConnector);
131
131
  const networkInfoEntry = getNetworkInfoEntry({
132
- chain: (_a = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector) === null || _a === void 0 ? void 0 : _a.connectedChain,
132
+ chain: activeConnector === null || activeConnector === void 0 ? void 0 : activeConnector.connectedChain,
133
133
  networkId: chain === null || chain === void 0 ? void 0 : chain.chainId,
134
134
  networkInfo,
135
135
  });
136
136
  // Check if this is a Bitcoin transaction
137
137
  const isBitcoinTransaction = transaction.chain === 'BTC' ||
138
- ((_b = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector) === null || _b === void 0 ? void 0 : _b.connectedChain) === 'BTC' ||
139
- ((primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector) && isBitcoinConnector(primaryWallet.connector));
138
+ (activeConnector === null || activeConnector === void 0 ? void 0 : activeConnector.connectedChain) === 'BTC' ||
139
+ (activeConnector && isBitcoinConnector(activeConnector));
140
140
  const hasFeeToken = Boolean(transaction.feeTokenSymbol);
141
141
  const bitcoinTransaction = transaction;
142
142
  const [feePriority, setFeePriority] = useState((bitcoinTransaction === null || bitcoinTransaction === void 0 ? void 0 : bitcoinTransaction.feePriority) || 'medium');
143
143
  const handleFeePriorityChange = useCallback((newPriority) => __awaiter(void 0, void 0, void 0, function* () {
144
- var _c;
144
+ var _a;
145
145
  if (!isBitcoinTransaction || feePriority === newPriority) {
146
146
  return;
147
147
  }
148
148
  setFeePriority(newPriority);
149
- yield ((_c = bitcoinTransaction.updateFeePriority) === null || _c === void 0 ? void 0 : _c.call(bitcoinTransaction, newPriority));
149
+ yield ((_a = bitcoinTransaction.updateFeePriority) === null || _a === void 0 ? void 0 : _a.call(bitcoinTransaction, newPriority));
150
150
  onFeeUpdate === null || onFeeUpdate === void 0 ? void 0 : onFeeUpdate();
151
151
  }), [isBitcoinTransaction, feePriority, bitcoinTransaction, onFeeUpdate]);
152
152
  const renderTransferDetails = () => (jsx("div", { className: 'transaction-card', children: jsx("div", { className: 'transaction-card__assets-container', children: jsx("div", { className: 'transaction-card__out', children: jsxs("div", { className: 'transaction-card__info-container', children: [jsx(Typography, { variant: 'body_normal', color: 'secondary', children: t('dyn_send_transaction.confirmation.data.transfer.send') }), jsxs("div", { className: 'transaction-card__amount-symbol', children: [jsxs("div", { className: 'transaction-card__token-info', children: [jsxs("div", { className: 'transaction-card__token-row', children: [jsxs(Typography, { variant: 'body_normal', color: 'error-1', "data-testid": 'transaction-transfer-amount', children: ["-", valueRounded ||
@@ -176,7 +176,7 @@ const TransactionConfirmationPageLayout = ({ onClickClose, isLoading, onClickBac
176
176
  const totalGasFiatValue = fiatUtils.getTotalFiatCost(currentToken, transaction, nativePrice, transactionValue);
177
177
  return hideModal ? null : (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: closeButton, leading: backButton, alignContent: 'bottom', children: jsxRuntime.jsx("div", { className: 'send-balance-page-layout__header-content', children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', copykey: 'dyn_send_transaction.data.confirmation_tx', children: t('dyn_send_transaction.data.confirmation_tx') }) }) }), !sendBalanceTransaction && (jsxRuntime.jsx("div", { className: 'transaction-confirmation__banner', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', copykey: 'dyn_send_transaction.data.banner', children: t('dyn_send_transaction.data.banner') }) })), jsxRuntime.jsx(PasskeyCreatedSuccessBanner.PasskeyCreatedSuccessBanner, {}), jsxRuntime.jsxs("div", { className: 'transaction-confirmation__body', children: [jsxRuntime.jsxs("div", { className: 'transaction-confirmation__content', children: [error && (jsxRuntime.jsx("div", { className: 'transaction-confirmation__error', children: jsxRuntime.jsx(ErrorContainer.ErrorContainer, { children: transactionLink && transactionSignature ? (jsxRuntime.jsx(reactI18next.Trans, { i18nKey: 'dyn_send_transaction.error_message.confirmation_timeout_with_link', components: {
178
178
  link: (jsxRuntime.jsx(Typography.Typography, { as: 'a', href: transactionLink, target: '_blank', rel: 'noreferrer', className: 'transaction-confirmation__error-link', variant: 'body_small' })),
179
- } })) : (error) }) })), !sendBalanceTransaction ? (jsxRuntime.jsx(TransactionCard.TransactionCard, { transaction: transaction, isGasSponsored: isGasSponsored, isAATransaction: (walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key) === 'zerodev', simulationResult: simulationResult, recipient: recipient, walletConnector: walletConnector })) : (jsxRuntime.jsx(SendBalanceTransactionCard.SendBalanceTransactionCard, { transaction: transaction, currentToken: currentToken, currencySymbol: currencySymbol, valueRounded: (_a = utils.getValueRounded(Boolean(isNativeToken), transaction)) === null || _a === void 0 ? void 0 : _a.toString(), transactionValue: transactionValue, isGasSponsored: isGasSponsored, gasFiatValue: gasFiatValue || '0', totalGasFiatValue: totalGasFiatValue || '0', currency: currency === null || currency === void 0 ? void 0 : currency.symbol, total: total, t: t, onFeeUpdate: fetchTransactionFee })), children && (jsxRuntime.jsx("div", { className: 'transaction-confirmation__rows', children: children }))] }), jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}), children: alert && (jsxRuntime.jsx("div", { className: 'transaction-confirmation__warning', children: alert })) }), jsxRuntime.jsxs("div", { className: 'transaction-confirmation__actions', children: [(onClickBack || onClickClose) && (jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonVariant: 'primary', buttonPadding: 'medium', onClick: onClickBack || onClickClose, expanded: true, disabled: isLoading, copykey: 'dyn_send_transaction.confirmation.cancel_button', children: t('dyn_send_transaction.confirmation.cancel_button') })), jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonVariant: 'brand-primary', buttonPadding: 'medium', onClick: handleSubmitWithChecks, expanded: true, loading: isLoading, disabled: disableSendButton, copykey: 'dyn_send_transaction.confirmation.send', dataTestId: 'transaction-confirmation-send', children: t('dyn_send_transaction.confirmation.send') })] }), jsxRuntime.jsx(NeedHelpSection.NeedHelpSection, { walletCredential: walletCredential }), displayPoweredByDynamicFooter && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: 'transaction-confirmation__divider' }), jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'transaction-confirmation__footer' })] }))] })] }));
179
+ } })) : (error) }) })), !sendBalanceTransaction ? (jsxRuntime.jsx(TransactionCard.TransactionCard, { transaction: transaction, isGasSponsored: isGasSponsored, isAATransaction: (walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key) === 'zerodev', simulationResult: simulationResult, recipient: recipient, walletConnector: walletConnector })) : (jsxRuntime.jsx(SendBalanceTransactionCard.SendBalanceTransactionCard, { transaction: transaction, currentToken: currentToken, currencySymbol: currencySymbol, valueRounded: (_a = utils.getValueRounded(Boolean(isNativeToken), transaction)) === null || _a === void 0 ? void 0 : _a.toString(), transactionValue: transactionValue, isGasSponsored: isGasSponsored, gasFiatValue: gasFiatValue || '0', totalGasFiatValue: totalGasFiatValue || '0', currency: currency === null || currency === void 0 ? void 0 : currency.symbol, total: total, t: t, onFeeUpdate: fetchTransactionFee, walletConnector: walletConnector })), children && (jsxRuntime.jsx("div", { className: 'transaction-confirmation__rows', children: children }))] }), jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}), children: alert && (jsxRuntime.jsx("div", { className: 'transaction-confirmation__warning', children: alert })) }), jsxRuntime.jsxs("div", { className: 'transaction-confirmation__actions', children: [(onClickBack || onClickClose) && (jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonVariant: 'primary', buttonPadding: 'medium', onClick: onClickBack || onClickClose, expanded: true, disabled: isLoading, copykey: 'dyn_send_transaction.confirmation.cancel_button', children: t('dyn_send_transaction.confirmation.cancel_button') })), jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonVariant: 'brand-primary', buttonPadding: 'medium', onClick: handleSubmitWithChecks, expanded: true, loading: isLoading, disabled: disableSendButton, copykey: 'dyn_send_transaction.confirmation.send', dataTestId: 'transaction-confirmation-send', children: t('dyn_send_transaction.confirmation.send') })] }), jsxRuntime.jsx(NeedHelpSection.NeedHelpSection, { walletCredential: walletCredential }), displayPoweredByDynamicFooter && (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx("div", { className: 'transaction-confirmation__divider' }), jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'transaction-confirmation__footer' })] }))] })] }));
180
180
  };
181
181
 
182
182
  exports.TransactionConfirmationPageLayout = TransactionConfirmationPageLayout;
@@ -172,7 +172,7 @@ const TransactionConfirmationPageLayout = ({ onClickClose, isLoading, onClickBac
172
172
  const totalGasFiatValue = getTotalFiatCost(currentToken, transaction, nativePrice, transactionValue);
173
173
  return hideModal ? null : (jsxs(Fragment, { children: [jsx(ModalHeader, { trailing: closeButton, leading: backButton, alignContent: 'bottom', children: jsx("div", { className: 'send-balance-page-layout__header-content', children: jsx(Typography, { variant: 'title', color: 'primary', copykey: 'dyn_send_transaction.data.confirmation_tx', children: t('dyn_send_transaction.data.confirmation_tx') }) }) }), !sendBalanceTransaction && (jsx("div", { className: 'transaction-confirmation__banner', children: jsx(Typography, { variant: 'body_normal', color: 'primary', copykey: 'dyn_send_transaction.data.banner', children: t('dyn_send_transaction.data.banner') }) })), jsx(PasskeyCreatedSuccessBanner, {}), jsxs("div", { className: 'transaction-confirmation__body', children: [jsxs("div", { className: 'transaction-confirmation__content', children: [error && (jsx("div", { className: 'transaction-confirmation__error', children: jsx(ErrorContainer, { children: transactionLink && transactionSignature ? (jsx(Trans, { i18nKey: 'dyn_send_transaction.error_message.confirmation_timeout_with_link', components: {
174
174
  link: (jsx(Typography, { as: 'a', href: transactionLink, target: '_blank', rel: 'noreferrer', className: 'transaction-confirmation__error-link', variant: 'body_small' })),
175
- } })) : (error) }) })), !sendBalanceTransaction ? (jsx(TransactionCard, { transaction: transaction, isGasSponsored: isGasSponsored, isAATransaction: (walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key) === 'zerodev', simulationResult: simulationResult, recipient: recipient, walletConnector: walletConnector })) : (jsx(SendBalanceTransactionCard, { transaction: transaction, currentToken: currentToken, currencySymbol: currencySymbol, valueRounded: (_a = getValueRounded(Boolean(isNativeToken), transaction)) === null || _a === void 0 ? void 0 : _a.toString(), transactionValue: transactionValue, isGasSponsored: isGasSponsored, gasFiatValue: gasFiatValue || '0', totalGasFiatValue: totalGasFiatValue || '0', currency: currency === null || currency === void 0 ? void 0 : currency.symbol, total: total, t: t, onFeeUpdate: fetchTransactionFee })), children && (jsx("div", { className: 'transaction-confirmation__rows', children: children }))] }), jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, {}), children: alert && (jsx("div", { className: 'transaction-confirmation__warning', children: alert })) }), jsxs("div", { className: 'transaction-confirmation__actions', children: [(onClickBack || onClickClose) && (jsx(TypographyButton, { buttonVariant: 'primary', buttonPadding: 'medium', onClick: onClickBack || onClickClose, expanded: true, disabled: isLoading, copykey: 'dyn_send_transaction.confirmation.cancel_button', children: t('dyn_send_transaction.confirmation.cancel_button') })), jsx(TypographyButton, { buttonVariant: 'brand-primary', buttonPadding: 'medium', onClick: handleSubmitWithChecks, expanded: true, loading: isLoading, disabled: disableSendButton, copykey: 'dyn_send_transaction.confirmation.send', dataTestId: 'transaction-confirmation-send', children: t('dyn_send_transaction.confirmation.send') })] }), jsx(NeedHelpSection, { walletCredential: walletCredential }), displayPoweredByDynamicFooter && (jsxs(Fragment, { children: [jsx("div", { className: 'transaction-confirmation__divider' }), jsx(PoweredByDynamic, { classNameRoot: 'transaction-confirmation__footer' })] }))] })] }));
175
+ } })) : (error) }) })), !sendBalanceTransaction ? (jsx(TransactionCard, { transaction: transaction, isGasSponsored: isGasSponsored, isAATransaction: (walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key) === 'zerodev', simulationResult: simulationResult, recipient: recipient, walletConnector: walletConnector })) : (jsx(SendBalanceTransactionCard, { transaction: transaction, currentToken: currentToken, currencySymbol: currencySymbol, valueRounded: (_a = getValueRounded(Boolean(isNativeToken), transaction)) === null || _a === void 0 ? void 0 : _a.toString(), transactionValue: transactionValue, isGasSponsored: isGasSponsored, gasFiatValue: gasFiatValue || '0', totalGasFiatValue: totalGasFiatValue || '0', currency: currency === null || currency === void 0 ? void 0 : currency.symbol, total: total, t: t, onFeeUpdate: fetchTransactionFee, walletConnector: walletConnector })), children && (jsx("div", { className: 'transaction-confirmation__rows', children: children }))] }), jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, {}), children: alert && (jsx("div", { className: 'transaction-confirmation__warning', children: alert })) }), jsxs("div", { className: 'transaction-confirmation__actions', children: [(onClickBack || onClickClose) && (jsx(TypographyButton, { buttonVariant: 'primary', buttonPadding: 'medium', onClick: onClickBack || onClickClose, expanded: true, disabled: isLoading, copykey: 'dyn_send_transaction.confirmation.cancel_button', children: t('dyn_send_transaction.confirmation.cancel_button') })), jsx(TypographyButton, { buttonVariant: 'brand-primary', buttonPadding: 'medium', onClick: handleSubmitWithChecks, expanded: true, loading: isLoading, disabled: disableSendButton, copykey: 'dyn_send_transaction.confirmation.send', dataTestId: 'transaction-confirmation-send', children: t('dyn_send_transaction.confirmation.send') })] }), jsx(NeedHelpSection, { walletCredential: walletCredential }), displayPoweredByDynamicFooter && (jsxs(Fragment, { children: [jsx("div", { className: 'transaction-confirmation__divider' }), jsx(PoweredByDynamic, { classNameRoot: 'transaction-confirmation__footer' })] }))] })] }));
176
176
  };
177
177
 
178
178
  export { TransactionConfirmationPageLayout };
@@ -1,3 +1,4 @@
1
+ import { Wallet } from '@dynamic-labs/wallet-connector-core';
1
2
  export type EmbeddedWalletSessionSettings = {
2
3
  emailCode: string;
3
4
  userId: string;
@@ -5,6 +6,7 @@ export type EmbeddedWalletSessionSettings = {
5
6
  };
6
7
  export type EmbeddedWalletCurrentActionSettings = {
7
8
  goBack?: () => void;
9
+ wallet?: Wallet;
8
10
  };
9
11
  export type EmbeddedWalletCurrentAction = {
10
12
  type: 'signMessage' | 'sendTransaction' | 'helpSession' | 'signTransaction' | 'reveal';
@@ -3,9 +3,9 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
+ var React = require('react');
6
7
  require('@dynamic-labs-sdk/client/core');
7
8
  require('@dynamic-labs/sdk-api-core');
8
- require('react');
9
9
  require('eventemitter3');
10
10
  require('@dynamic-labs/utils');
11
11
  require('@dynamic-labs-sdk/client');
@@ -16,6 +16,7 @@ require('react/jsx-runtime');
16
16
  require('../../../context/ViewContext/ViewContext.cjs');
17
17
  require('../../../shared/logger.cjs');
18
18
  require('@dynamic-labs/wallet-book');
19
+ var isSSR = require('../../../shared/utils/functions/isSSR/isSSR.cjs');
19
20
  require('../../../utils/constants/colors.cjs');
20
21
  require('../../../utils/constants/values.cjs');
21
22
  require('../../../shared/consts/index.cjs');
@@ -39,7 +40,25 @@ const useDynamicSettingsValue = (projectSettingName, dynamicSettingName) => {
39
40
  return ((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general[projectSettingName]) !== null && _a !== void 0 ? _a : dynamicSettings[dynamicSettingName]);
40
41
  };
41
42
  const useAppName = () => useDynamicSettingsValue('displayName', 'appName');
42
- const useRedirectUrl = () => dynamicContextProps.useDynamicSettings().redirectUrl;
43
+ // Mobile wallets that connect via deeplink (e.g. Backpack over WalletConnect)
44
+ // return the user through the redirect metadata/deeplink param built from this
45
+ // value. With no explicit redirectUrl there is nothing to return through, so
46
+ // the wallet falls back to opening the dapp in the system browser. Defaulting
47
+ // to the current page keeps the return inside the dapp. `||` is intentional:
48
+ // an empty redirectUrl is meaningless to wallets and should fall back too. The
49
+ // fallback strips query and fragment so ambient credentials in the URL (e.g.
50
+ // auth tokens) are never handed to the wallet as return metadata. The fallback
51
+ // is captured once via a lazy useState initializer rather than derived on every
52
+ // render: client-side navigation changes the pathname, and redirectUrl feeds
53
+ // the walletConnectorOptions memo — a changing value would rebuild every
54
+ // wallet connector mid-session and drop imperatively-set providers (e.g. the
55
+ // waas password provider).
56
+ const useRedirectUrl = () => {
57
+ const [locationFallback] = React.useState(() => isSSR.isSSR()
58
+ ? undefined
59
+ : `${window.location.origin}${window.location.pathname}`);
60
+ return dynamicContextProps.useDynamicSettings().redirectUrl || locationFallback;
61
+ };
43
62
 
44
63
  exports.useAppName = useAppName;
45
64
  exports.useRedirectUrl = useRedirectUrl;
@@ -1,7 +1,7 @@
1
1
  'use client'
2
+ import { useState } from 'react';
2
3
  import '@dynamic-labs-sdk/client/core';
3
4
  import '@dynamic-labs/sdk-api-core';
4
- import 'react';
5
5
  import 'eventemitter3';
6
6
  import '@dynamic-labs/utils';
7
7
  import '@dynamic-labs-sdk/client';
@@ -12,6 +12,7 @@ import 'react/jsx-runtime';
12
12
  import '../../../context/ViewContext/ViewContext.js';
13
13
  import '../../../shared/logger.js';
14
14
  import '@dynamic-labs/wallet-book';
15
+ import { isSSR } from '../../../shared/utils/functions/isSSR/isSSR.js';
15
16
  import '../../../utils/constants/colors.js';
16
17
  import '../../../utils/constants/values.js';
17
18
  import '../../../shared/consts/index.js';
@@ -35,6 +36,24 @@ const useDynamicSettingsValue = (projectSettingName, dynamicSettingName) => {
35
36
  return ((_a = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.general[projectSettingName]) !== null && _a !== void 0 ? _a : dynamicSettings[dynamicSettingName]);
36
37
  };
37
38
  const useAppName = () => useDynamicSettingsValue('displayName', 'appName');
38
- const useRedirectUrl = () => useDynamicSettings().redirectUrl;
39
+ // Mobile wallets that connect via deeplink (e.g. Backpack over WalletConnect)
40
+ // return the user through the redirect metadata/deeplink param built from this
41
+ // value. With no explicit redirectUrl there is nothing to return through, so
42
+ // the wallet falls back to opening the dapp in the system browser. Defaulting
43
+ // to the current page keeps the return inside the dapp. `||` is intentional:
44
+ // an empty redirectUrl is meaningless to wallets and should fall back too. The
45
+ // fallback strips query and fragment so ambient credentials in the URL (e.g.
46
+ // auth tokens) are never handed to the wallet as return metadata. The fallback
47
+ // is captured once via a lazy useState initializer rather than derived on every
48
+ // render: client-side navigation changes the pathname, and redirectUrl feeds
49
+ // the walletConnectorOptions memo — a changing value would rebuild every
50
+ // wallet connector mid-session and drop imperatively-set providers (e.g. the
51
+ // waas password provider).
52
+ const useRedirectUrl = () => {
53
+ const [locationFallback] = useState(() => isSSR()
54
+ ? undefined
55
+ : `${window.location.origin}${window.location.pathname}`);
56
+ return useDynamicSettings().redirectUrl || locationFallback;
57
+ };
39
58
 
40
59
  export { useAppName, useRedirectUrl };