@dynamic-labs/sdk-react-core 4.20.4 → 4.20.6

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 (89) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/package.cjs +2 -2
  3. package/package.js +2 -2
  4. package/package.json +12 -12
  5. package/src/functions.d.ts +1 -0
  6. package/src/index.cjs +5 -2
  7. package/src/index.d.ts +3 -1
  8. package/src/index.js +3 -2
  9. package/src/lib/Main.cjs +2 -2
  10. package/src/lib/Main.js +3 -3
  11. package/src/lib/components/ModalCard/ModalCard.cjs +3 -1
  12. package/src/lib/components/ModalCard/ModalCard.d.ts +2 -0
  13. package/src/lib/components/ModalCard/ModalCard.js +3 -1
  14. package/src/lib/components/UserWalletsList/UserWalletsList.cjs +2 -2
  15. package/src/lib/components/UserWalletsList/UserWalletsList.js +3 -3
  16. package/src/lib/context/DynamicContext/DynamicContext.cjs +3 -0
  17. package/src/lib/context/DynamicContext/DynamicContext.js +3 -0
  18. package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.cjs +8 -3
  19. package/src/lib/context/DynamicContext/hooks/useHandleLogout/useHandleLogout.js +8 -3
  20. package/src/lib/context/UserWalletsContext/UserWalletsContext.cjs +2 -2
  21. package/src/lib/context/UserWalletsContext/UserWalletsContext.d.ts +1 -1
  22. package/src/lib/context/UserWalletsContext/UserWalletsContext.js +2 -2
  23. package/src/lib/data/api/api.cjs +5 -0
  24. package/src/lib/data/api/api.js +5 -0
  25. package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.cjs +1 -0
  26. package/src/lib/layout/DynamicUserProfileLayout/DynamicUserProfileLayout.js +1 -0
  27. package/src/lib/locale/en/translation.cjs +15 -0
  28. package/src/lib/locale/en/translation.d.ts +15 -0
  29. package/src/lib/locale/en/translation.js +15 -0
  30. package/src/lib/styles/index.shadow.cjs +1 -1
  31. package/src/lib/styles/index.shadow.js +1 -1
  32. package/src/lib/utils/constants/sessionStorage.cjs +12 -0
  33. package/src/lib/utils/constants/sessionStorage.d.ts +2 -0
  34. package/src/lib/utils/constants/sessionStorage.js +7 -0
  35. package/src/lib/utils/functions/clientSessionKeys/constants.cjs +8 -0
  36. package/src/lib/utils/functions/clientSessionKeys/constants.d.ts +1 -0
  37. package/src/lib/utils/functions/clientSessionKeys/constants.js +4 -0
  38. package/src/lib/utils/functions/clientSessionKeys/getClientSessionKeys.cjs +67 -0
  39. package/src/lib/utils/functions/clientSessionKeys/getClientSessionKeys.d.ts +17 -0
  40. package/src/lib/utils/functions/clientSessionKeys/getClientSessionKeys.js +58 -0
  41. package/src/lib/utils/functions/clientSessionKeys/index.d.ts +1 -0
  42. package/src/lib/utils/functions/clientSessionKeys/types.d.ts +5 -0
  43. package/src/lib/utils/functions/index.d.ts +2 -0
  44. package/src/lib/utils/functions/keyService/index.d.ts +1 -0
  45. package/src/lib/utils/{hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/utils.cjs → functions/keyService/keyService.cjs} +13 -1
  46. package/src/lib/utils/{hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/utils.d.ts → functions/keyService/keyService.d.ts} +1 -0
  47. package/src/lib/utils/{hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/utils.js → functions/keyService/keyService.js} +13 -2
  48. package/src/lib/utils/functions/usingV3Wallets/index.d.ts +1 -0
  49. package/src/lib/utils/hooks/index.d.ts +1 -0
  50. package/src/lib/utils/hooks/useClientSessionKeys/index.d.ts +1 -0
  51. package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.cjs +63 -0
  52. package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.d.ts +5 -0
  53. package/src/lib/utils/hooks/useClientSessionKeys/useClientSessionKeys.js +59 -0
  54. package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +4 -0
  55. package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +4 -0
  56. package/src/lib/utils/hooks/useDynamicWaas/constants.cjs +3 -1
  57. package/src/lib/utils/hooks/useDynamicWaas/constants.d.ts +2 -1
  58. package/src/lib/utils/hooks/useDynamicWaas/constants.js +3 -2
  59. package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.cjs +75 -57
  60. package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.d.ts +1 -1
  61. package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.js +76 -58
  62. package/src/lib/utils/hooks/useEmbeddedWalletSessionKeys/useEmbeddedWalletSessionKeys.cjs +6 -17
  63. package/src/lib/utils/hooks/useEmbeddedWalletSessionKeys/useEmbeddedWalletSessionKeys.js +1 -12
  64. package/src/lib/utils/hooks/useFundWithWallet/useChooseLinkedWallet/useChooseLinkedWallet.cjs +1 -1
  65. package/src/lib/utils/hooks/useFundWithWallet/useChooseLinkedWallet/useChooseLinkedWallet.js +2 -2
  66. package/src/lib/utils/hooks/useFundWithWallet/useConnectWalletForFunding/useConnectWalletForFunding.cjs +1 -1
  67. package/src/lib/utils/hooks/useFundWithWallet/useConnectWalletForFunding/useConnectWalletForFunding.js +2 -2
  68. package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.cjs +1 -1
  69. package/src/lib/utils/hooks/useIsLoggedIn/useIsLoggedIn.js +1 -1
  70. package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.cjs +3 -1
  71. package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.js +3 -1
  72. package/src/lib/utils/hooks/useSwitchWallet/useSwitchWallet.cjs +1 -1
  73. package/src/lib/utils/hooks/useSwitchWallet/useSwitchWallet.js +2 -2
  74. package/src/lib/utils/hooks/useSyncDynamicWaas/useSyncDynamicWaas.cjs +0 -5
  75. package/src/lib/utils/hooks/useSyncDynamicWaas/useSyncDynamicWaas.js +0 -5
  76. package/src/lib/utils/hooks/useWalletConnectors/utils/smartWallet/smartWallet.cjs +4 -1
  77. package/src/lib/utils/hooks/useWalletConnectors/utils/smartWallet/smartWallet.js +4 -1
  78. package/src/lib/utils/hooks/useWalletList/useWalletList.cjs +1 -1
  79. package/src/lib/utils/hooks/useWalletList/useWalletList.js +2 -2
  80. package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.cjs +1 -1
  81. package/src/lib/views/LoginView/sections/WalletSignInSection/WalletSimpleSignIn/WalletSimpleSignIn.js +2 -2
  82. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.cjs +2 -0
  83. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.d.ts +13 -0
  84. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.js +2 -0
  85. package/src/lib/widgets/DynamicWidget/context/DynamicWidgetContext.types.d.ts +1 -1
  86. package/src/lib/widgets/DynamicWidget/views/ConfirmExchangeTransferView/ConfirmExchangeTransferView.cjs +134 -0
  87. package/src/lib/widgets/DynamicWidget/views/ConfirmExchangeTransferView/ConfirmExchangeTransferView.d.ts +18 -0
  88. package/src/lib/widgets/DynamicWidget/views/ConfirmExchangeTransferView/ConfirmExchangeTransferView.js +130 -0
  89. package/src/lib/widgets/DynamicWidget/views/ConfirmExchangeTransferView/index.d.ts +1 -0
@@ -29,7 +29,7 @@ import '../../../../store/state/primaryWalletId/primaryWalletId.js';
29
29
  import '../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
30
30
  import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
31
31
  import '../../../../context/AccountExistsContext/AccountExistsContext.js';
32
- import { useUserWallets } from '../../../../context/UserWalletsContext/UserWalletsContext.js';
32
+ import { useInternalUserWallets } from '../../../../context/UserWalletsContext/UserWalletsContext.js';
33
33
  import { dynamicEvents } from '../../../../events/dynamicEvents.js';
34
34
  import '../../../../store/state/authMode/authMode.js';
35
35
  import '../../../../context/VerificationContext/VerificationContext.js';
@@ -103,7 +103,7 @@ import { useInternalDynamicContext } from '../../../../context/DynamicContext/us
103
103
  const useConnectWalletForFunding = () => {
104
104
  const { primaryWallet, setShowAuthFlow } = useInternalDynamicContext();
105
105
  const { clearStackAndPush } = useViewContext();
106
- const userWallets = useUserWallets();
106
+ const { userWallets } = useInternalUserWallets();
107
107
  const initiatedByWidgetRef = useRef(false);
108
108
  const { walletOptions } = useWalletOptions();
109
109
  const internalConnectionPromiseRef = useRef(null);
@@ -32,6 +32,7 @@ require('../../../locale/locale.cjs');
32
32
  require('../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
33
33
  require('../../../store/state/primaryWalletId/primaryWalletId.cjs');
34
34
  require('../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
35
+ var usingV3Wallets = require('../../functions/usingV3Wallets/usingV3Wallets.cjs');
35
36
  require('../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
36
37
  require('../../../context/AccountExistsContext/AccountExistsContext.cjs');
37
38
  require('../../../context/UserWalletsContext/UserWalletsContext.cjs');
@@ -42,7 +43,6 @@ require('../../functions/compareChains/compareChains.cjs');
42
43
  require('../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.cjs');
43
44
  require('../../../context/ThemeContext/ThemeContext.cjs');
44
45
  var useSmartWallets = require('../useSmartWallets/useSmartWallets.cjs');
45
- var usingV3Wallets = require('../../functions/usingV3Wallets/usingV3Wallets.cjs');
46
46
  require('../useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
47
47
  require('bs58');
48
48
  require('@dynamic-labs/types');
@@ -28,6 +28,7 @@ import '../../../locale/locale.js';
28
28
  import '../../../store/state/dynamicContextProps/dynamicContextProps.js';
29
29
  import '../../../store/state/primaryWalletId/primaryWalletId.js';
30
30
  import '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
31
+ import { usingV3Wallets } from '../../functions/usingV3Wallets/usingV3Wallets.js';
31
32
  import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
32
33
  import '../../../context/AccountExistsContext/AccountExistsContext.js';
33
34
  import '../../../context/UserWalletsContext/UserWalletsContext.js';
@@ -38,7 +39,6 @@ import '../../functions/compareChains/compareChains.js';
38
39
  import '../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.js';
39
40
  import '../../../context/ThemeContext/ThemeContext.js';
40
41
  import { useSmartWallets } from '../useSmartWallets/useSmartWallets.js';
41
- import { usingV3Wallets } from '../../functions/usingV3Wallets/usingV3Wallets.js';
42
42
  import '../useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
43
43
  import 'bs58';
44
44
  import '@dynamic-labs/types';
@@ -99,11 +99,13 @@ var useDynamicWaas = require('../useDynamicWaas/useDynamicWaas.cjs');
99
99
  var apiUrl = require('../../constants/waas/apiUrl.cjs');
100
100
  require('../../../store/state/tokenBalances.cjs');
101
101
  require('../../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
102
+ var useClientSessionKeys = require('../useClientSessionKeys/useClientSessionKeys.cjs');
102
103
 
103
104
  const useSetWalletConnectorFetchers = (walletOptions, environmentId, projectSettings) => {
104
105
  const apiBaseUrl = dynamicContextProps.useApiBaseUrl();
105
106
  const authToken = getMinAuthToken.getMinAuthToken();
106
- const { registerEmbeddedWalletSessionKey, removeSessionKey, getSignedSessionId, } = useEmbeddedWalletSessionKeys.useEmbeddedWalletSessionKeys({ environmentId, projectSettings });
107
+ const { registerEmbeddedWalletSessionKey, removeSessionKey } = useEmbeddedWalletSessionKeys.useEmbeddedWalletSessionKeys({ environmentId, projectSettings });
108
+ const { getSignedSessionId } = useClientSessionKeys.useClientSessionKeys();
107
109
  if (!(walletOptions === null || walletOptions === void 0 ? void 0 : walletOptions.length))
108
110
  return;
109
111
  walletOptions.forEach((walletOption) => {
@@ -95,11 +95,13 @@ import { configWaasWalletConnector } from '../useDynamicWaas/useDynamicWaas.js';
95
95
  import { DEFAULT_WAAS_API_URL } from '../../constants/waas/apiUrl.js';
96
96
  import '../../../store/state/tokenBalances.js';
97
97
  import '../../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
98
+ import { useClientSessionKeys } from '../useClientSessionKeys/useClientSessionKeys.js';
98
99
 
99
100
  const useSetWalletConnectorFetchers = (walletOptions, environmentId, projectSettings) => {
100
101
  const apiBaseUrl = useApiBaseUrl();
101
102
  const authToken = getMinAuthToken();
102
- const { registerEmbeddedWalletSessionKey, removeSessionKey, getSignedSessionId, } = useEmbeddedWalletSessionKeys({ environmentId, projectSettings });
103
+ const { registerEmbeddedWalletSessionKey, removeSessionKey } = useEmbeddedWalletSessionKeys({ environmentId, projectSettings });
104
+ const { getSignedSessionId } = useClientSessionKeys();
103
105
  if (!(walletOptions === null || walletOptions === void 0 ? void 0 : walletOptions.length))
104
106
  return;
105
107
  walletOptions.forEach((walletOption) => {
@@ -126,7 +126,7 @@ var useInternalDynamicContext = require('../../../context/DynamicContext/useDyna
126
126
  const useSwitchWallet = () => {
127
127
  const { setPrimaryWallet, user, primaryWallet } = useInternalDynamicContext.useInternalDynamicContext();
128
128
  const { getEOAWallet } = useSmartWallets.useSmartWallets();
129
- const userWallets = UserWalletsContext.useUserWallets();
129
+ const { userWallets } = UserWalletsContext.useInternalUserWallets();
130
130
  return React.useCallback((walletId) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
131
131
  var _a, _b, _c;
132
132
  const wallet = userWallets.find((wallet) => wallet.id === walletId);
@@ -29,7 +29,7 @@ import '../../../store/state/primaryWalletId/primaryWalletId.js';
29
29
  import '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
30
30
  import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
31
31
  import '../../../context/AccountExistsContext/AccountExistsContext.js';
32
- import { useUserWallets } from '../../../context/UserWalletsContext/UserWalletsContext.js';
32
+ import { useInternalUserWallets } from '../../../context/UserWalletsContext/UserWalletsContext.js';
33
33
  import '../../../store/state/authMode/authMode.js';
34
34
  import '../../../context/VerificationContext/VerificationContext.js';
35
35
  import 'react-dom';
@@ -122,7 +122,7 @@ import { useInternalDynamicContext } from '../../../context/DynamicContext/useDy
122
122
  const useSwitchWallet = () => {
123
123
  const { setPrimaryWallet, user, primaryWallet } = useInternalDynamicContext();
124
124
  const { getEOAWallet } = useSmartWallets();
125
- const userWallets = useUserWallets();
125
+ const { userWallets } = useInternalUserWallets();
126
126
  return useCallback((walletId) => __awaiter(void 0, void 0, void 0, function* () {
127
127
  var _a, _b, _c;
128
128
  const wallet = userWallets.find((wallet) => wallet.id === walletId);
@@ -96,7 +96,6 @@ require('../../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFu
96
96
  require('../../../../index.cjs');
97
97
  var useDynamicWaas = require('../useDynamicWaas/useDynamicWaas.cjs');
98
98
  require('../../../store/state/tokenBalances.cjs');
99
- var useRefreshUser = require('../useRefreshUser/useRefreshUser.cjs');
100
99
  require('../../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
101
100
  var useInternalDynamicContext = require('../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.cjs');
102
101
 
@@ -107,7 +106,6 @@ const useSyncDynamicWaas = () => {
107
106
  const { user: user$1 } = user.useUser();
108
107
  const projectSettings$1 = projectSettings.useProjectSettings();
109
108
  const walletConnectorOptions = walletOptions.useWalletConnectorOptions();
110
- const refresh = useRefreshUser.useRefreshUser();
111
109
  const { createWalletAccount, needsAutoCreateWalletChains } = useDynamicWaas.useDynamicWaas();
112
110
  const triggeredCreate = React.useRef(false);
113
111
  useDynamicEvents.useInternalDynamicEvents('logout', () => {
@@ -126,8 +124,6 @@ const useSyncDynamicWaas = () => {
126
124
  }
127
125
  catch (error) {
128
126
  logger.logger.error('Error creating dynamic waas wallet', error);
129
- // we need to refresh the user to update the created wallets before running the auto-create flow again
130
- refresh();
131
127
  setShowAuthFlow(true);
132
128
  clearStackAndPush('backup-unsuccessful');
133
129
  }
@@ -154,7 +150,6 @@ const useSyncDynamicWaas = () => {
154
150
  primaryWallet,
155
151
  needsAutoCreateWalletChains,
156
152
  clearStackAndPush,
157
- refresh,
158
153
  ]);
159
154
  };
160
155
 
@@ -92,7 +92,6 @@ import '../../../widgets/DynamicWidget/views/ReceiveWalletFunds/ReceiveWalletFun
92
92
  import '../../../../index.js';
93
93
  import { useDynamicWaas } from '../useDynamicWaas/useDynamicWaas.js';
94
94
  import '../../../store/state/tokenBalances.js';
95
- import { useRefreshUser } from '../useRefreshUser/useRefreshUser.js';
96
95
  import '../../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
97
96
  import { useInternalDynamicContext } from '../../../context/DynamicContext/useDynamicContext/useInternalDynamicContext/useInternalDynamicContext.js';
98
97
 
@@ -103,7 +102,6 @@ const useSyncDynamicWaas = () => {
103
102
  const { user } = useUser();
104
103
  const projectSettings = useProjectSettings();
105
104
  const walletConnectorOptions = useWalletConnectorOptions();
106
- const refresh = useRefreshUser();
107
105
  const { createWalletAccount, needsAutoCreateWalletChains } = useDynamicWaas();
108
106
  const triggeredCreate = useRef(false);
109
107
  useInternalDynamicEvents('logout', () => {
@@ -122,8 +120,6 @@ const useSyncDynamicWaas = () => {
122
120
  }
123
121
  catch (error) {
124
122
  logger.error('Error creating dynamic waas wallet', error);
125
- // we need to refresh the user to update the created wallets before running the auto-create flow again
126
- refresh();
127
123
  setShowAuthFlow(true);
128
124
  clearStackAndPush('backup-unsuccessful');
129
125
  }
@@ -150,7 +146,6 @@ const useSyncDynamicWaas = () => {
150
146
  primaryWallet,
151
147
  needsAutoCreateWalletChains,
152
148
  clearStackAndPush,
153
- refresh,
154
149
  ]);
155
150
  };
156
151
 
@@ -17,7 +17,10 @@ const initializeSmartWallet = (_a) => _tslib.__awaiter(void 0, [_a], void 0, fun
17
17
  var _b, _c;
18
18
  const smartWallet = findWalletOptionFor.findWalletOptionFor(account, walletConnectorOptions);
19
19
  if (!smartWallet) {
20
- throw new Error('could not find smart wallet from wallet options');
20
+ throw new Error(`could not find smart wallet from wallet options. Account: ${JSON.stringify(account)}, Wallet options found: ${walletConnectorOptions
21
+ .filter((option) => ['turnkeyhd', 'dynamicwaas', 'zerodev', 'zksync'].includes(option.key))
22
+ .map((option) => option.key)
23
+ .join(', ')}`);
21
24
  }
22
25
  const connector = smartWallet.walletConnector;
23
26
  if (!walletConnectorCore.isAccountAbstractionConnector(connector)) {
@@ -13,7 +13,10 @@ const initializeSmartWallet = (_a) => __awaiter(void 0, [_a], void 0, function*
13
13
  var _b, _c;
14
14
  const smartWallet = findWalletOptionFor(account, walletConnectorOptions);
15
15
  if (!smartWallet) {
16
- throw new Error('could not find smart wallet from wallet options');
16
+ throw new Error(`could not find smart wallet from wallet options. Account: ${JSON.stringify(account)}, Wallet options found: ${walletConnectorOptions
17
+ .filter((option) => ['turnkeyhd', 'dynamicwaas', 'zerodev', 'zksync'].includes(option.key))
18
+ .map((option) => option.key)
19
+ .join(', ')}`);
17
20
  }
18
21
  const connector = smartWallet.walletConnector;
19
22
  if (!isAccountAbstractionConnector(connector)) {
@@ -103,7 +103,7 @@ var useInternalDynamicContext = require('../../../context/DynamicContext/useDyna
103
103
 
104
104
  const useWalletList = ({ isWalletConnectList = false, viewWalletsFilter, searchFilter, lastUsedWalletKey, }) => {
105
105
  const { walletsFilter, walletConnectorOptions, defaultNumberOfWalletsToShow, bridgeChainsToConnect, multiWallet, recommendedWallets, selectedTabSettings, } = useInternalDynamicContext.useInternalDynamicContext();
106
- const userWallets = UserWalletsContext.useUserWallets();
106
+ const { userWallets } = UserWalletsContext.useInternalUserWallets();
107
107
  const walletGroups = walletOptions.useWalletGroups();
108
108
  const getFilteredBridgeChains = (bridgeChainsToConnect === null || bridgeChainsToConnect === void 0 ? void 0 : bridgeChainsToConnect.length) &&
109
109
  index.FilterBridgeChainsName(bridgeChainsToConnect[0].chain);
@@ -29,7 +29,7 @@ import '../../../store/state/primaryWalletId/primaryWalletId.js';
29
29
  import '../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
30
30
  import '../../../context/AccessDeniedContext/AccessDeniedContext.js';
31
31
  import '../../../context/AccountExistsContext/AccountExistsContext.js';
32
- import { useUserWallets } from '../../../context/UserWalletsContext/UserWalletsContext.js';
32
+ import { useInternalUserWallets } from '../../../context/UserWalletsContext/UserWalletsContext.js';
33
33
  import '../../../store/state/authMode/authMode.js';
34
34
  import '../../../context/VerificationContext/VerificationContext.js';
35
35
  import 'react-dom';
@@ -99,7 +99,7 @@ import { useInternalDynamicContext } from '../../../context/DynamicContext/useDy
99
99
 
100
100
  const useWalletList = ({ isWalletConnectList = false, viewWalletsFilter, searchFilter, lastUsedWalletKey, }) => {
101
101
  const { walletsFilter, walletConnectorOptions, defaultNumberOfWalletsToShow, bridgeChainsToConnect, multiWallet, recommendedWallets, selectedTabSettings, } = useInternalDynamicContext();
102
- const userWallets = useUserWallets();
102
+ const { userWallets } = useInternalUserWallets();
103
103
  const walletGroups = useWalletGroups();
104
104
  const getFilteredBridgeChains = (bridgeChainsToConnect === null || bridgeChainsToConnect === void 0 ? void 0 : bridgeChainsToConnect.length) &&
105
105
  FilterBridgeChainsName(bridgeChainsToConnect[0].chain);
@@ -107,7 +107,7 @@ const WalletSimpleSignIn = ({ previewWalletsNumber, disabled = false, onshowAllW
107
107
  var _a;
108
108
  const { t } = reactI18next.useTranslation();
109
109
  const { walletConnectorOptions, projectSettings, walletsFilter, multiWallet, recommendedWallets, } = useInternalDynamicContext.useInternalDynamicContext();
110
- const userWallets = UserWalletsContext.useUserWallets();
110
+ const { userWallets } = UserWalletsContext.useInternalUserWallets();
111
111
  const walletGroups = walletOptions.useWalletGroups();
112
112
  const { handleWalletItemClick } = useWalletItemActions.useWalletItemActions();
113
113
  const { numberOfWallets, walletsList } = walletListBuilder.walletListBuilder({
@@ -32,7 +32,7 @@ import '../../../../../store/state/primaryWalletId/primaryWalletId.js';
32
32
  import '../../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
33
33
  import '../../../../../context/AccessDeniedContext/AccessDeniedContext.js';
34
34
  import '../../../../../context/AccountExistsContext/AccountExistsContext.js';
35
- import { useUserWallets } from '../../../../../context/UserWalletsContext/UserWalletsContext.js';
35
+ import { useInternalUserWallets } from '../../../../../context/UserWalletsContext/UserWalletsContext.js';
36
36
  import '../../../../../store/state/authMode/authMode.js';
37
37
  import '../../../../../context/VerificationContext/VerificationContext.js';
38
38
  import 'react-dom';
@@ -103,7 +103,7 @@ const WalletSimpleSignIn = ({ previewWalletsNumber, disabled = false, onshowAllW
103
103
  var _a;
104
104
  const { t } = useTranslation();
105
105
  const { walletConnectorOptions, projectSettings, walletsFilter, multiWallet, recommendedWallets, } = useInternalDynamicContext();
106
- const userWallets = useUserWallets();
106
+ const { userWallets } = useInternalUserWallets();
107
107
  const walletGroups = useWalletGroups();
108
108
  const { handleWalletItemClick } = useWalletItemActions();
109
109
  const { numberOfWallets, walletsList } = walletListBuilder({
@@ -14,6 +14,7 @@ var SessionManagementView = require('../../views/SessionManagementView/SessionMa
14
14
  var ChooseLinkedWalletView = require('../../views/ChooseLinkedWalletView/ChooseLinkedWalletView.cjs');
15
15
  var ChooseOnrampProviderView = require('../../views/ChooseOnrampProviderView/ChooseOnrampProviderView.cjs');
16
16
  var ChooseWalletFundingMethod = require('../../views/ChooseWalletFundingMethod/ChooseWalletFundingMethod.cjs');
17
+ var ConfirmExchangeTransferView = require('../../views/ConfirmExchangeTransferView/ConfirmExchangeTransferView.cjs');
17
18
  var ConnectedAppsView = require('../../views/ConnectedAppsView/ConnectedAppsView.cjs');
18
19
  var DepositView = require('../../views/DepositView/DepositView.cjs');
19
20
  var GlobalWalletView = require('../../views/GlobalWalletView/GlobalWalletView.cjs');
@@ -27,6 +28,7 @@ const mapViewToComponent = {
27
28
  'choose-linked-wallet': ChooseLinkedWalletView.ChooseLinkedWalletView,
28
29
  'choose-onramp-provider': ChooseOnrampProviderView.ChooseOnrampProviderView,
29
30
  'choose-wallet-funding-method': ChooseWalletFundingMethod.ChooseWalletFundingMethod,
31
+ 'confirm-exchange-transfer': ConfirmExchangeTransferView.ConfirmExchangeTransferView,
30
32
  'connected-apps': ConnectedAppsView.ConnectedAppsView,
31
33
  'deposit-view': DepositView.DepositView,
32
34
  'edit-profile': EditProfileView.EditProfileView,
@@ -8,6 +8,19 @@ export declare const mapViewToComponent: {
8
8
  }>;
9
9
  'choose-onramp-provider': () => JSX.Element;
10
10
  'choose-wallet-funding-method': import("react").FC;
11
+ 'confirm-exchange-transfer': import("react").FC<{
12
+ amount?: number | undefined;
13
+ fiatAmount?: number | undefined;
14
+ toAddress?: string | undefined;
15
+ exchange: import("@dynamic-labs/sdk-api-core").ExchangeKeyEnum;
16
+ accountIdentifier?: string | undefined;
17
+ token?: import("../../views/ReceiveWalletFunds/types").FundingTokenData | undefined;
18
+ fee?: number | undefined;
19
+ feeInFiat?: number | undefined;
20
+ fiatCurrencySymbol?: string | undefined;
21
+ onSubmit: () => void;
22
+ onBack: () => void;
23
+ }>;
11
24
  'connected-apps': import("react").FC<import("../../views/ConnectedAppsView").ConnectedAppsViewProps>;
12
25
  'deposit-view': () => JSX.Element | null;
13
26
  'edit-profile': import("react").FC<import("../../views/EditProfileView/EditProfileView").EditProfileViewProps>;
@@ -10,6 +10,7 @@ import { SessionManagementView } from '../../views/SessionManagementView/Session
10
10
  import { ChooseLinkedWalletView } from '../../views/ChooseLinkedWalletView/ChooseLinkedWalletView.js';
11
11
  import { ChooseOnrampProviderView } from '../../views/ChooseOnrampProviderView/ChooseOnrampProviderView.js';
12
12
  import { ChooseWalletFundingMethod } from '../../views/ChooseWalletFundingMethod/ChooseWalletFundingMethod.js';
13
+ import { ConfirmExchangeTransferView } from '../../views/ConfirmExchangeTransferView/ConfirmExchangeTransferView.js';
13
14
  import { ConnectedAppsView } from '../../views/ConnectedAppsView/ConnectedAppsView.js';
14
15
  import { DepositView } from '../../views/DepositView/DepositView.js';
15
16
  import { GlobalWalletView } from '../../views/GlobalWalletView/GlobalWalletView.js';
@@ -23,6 +24,7 @@ const mapViewToComponent = {
23
24
  'choose-linked-wallet': ChooseLinkedWalletView,
24
25
  'choose-onramp-provider': ChooseOnrampProviderView,
25
26
  'choose-wallet-funding-method': ChooseWalletFundingMethod,
27
+ 'confirm-exchange-transfer': ConfirmExchangeTransferView,
26
28
  'connected-apps': ConnectedAppsView,
27
29
  'deposit-view': DepositView,
28
30
  'edit-profile': EditProfileView,
@@ -13,7 +13,7 @@ export declare const DynamicSessionManagementViews: readonly ["session-managemen
13
13
  export type DynamicSessionManagementViewsType = typeof DynamicSessionManagementViews[number];
14
14
  export declare const DynamicTransactionsWidgetViews: readonly ["send-balance"];
15
15
  export type DynamicTransactionsWidgetViewsType = typeof DynamicTransactionsWidgetViews[number];
16
- export type DynamicWidgetViews = 'wallets' | 'profile' | 'edit-profile' | 'choose-wallet-funding-method' | 'receive-wallet-funds' | DynamicTransactionsWidgetViewsType | DynamicPasskeyWidgetViewsType | DynamicMfaWidgetViewsType | DynamicSettingsType | DynamicGlobalWalletType | DynamicSessionManagementViewsType | 'connected-apps' | 'deposit-view' | 'choose-onramp-provider' | 'choose-linked-wallet';
16
+ export type DynamicWidgetViews = 'wallets' | 'profile' | 'edit-profile' | 'choose-wallet-funding-method' | 'receive-wallet-funds' | DynamicTransactionsWidgetViewsType | DynamicPasskeyWidgetViewsType | DynamicMfaWidgetViewsType | DynamicSettingsType | DynamicGlobalWalletType | DynamicSessionManagementViewsType | 'connected-apps' | 'deposit-view' | 'confirm-exchange-transfer' | 'choose-onramp-provider' | 'choose-linked-wallet';
17
17
  export type DynamicWidgetViewMapConstraint = Record<DynamicWidgetViews, FC<any>>;
18
18
  export type DynamicWidgetViewMap = typeof mapViewToComponent;
19
19
  export type SetDynamicWidgetView = <T extends DynamicWidgetViews>(view: T, props?: ComponentProps<DynamicWidgetViewMap[T]>) => void;
@@ -0,0 +1,134 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+ var reactI18next = require('react-i18next');
8
+ require('@dynamic-labs/utils');
9
+ require('../../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
10
+ require('react');
11
+ var arrowLeft = require('../../../../shared/assets/arrow-left.cjs');
12
+ require('@dynamic-labs/iconic');
13
+ require('../../../../context/ViewContext/ViewContext.cjs');
14
+ require('../../../../../../_virtual/_tslib.cjs');
15
+ require('@dynamic-labs/sdk-api-core');
16
+ require('../../../../shared/logger.cjs');
17
+ require('@dynamic-labs/wallet-connector-core');
18
+ require('@dynamic-labs/wallet-book');
19
+ var shortenWalletAddress = require('../../../../shared/utils/functions/shortenWalletAddress/shortenWalletAddress.cjs');
20
+ require('../../../../utils/constants/colors.cjs');
21
+ require('../../../../utils/constants/values.cjs');
22
+ require('../../../../shared/consts/index.cjs');
23
+ require('../../../../components/Alert/Alert.cjs');
24
+ require('../../../../events/dynamicEvents.cjs');
25
+ require('../../../../context/DynamicContext/DynamicContext.cjs');
26
+ require('../../../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
27
+ require('../../../../store/state/authMode/authMode.cjs');
28
+ require('../../../../context/CaptchaContext/CaptchaContext.cjs');
29
+ require('../../../../context/ErrorContext/ErrorContext.cjs');
30
+ require('@dynamic-labs/multi-wallet');
31
+ require('react-international-phone');
32
+ require('../../../../store/state/nonce/nonce.cjs');
33
+ require('../../../../store/state/projectSettings/projectSettings.cjs');
34
+ require('../../../../config/ApiEndpoint.cjs');
35
+ require('../../../../store/state/user/user.cjs');
36
+ require('../../../../locale/locale.cjs');
37
+ require('../../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
38
+ require('../../../../store/state/primaryWalletId/primaryWalletId.cjs');
39
+ require('../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
40
+ require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
41
+ require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
42
+ require('../../../../context/UserWalletsContext/UserWalletsContext.cjs');
43
+ require('../../../../context/VerificationContext/VerificationContext.cjs');
44
+ require('react-dom');
45
+ require('../../../../utils/functions/compareChains/compareChains.cjs');
46
+ require('../../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.cjs');
47
+ require('../../../../context/ThemeContext/ThemeContext.cjs');
48
+ require('../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
49
+ require('bs58');
50
+ require('@dynamic-labs/types');
51
+ require('../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
52
+ require('../../../../context/LoadingContext/LoadingContext.cjs');
53
+ require('../../../../context/WalletContext/WalletContext.cjs');
54
+ require('../../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
55
+ require('yup');
56
+ require('../../../../context/MockContext/MockContext.cjs');
57
+ require('../../../../views/CollectUserDataView/useFields.cjs');
58
+ require('../../../../context/FieldsStateContext/FieldsStateContext.cjs');
59
+ require('../../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
60
+ require('@dynamic-labs/rpc-providers');
61
+ require('../../../../store/state/walletOptions/walletOptions.cjs');
62
+ var PoweredByDynamic = require('../../../../components/PoweredByDynamic/PoweredByDynamic.cjs');
63
+ require('../../../../context/FooterAnimationContext/index.cjs');
64
+ require('../../../../components/ShadowDOM/ShadowDOM.cjs');
65
+ require('../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
66
+ require('../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
67
+ require('../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
68
+ require('../../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.cjs');
69
+ require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
70
+ require('../../components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
71
+ var ModalCard = require('../../../../components/ModalCard/ModalCard.cjs');
72
+ require('react-focus-lock');
73
+ var Typography = require('../../../../components/Typography/Typography.cjs');
74
+ var Divider = require('../../../../components/Divider/Divider.cjs');
75
+ var DynamicWidgetContext = require('../../context/DynamicWidgetContext.cjs');
76
+ var IconButton = require('../../../../components/IconButton/IconButton.cjs');
77
+ require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
78
+ var Image = require('../../../../components/Image/Image.cjs');
79
+ var TypographyButton = require('../../../../components/TypographyButton/TypographyButton.cjs');
80
+ require('formik');
81
+ require('../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
82
+ var ModalHeader = require('../../../../components/ModalHeader/ModalHeader.cjs');
83
+ require('../../../../store/state/sendBalances.cjs');
84
+ require('../../../../components/Input/Input.cjs');
85
+ require('../../../../components/OverlayCard/OverlayCard.cjs');
86
+ require('../../../../views/TransactionConfirmationView/TransactionConfirmationView.cjs');
87
+ require('../../../../context/PasskeyContext/PasskeyContext.cjs');
88
+ require('../ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
89
+ require('../../../../context/OnrampContext/OnrampContext.cjs');
90
+ require('qrcode');
91
+ require('../ReceiveWalletFunds/ReceiveWalletFunds.cjs');
92
+ require('../../../../../index.cjs');
93
+ require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
94
+ require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
95
+ require('../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
96
+ require('@hcaptcha/react-hcaptcha');
97
+ require('../../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
98
+ require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
99
+ require('../../helpers/convertExchangeKeyAndProviderEnum.cjs');
100
+ require('../../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
101
+ require('../../../../store/state/tokenBalances.cjs');
102
+ require('../../../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
103
+ require('../../../../components/InlineWidget/InlineWidget.cjs');
104
+ require('../../../../components/IsBrowser/IsBrowser.cjs');
105
+ require('../../../../components/Popper/Popper/Popper.cjs');
106
+ require('../../../../components/Popper/PopperContext/PopperContext.cjs');
107
+
108
+ const ConfirmExchangeTransferView = ({ amount, toAddress, exchange, token, accountIdentifier, fiatAmount, fee, feeInFiat, fiatCurrencySymbol, onSubmit, onBack, }) => {
109
+ const { t } = reactI18next.useTranslation();
110
+ const { goToInitialDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
111
+ const backButton = (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', id: 'back-button', "data-testid": 'back-button', onClick: () => {
112
+ onBack();
113
+ }, children: jsxRuntime.jsx(arrowLeft.ReactComponent, {}) }));
114
+ return (jsxRuntime.jsxs("div", { className: 'confirm-exchange-transfer', children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { leading: backButton, children: jsxRuntime.jsx(Typography.Typography, { variant: 'title', children: t('dyn_exchange_transfer_confirmation.title') }) }), jsxRuntime.jsxs("div", { className: 'confirm-exchange-transfer__content', children: [jsxRuntime.jsx("div", { className: 'confirm-exchange-transfer__content__modal', children: jsxRuntime.jsxs(ModalCard.ModalCard, { border: false, sharpBorder: true, dropShadow: false, children: [jsxRuntime.jsxs("div", { className: 'confirm-exchange-transfer__content__modal__top', children: [jsxRuntime.jsxs("div", { className: 'confirm-exchange-transfer__content__modal__top__token', children: [(token === null || token === void 0 ? void 0 : token.logoURI) ? (jsxRuntime.jsx(Image.Image, { src: token.logoURI, alt: token.symbol, className: 'confirm-exchange-transfer__content__modal__top__token__icon', dataTestId: 'confirm-exchange-transfer__content__modal__top__token__icon' })) : (jsxRuntime.jsx("div", { className: 'confirm-exchange-transfer__content__modal__top__token__icon--skeleton', "data-testid": 'confirm-exchange-transfer__content__modal__top__token__icon--skeleton' })), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', className: 'confirm-exchange-transfer__content__modal__top__token__name', children: token === null || token === void 0 ? void 0 : token.symbol }), jsxRuntime.jsxs("div", { className: 'confirm-exchange-transfer__content__modal__top__token__balance-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'medium', "data-testid": 'confirm-exchange-transfer_token-option__primary', children: t('dyn_exchange_transfer_confirmation.send', {
115
+ fiatCurrency: fiatAmount,
116
+ fiatCurrencySymbol,
117
+ }) }), jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'body_small', color: 'secondary', "data-testid": 'confirm-exchange-transfer_token-option__secondary', children: `${amount} ${token === null || token === void 0 ? void 0 : token.symbol}` })] })] }), jsxRuntime.jsx(Divider.Divider, {})] }), jsxRuntime.jsxs("div", { className: 'confirm-exchange-transfer__content__modal__transaction', children: [jsxRuntime.jsxs("div", { className: 'confirm-exchange-transfer__content__modal__transaction__from', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'confirm-exchange-transfer__content__modal__transaction__from__title', "data-testid": 'confirm-exchange-transfer__content__modal__transaction__from__title', children: t('dyn_exchange_transfer_confirmation.from') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: 'confirm-exchange-transfer__content__modal__transaction__from__exchange', "data-testid": 'confirm-exchange-transfer__content__modal__transaction__from__exchange', children: accountIdentifier
118
+ ? `${(exchange === null || exchange === void 0 ? void 0 : exchange.charAt(0).toUpperCase()) + (exchange === null || exchange === void 0 ? void 0 : exchange.slice(1))} ${accountIdentifier}`
119
+ : `${(exchange === null || exchange === void 0 ? void 0 : exchange.charAt(0).toUpperCase()) + (exchange === null || exchange === void 0 ? void 0 : exchange.slice(1))}` })] }), jsxRuntime.jsx(Divider.Divider, {}), jsxRuntime.jsxs("div", { className: 'confirm-exchange-transfer__content__modal__transaction__from', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'confirm-exchange-transfer__content__modal__transaction__from__title', "data-testid": 'confirm-exchange-transfer__content__modal__transaction__from__title', children: t('dyn_exchange_transfer_confirmation.to') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: 'confirm-exchange-transfer__content__modal__transaction__from__exchange', "data-testid": 'confirm-exchange-transfer__content__modal__transaction__from__exchange', children: shortenWalletAddress.shortenWalletAddress(toAddress) })] }), jsxRuntime.jsx(Divider.Divider, {}), jsxRuntime.jsxs("div", { className: 'confirm-exchange-transfer__content__modal__transaction__from', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'confirm-exchange-transfer__content__modal__transaction__from__title', "data-testid": 'confirm-exchange-transfer__content__modal__transaction__from__title', children: t('dyn_exchange_transfer_confirmation.fee') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'medium', className: 'confirm-exchange-transfer__content__modal__transaction__from__exchange', "data-testid": 'confirm-exchange-transfer__content__modal__transaction__from__exchange', children: fee
120
+ ? `${fiatCurrencySymbol}${feeInFiat} (${fee} ${token === null || token === void 0 ? void 0 : token.symbol})`
121
+ : t('dyn_exchange_transfer_confirmation.fee_not_found') })] }), jsxRuntime.jsx(Divider.Divider, {}), jsxRuntime.jsxs("div", { className: 'confirm-exchange-transfer__content__modal__transaction__receive', children: [jsxRuntime.jsxs("div", { className: 'confirm-exchange-transfer__content__modal__transaction__receive__container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'bold', color: 'secondary', "data-testid": 'confirm-exchange-transfer__content__modal__transaction__receive__container', children: t('dyn_exchange_transfer_confirmation.receive') }), jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'body_small', color: 'secondary', "data-testid": 'confirm-exchange-transfer__content__modal__transaction__receive__container__fees', children: fee
122
+ ? t('dyn_exchange_transfer_confirmation.cost')
123
+ : t('dyn_exchange_transfer_confirmation.cost_no_fee') })] }), jsxRuntime.jsxs("div", { className: 'confirm-exchange-transfer__content__modal__transaction__receive__amount-container', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'bold', "data-testid": 'confirm-exchange-transfer__content__modal__transaction__receive__container', children: fee && fiatAmount && feeInFiat
124
+ ? `${fiatCurrencySymbol}${fiatAmount - feeInFiat}`
125
+ : `${fiatCurrencySymbol}${fiatAmount}` }), jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'body_small', color: 'secondary', "data-testid": 'confirm-exchange-transfer__content__modal__transaction__receive__container__fees', children: fee && amount
126
+ ? `${amount - fee} ${token === null || token === void 0 ? void 0 : token.symbol}`
127
+ : `${amount} ${token === null || token === void 0 ? void 0 : token.symbol}` })] })] })] })] }) }), jsxRuntime.jsx("div", { className: 'confirm-exchange-transfer__content__terms', children: jsxRuntime.jsx(ModalCard.ModalCard, { border: false, sharpBorder: true, dropShadow: false, children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'regular', className: 'confirm-exchange-transfer__content__modal__transaction__from__exchange', "data-testid": 'confirm-exchange-transfer__content__modal__transaction__from__exchange', children: t('dyn_exchange_transfer_confirmation.terms') }) }) }), jsxRuntime.jsxs("div", { className: 'confirm-exchange-transfer__content__buttons', children: [jsxRuntime.jsx("div", { className: 'confirm-exchange-transfer__content__buttons__button', children: jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'cancel-button', buttonVariant: 'card', typographyProps: { weight: 'bold' }, className: 'confirm-exchange-transfer__content__buttons__button', onClick: () => {
128
+ goToInitialDynamicWidgetView();
129
+ }, children: t('dyn_exchange_transfer_confirmation.cancel') }) }), jsxRuntime.jsx("div", { className: 'confirm-exchange-transfer__content__buttons__button', children: jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'confirm-button', buttonVariant: 'brand-primary', typographyProps: { color: 'white', weight: 'bold' }, className: 'confirm-exchange-transfer__content__buttons__button', onClick: () => {
130
+ onSubmit();
131
+ }, children: t('dyn_exchange_transfer_confirmation.confirm') }) })] })] }), jsxRuntime.jsx("div", { className: 'confirm-exchange-transfer__content__footer', children: jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { asFooter: true }) })] }));
132
+ };
133
+
134
+ exports.ConfirmExchangeTransferView = ConfirmExchangeTransferView;
@@ -0,0 +1,18 @@
1
+ import { FC } from 'react';
2
+ import { ExchangeKeyEnum } from '@dynamic-labs/sdk-api-core';
3
+ import { FundingTokenData } from '../ReceiveWalletFunds/types';
4
+ type ConfirmExchangeTransferViewProps = {
5
+ amount?: number;
6
+ fiatAmount?: number;
7
+ toAddress?: string;
8
+ exchange: ExchangeKeyEnum;
9
+ accountIdentifier?: string;
10
+ token?: FundingTokenData;
11
+ fee?: number;
12
+ feeInFiat?: number;
13
+ fiatCurrencySymbol?: string;
14
+ onSubmit: () => void;
15
+ onBack: () => void;
16
+ };
17
+ export declare const ConfirmExchangeTransferView: FC<ConfirmExchangeTransferViewProps>;
18
+ export {};