@dynamic-labs/sdk-react-core 4.48.2 → 4.50.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (117) hide show
  1. package/CHANGELOG.md +27 -0
  2. package/package.cjs +1 -1
  3. package/package.js +1 -1
  4. package/package.json +12 -12
  5. package/src/index.cjs +6 -4
  6. package/src/index.d.ts +1 -0
  7. package/src/index.js +3 -2
  8. package/src/lib/context/DynamicContext/DynamicContext.cjs +1 -1
  9. package/src/lib/context/DynamicContext/DynamicContext.js +1 -1
  10. package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.cjs +10 -0
  11. package/src/lib/context/DynamicContext/hooks/useTieCallbacksToEvents/useTieCallbacksToEvents.js +10 -0
  12. package/src/lib/context/OnrampContext/OnrampContext.cjs +4 -2
  13. package/src/lib/context/OnrampContext/OnrampContext.d.ts +1 -0
  14. package/src/lib/context/OnrampContext/OnrampContext.js +4 -2
  15. package/src/lib/context/OnrampContext/types.d.ts +1 -0
  16. package/src/lib/context/OnrampContext/utils/getOnrampProviders.cjs +2 -1
  17. package/src/lib/context/OnrampContext/utils/getOnrampProviders.d.ts +1 -1
  18. package/src/lib/context/OnrampContext/utils/getOnrampProviders.js +2 -1
  19. package/src/lib/context/PhantomRedirectContext/PhantomRedirectContext.cjs +38 -6
  20. package/src/lib/context/PhantomRedirectContext/PhantomRedirectContext.d.ts +2 -2
  21. package/src/lib/context/PhantomRedirectContext/PhantomRedirectContext.js +39 -8
  22. package/src/lib/context/PhantomRedirectContext/useResponseHandlers.cjs +108 -16
  23. package/src/lib/context/PhantomRedirectContext/useResponseHandlers.js +108 -16
  24. package/src/lib/context/ViewContext/types/index.d.ts +1 -1
  25. package/src/lib/data/api/onramp/onramp.cjs +2 -1
  26. package/src/lib/data/api/onramp/onramp.d.ts +2 -1
  27. package/src/lib/data/api/onramp/onramp.js +2 -1
  28. package/src/lib/events/dynamicEvents.cjs +2 -0
  29. package/src/lib/events/dynamicEvents.d.ts +1 -1
  30. package/src/lib/events/dynamicEvents.js +2 -0
  31. package/src/lib/shared/assets/backup-waas.cjs +4 -4
  32. package/src/lib/shared/assets/backup-waas.js +4 -4
  33. package/src/lib/shared/types/dynamicEventsCallbacks.d.ts +4 -0
  34. package/src/lib/styles/index.shadow.cjs +1 -1
  35. package/src/lib/styles/index.shadow.js +1 -1
  36. package/src/lib/utils/constants/authViewLayoutChecks.cjs +13 -0
  37. package/src/lib/utils/constants/authViewLayoutChecks.js +13 -0
  38. package/src/lib/utils/functions/generateMessages/index.cjs +11 -2
  39. package/src/lib/utils/functions/generateMessages/index.js +11 -2
  40. package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.cjs +27 -1
  41. package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.js +27 -1
  42. package/src/lib/utils/functions/index.d.ts +0 -1
  43. package/src/lib/utils/hooks/events/useDynamicEvents/useDynamicEvents.d.ts +1 -1
  44. package/src/lib/utils/hooks/index.d.ts +2 -0
  45. package/src/lib/utils/hooks/useAuthenticatePasskeyMFA/useAuthenticatePasskeyMFA.cjs +5 -1
  46. package/src/lib/utils/hooks/useAuthenticatePasskeyMFA/useAuthenticatePasskeyMFA.js +5 -1
  47. package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.cjs +35 -5
  48. package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.d.ts +1 -0
  49. package/src/lib/utils/hooks/useDynamicWaas/useDynamicWaas.js +35 -5
  50. package/src/lib/utils/hooks/useFunding/useFunding.d.ts +1 -0
  51. package/src/lib/utils/hooks/useOnramp/useOnramp.cjs +14 -29
  52. package/src/lib/utils/hooks/useOnramp/useOnramp.d.ts +14 -18
  53. package/src/lib/utils/hooks/useOnramp/useOnramp.js +14 -29
  54. package/src/lib/utils/hooks/usePhantomRedirectEvents/index.d.ts +1 -0
  55. package/src/lib/utils/hooks/usePhantomRedirectEvents/usePhantomRedirectEvents.cjs +65 -0
  56. package/src/lib/utils/hooks/usePhantomRedirectEvents/usePhantomRedirectEvents.d.ts +36 -0
  57. package/src/lib/utils/hooks/usePhantomRedirectEvents/usePhantomRedirectEvents.js +61 -0
  58. package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.cjs +17 -14
  59. package/src/lib/utils/hooks/useSetWalletConnectorFetchers/useSetWalletConnectorFetchers.js +17 -14
  60. package/src/lib/utils/hooks/useSignInWithPasskey/useSignInWithPasskey.cjs +106 -1
  61. package/src/lib/utils/hooks/useSignInWithPasskey/useSignInWithPasskey.js +106 -1
  62. package/src/lib/utils/hooks/useSmartWallets/useSmartWallets.cjs +1 -1
  63. package/src/lib/utils/hooks/useSmartWallets/useSmartWallets.js +1 -1
  64. package/src/lib/utils/hooks/useSyncDynamicWaas/useSyncDynamicWaas.cjs +1 -1
  65. package/src/lib/utils/hooks/useSyncDynamicWaas/useSyncDynamicWaas.js +1 -1
  66. package/src/lib/utils/hooks/useWalletBackup/index.d.ts +1 -0
  67. package/src/lib/utils/hooks/useWalletBackup/useWalletBackup.cjs +339 -0
  68. package/src/lib/utils/hooks/useWalletBackup/useWalletBackup.d.ts +49 -0
  69. package/src/lib/utils/hooks/useWalletBackup/useWalletBackup.js +332 -0
  70. package/src/lib/utils/hooks/useWalletDelegation/useWalletDelegation.cjs +2 -2
  71. package/src/lib/utils/hooks/useWalletDelegation/useWalletDelegation.js +2 -2
  72. package/src/lib/utils/hooks/useWalletItemActions/useHandleWalletItem/useHandleWalletItem.cjs +1 -0
  73. package/src/lib/utils/hooks/useWalletItemActions/useHandleWalletItem/useHandleWalletItem.js +1 -0
  74. package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.cjs +13 -0
  75. package/src/lib/views/EmbeddedReveal/EmbeddedRevealView/EmbeddedRevealView.js +14 -1
  76. package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.cjs +9 -6
  77. package/src/lib/views/MfaDisplayBackupCodesView/MfaDisplayBackupCodesView.js +9 -6
  78. package/src/lib/views/WalletUpgradeFlowView/WalletUpgradeFlowView.cjs +13 -0
  79. package/src/lib/views/WalletUpgradeFlowView/WalletUpgradeFlowView.js +14 -1
  80. package/src/lib/views/WalletUsedView/WalletUsedView.cjs +1 -0
  81. package/src/lib/views/WalletUsedView/WalletUsedView.js +1 -0
  82. package/src/lib/views/viewToComponentMap.cjs +15 -3
  83. package/src/lib/views/viewToComponentMap.d.ts +6 -0
  84. package/src/lib/views/viewToComponentMap.js +15 -3
  85. package/src/lib/widgets/DynamicWidget/components/ActiveWalletBalance/TokenBalanceItem/TokenBalanceItem.cjs +1 -1
  86. package/src/lib/widgets/DynamicWidget/components/ActiveWalletBalance/TokenBalanceItem/TokenBalanceItem.js +1 -1
  87. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.cjs +97 -3
  88. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetViews/mapViewToComponent.js +97 -3
  89. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/EmbeddedWalletExportSection/EmbeddedWalletExportSection.cjs +16 -14
  90. package/src/lib/widgets/DynamicWidget/views/AccountAndSecuritySettingsView/EmbeddedWalletExportSection/EmbeddedWalletExportSection.js +16 -14
  91. package/src/lib/widgets/DynamicWidget/views/CryptoComOnramp/CryptoComOnramp.cjs +3 -1
  92. package/src/lib/widgets/DynamicWidget/views/CryptoComOnramp/CryptoComOnramp.d.ts +1 -0
  93. package/src/lib/widgets/DynamicWidget/views/CryptoComOnramp/CryptoComOnramp.js +3 -1
  94. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/BackupStepper.cjs +37 -0
  95. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/BackupStepper.d.ts +7 -0
  96. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/BackupStepper.js +33 -0
  97. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupCloudProviderView.cjs +49 -0
  98. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupCloudProviderView.d.ts +2 -0
  99. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupCloudProviderView.js +45 -0
  100. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupDownloadView.cjs +53 -0
  101. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupDownloadView.d.ts +2 -0
  102. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupDownloadView.js +49 -0
  103. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupInfoView.cjs +9 -18
  104. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupInfoView.js +10 -19
  105. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupProgressView.cjs +52 -0
  106. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupProgressView.d.ts +2 -0
  107. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupProgressView.js +48 -0
  108. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupSuccessView.cjs +131 -0
  109. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupSuccessView.d.ts +5 -0
  110. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupSuccessView.js +127 -0
  111. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupView.cjs +45 -104
  112. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/WaasBackupView.js +47 -106
  113. package/src/lib/widgets/DynamicWidget/views/WaasBackupView/index.d.ts +6 -1
  114. package/src/lib/utils/functions/downloadFile/downloadFile.cjs +0 -15
  115. package/src/lib/utils/functions/downloadFile/downloadFile.d.ts +0 -1
  116. package/src/lib/utils/functions/downloadFile/downloadFile.js +0 -11
  117. package/src/lib/utils/functions/downloadFile/index.d.ts +0 -1
@@ -106,6 +106,12 @@ export declare const viewToComponentMap: {
106
106
  'user-delete-account': import("react").FC<{}>;
107
107
  'verify-email': import("react").FC<import("./EmailVerification/EmailVerification").EmailVerificationProps>;
108
108
  'verify-sms': import("react").FC;
109
+ 'waas-backup-cloud-provider-view': import("react").FC;
110
+ 'waas-backup-download-view': import("react").FC;
111
+ 'waas-backup-info-view': import("react").FC;
112
+ 'waas-backup-progress-view': import("react").FC;
113
+ 'waas-backup-success-view': import("react").FC<import("../widgets/DynamicWidget/views/WaasBackupView/WaasBackupSuccessView").WaasBackupSuccessViewProps>;
114
+ 'waas-backup-view': import("react").FC;
109
115
  'waas-upgrade-view': import("react").FC<import("./WaasUpgradeView").WaasUpgradeViewProps>;
110
116
  'wait-for-email-confirmation-view': () => JSX.Element;
111
117
  'wallet-cannot-be-transferred': () => JSX.Element;
@@ -1,5 +1,14 @@
1
1
  'use client'
2
2
  import { jsx } from 'react/jsx-runtime';
3
+ import 'react';
4
+ import '@dynamic-labs/iconic';
5
+ import '../context/ViewContext/ViewContext.js';
6
+ import { WaasBackupCloudProviderView } from '../widgets/DynamicWidget/views/WaasBackupView/WaasBackupCloudProviderView.js';
7
+ import { WaasBackupDownloadView } from '../widgets/DynamicWidget/views/WaasBackupView/WaasBackupDownloadView.js';
8
+ import { WaasBackupInfoView } from '../widgets/DynamicWidget/views/WaasBackupView/WaasBackupInfoView.js';
9
+ import { WaasBackupProgressView } from '../widgets/DynamicWidget/views/WaasBackupView/WaasBackupProgressView.js';
10
+ import { WaasBackupSuccessView } from '../widgets/DynamicWidget/views/WaasBackupView/WaasBackupSuccessView.js';
11
+ import { WaasBackupView } from '../widgets/DynamicWidget/views/WaasBackupView/WaasBackupView.js';
3
12
  import { AccessBlockedView } from './AccessBlockedView/AccessBlockedView.js';
4
13
  import { AccountExistsView } from './AccountExistsView/AccountExistsView.js';
5
14
  import { AccountUpgradedView } from './AccountUpgradedView/AccountUpgradedView.js';
@@ -49,9 +58,6 @@ import { EmbeddedAuthChoice } from './Passkey/EmbeddedAuthChoice/EmbeddedAuthCho
49
58
  import 'react-i18next';
50
59
  import '@dynamic-labs/utils';
51
60
  import '../components/Accordion/components/AccordionItem/AccordionItem.js';
52
- import 'react';
53
- import '@dynamic-labs/iconic';
54
- import '../context/ViewContext/ViewContext.js';
55
61
  import '../../../_virtual/_tslib.js';
56
62
  import '@dynamic-labs/wallet-connector-core';
57
63
  import '../shared/logger.js';
@@ -233,6 +239,12 @@ const viewToComponentMap = {
233
239
  'user-delete-account': UserDeleteAccountView,
234
240
  'verify-email': EmailVerification,
235
241
  'verify-sms': SmsVerification,
242
+ 'waas-backup-cloud-provider-view': WaasBackupCloudProviderView,
243
+ 'waas-backup-download-view': WaasBackupDownloadView,
244
+ 'waas-backup-info-view': WaasBackupInfoView,
245
+ 'waas-backup-progress-view': WaasBackupProgressView,
246
+ 'waas-backup-success-view': WaasBackupSuccessView,
247
+ 'waas-backup-view': WaasBackupView,
236
248
  'waas-upgrade-view': WaasUpgradeView,
237
249
  'wait-for-email-confirmation-view': EmailConfirmationWaitingView,
238
250
  'wallet-cannot-be-transferred': WalletCannotBeTransferredView,
@@ -119,7 +119,7 @@ const TokenBalanceItem = ({ tokenBalance, }) => {
119
119
  ? currencyFormatter.format(parseFloat((_a = tokenBalance.marketValue) === null || _a === void 0 ? void 0 : _a.toFixed(2)))
120
120
  : '<$0.01';
121
121
  };
122
- return (jsxRuntime.jsxs("div", { className: 'token-balance-item', children: [jsxRuntime.jsxs("div", { className: 'token-balance-item__name', children: [tokenBalance.logoURI ? (jsxRuntime.jsx(Image.Image, { src: tokenBalance.logoURI, alt: tokenBalance.symbol, className: 'token-balance-item__icon', dataTestId: 'token-balance-item-icon' })) : (jsxRuntime.jsx("div", { className: 'token-balance-item__skeleton-icon', "data-testid": 'token-balance-item__skeleton-icon' })), jsxRuntime.jsx("div", { children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', className: 'token-balance-item__title', color: 'primary', children: tokenBalance.name }) })] }), jsxRuntime.jsxs("div", { className: 'flex', children: [showFiat ? (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'bold', color: 'primary', style: { textAlign: 'right' }, children: formattedFiatValue() })) : null, jsxRuntime.jsx("div", { className: 'token-balance-item__value', children: jsxRuntime.jsxs("div", { className: 'token-balance-item__value__balance', "data-testid": 'token-balance-item-balance', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', style: { marginRight: '2px' }, children: tokenBalance.balance }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', children: tokenBalance.symbol })] }) })] })] }, tokenBalance.address));
122
+ return (jsxRuntime.jsxs("div", { className: 'token-balance-item', children: [jsxRuntime.jsxs("div", { className: 'token-balance-item__name', children: [tokenBalance.logoURI ? (jsxRuntime.jsx(Image.Image, { src: tokenBalance.logoURI, alt: tokenBalance.symbol, className: 'token-balance-item__icon', dataTestId: 'token-balance-item-icon' })) : (jsxRuntime.jsx("div", { className: 'token-balance-item__skeleton-icon', "data-testid": 'token-balance-item__skeleton-icon' })), jsxRuntime.jsx("div", { children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', className: 'token-balance-item__title', color: 'primary', children: tokenBalance.name }) })] }), jsxRuntime.jsxs("div", { className: 'flex', children: [showFiat ? (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'bold', color: 'primary', style: { textAlign: 'right' }, children: formattedFiatValue() })) : null, jsxRuntime.jsx("div", { className: 'token-balance-item__value', children: jsxRuntime.jsxs("div", { className: 'token-balance-item__value__balance', "data-testid": 'token-balance-item-balance', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', style: { marginRight: '2px' }, children: tokenBalance.balance }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', className: 'token-balance-item__symbol', children: tokenBalance.symbol })] }) })] })] }, tokenBalance.address));
123
123
  };
124
124
 
125
125
  exports.TokenBalanceItem = TokenBalanceItem;
@@ -115,7 +115,7 @@ const TokenBalanceItem = ({ tokenBalance, }) => {
115
115
  ? currencyFormatter.format(parseFloat((_a = tokenBalance.marketValue) === null || _a === void 0 ? void 0 : _a.toFixed(2)))
116
116
  : '<$0.01';
117
117
  };
118
- return (jsxs("div", { className: 'token-balance-item', children: [jsxs("div", { className: 'token-balance-item__name', children: [tokenBalance.logoURI ? (jsx(Image, { src: tokenBalance.logoURI, alt: tokenBalance.symbol, className: 'token-balance-item__icon', dataTestId: 'token-balance-item-icon' })) : (jsx("div", { className: 'token-balance-item__skeleton-icon', "data-testid": 'token-balance-item__skeleton-icon' })), jsx("div", { children: jsx(Typography, { variant: 'body_small', className: 'token-balance-item__title', color: 'primary', children: tokenBalance.name }) })] }), jsxs("div", { className: 'flex', children: [showFiat ? (jsx(Typography, { variant: 'body_small', weight: 'bold', color: 'primary', style: { textAlign: 'right' }, children: formattedFiatValue() })) : null, jsx("div", { className: 'token-balance-item__value', children: jsxs("div", { className: 'token-balance-item__value__balance', "data-testid": 'token-balance-item-balance', children: [jsx(Typography, { variant: 'body_small', color: 'secondary', style: { marginRight: '2px' }, children: tokenBalance.balance }), jsx(Typography, { variant: 'body_small', color: 'secondary', children: tokenBalance.symbol })] }) })] })] }, tokenBalance.address));
118
+ return (jsxs("div", { className: 'token-balance-item', children: [jsxs("div", { className: 'token-balance-item__name', children: [tokenBalance.logoURI ? (jsx(Image, { src: tokenBalance.logoURI, alt: tokenBalance.symbol, className: 'token-balance-item__icon', dataTestId: 'token-balance-item-icon' })) : (jsx("div", { className: 'token-balance-item__skeleton-icon', "data-testid": 'token-balance-item__skeleton-icon' })), jsx("div", { children: jsx(Typography, { variant: 'body_small', className: 'token-balance-item__title', color: 'primary', children: tokenBalance.name }) })] }), jsxs("div", { className: 'flex', children: [showFiat ? (jsx(Typography, { variant: 'body_small', weight: 'bold', color: 'primary', style: { textAlign: 'right' }, children: formattedFiatValue() })) : null, jsx("div", { className: 'token-balance-item__value', children: jsxs("div", { className: 'token-balance-item__value__balance', "data-testid": 'token-balance-item-balance', children: [jsx(Typography, { variant: 'body_small', color: 'secondary', style: { marginRight: '2px' }, children: tokenBalance.balance }), jsx(Typography, { variant: 'body_small', color: 'secondary', className: 'token-balance-item__symbol', children: tokenBalance.symbol })] }) })] })] }, tokenBalance.address));
119
119
  };
120
120
 
121
121
  export { TokenBalanceItem };
@@ -13,14 +13,101 @@ var SettingsView = require('../../views/SettingsView/SettingsView.cjs');
13
13
  var AccountAndSecuritySettingsView = require('../../views/AccountAndSecuritySettingsView/AccountAndSecuritySettingsView.cjs');
14
14
  var SessionManagementView = require('../../views/SessionManagementView/SessionManagementView.cjs');
15
15
  var WalletsDelegatedSettingsView = require('../../views/WalletsDelegatedSettingsView/WalletsDelegatedSettingsView.cjs');
16
- var WaasBackupView = require('../../views/WaasBackupView/WaasBackupView.cjs');
17
- var WaasBackupInfoView = require('../../views/WaasBackupView/WaasBackupInfoView.cjs');
18
- var CryptoComOnramp = require('../../views/CryptoComOnramp/CryptoComOnramp.cjs');
16
+ require('react/jsx-runtime');
17
+ require('react');
18
+ require('@dynamic-labs/iconic');
19
+ require('../../../../context/ViewContext/ViewContext.cjs');
20
+ require('../../../../../../_virtual/_tslib.cjs');
21
+ require('react-i18next');
22
+ require('@dynamic-labs/sdk-api-core');
23
+ require('@dynamic-labs/wallet-connector-core');
24
+ require('../../../../shared/logger.cjs');
25
+ require('@dynamic-labs/wallet-book');
26
+ require('@dynamic-labs/utils');
27
+ require('../../../../utils/constants/colors.cjs');
28
+ require('../../../../utils/constants/values.cjs');
29
+ require('../../../../shared/consts/index.cjs');
30
+ require('../../../../components/IconButton/IconButton.cjs');
31
+ require('@dynamic-labs/types');
32
+ require('../../../../context/DynamicContext/DynamicContext.cjs');
33
+ require('../../../../store/state/loadingAndLifecycle/loadingAndLifecycle.cjs');
34
+ require('../../../../events/dynamicEvents.cjs');
35
+ require('../../../../context/CaptchaContext/CaptchaContext.cjs');
36
+ require('../../../../context/ErrorContext/ErrorContext.cjs');
37
+ require('@dynamic-labs/multi-wallet');
38
+ require('react-international-phone');
39
+ require('../../../../store/state/nonce/nonce.cjs');
40
+ require('@dynamic-labs-sdk/client/core');
41
+ require('../../../../client/client.cjs');
42
+ require('@dynamic-labs-sdk/client');
43
+ require('../../../../config/ApiEndpoint.cjs');
44
+ require('@dynamic-labs/locale');
45
+ require('../../../../store/state/dynamicContextProps/dynamicContextProps.cjs');
46
+ require('../../../../store/state/primaryWalletId/primaryWalletId.cjs');
47
+ require('../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.cjs');
48
+ require('../../../../context/AccessDeniedContext/AccessDeniedContext.cjs');
49
+ require('../../../../context/AccountExistsContext/AccountExistsContext.cjs');
50
+ require('../../../../context/UserWalletsContext/UserWalletsContext.cjs');
51
+ require('../../../../store/state/authMode/authMode.cjs');
52
+ require('../../../../context/VerificationContext/VerificationContext.cjs');
53
+ require('react-dom');
54
+ require('../../../../utils/functions/compareChains/compareChains.cjs');
55
+ require('../../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.cjs');
56
+ require('../../../../context/ThemeContext/ThemeContext.cjs');
57
+ require('../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.cjs');
58
+ require('bs58');
59
+ require('yup');
60
+ require('../../../../context/MockContext/MockContext.cjs');
61
+ require('../../../../views/CollectUserDataView/useFields.cjs');
62
+ require('../../../../context/FieldsStateContext/FieldsStateContext.cjs');
63
+ require('../../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
64
+ require('@dynamic-labs/rpc-providers');
65
+ require('../../../../store/state/walletOptions/walletOptions.cjs');
66
+ require('../../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
67
+ require('../../../../components/Alert/Alert.cjs');
68
+ require('../../../../context/WalletContext/WalletContext.cjs');
69
+ require('../../../../components/ShadowDOM/ShadowDOM.cjs');
70
+ require('../../../../components/InlineWidget/InlineWidget.cjs');
71
+ require('../../../../components/Input/Input.cjs');
72
+ require('../../../../components/IsBrowser/IsBrowser.cjs');
73
+ require('../../../../components/MenuList/Dropdown/Dropdown.cjs');
74
+ require('../../../../components/OverlayCard/OverlayCard.cjs');
75
+ require('../../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
76
+ require('../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
77
+ require('../../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
78
+ require('../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
79
+ require('../../../../components/Popper/Popper/Popper.cjs');
80
+ require('../../../../components/Popper/PopperContext/PopperContext.cjs');
81
+ require('react-focus-lock');
82
+ require('qrcode');
83
+ require('formik');
84
+ require('../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
85
+ require('../../../../context/WalletGroupContext/WalletGroupContext.cjs');
86
+ require('../../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
87
+ require('../../../../context/SocialRedirectContext/SocialRedirectContext.cjs');
88
+ require('../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
89
+ require('../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
90
+ require('@hcaptcha/react-hcaptcha');
91
+ require('../../../../context/LoadingContext/LoadingContext.cjs');
92
+ require('../../context/DynamicWidgetContext.cjs');
93
+ require('../../helpers/convertExchangeKeyAndProviderEnum.cjs');
94
+ require('../../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.cjs');
95
+ require('../../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
96
+ require('../../../../context/FooterAnimationContext/index.cjs');
97
+ require('../../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.cjs');
98
+ require('../../../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.cjs');
99
+ require('../../../../context/PasskeyContext/PasskeyContext.cjs');
100
+ require('../../../../context/OnrampContext/OnrampContext.cjs');
101
+ require('../../../../store/state/sendBalances.cjs');
102
+ require('../../../../store/state/connectorsInitializing/connectorsInitializing.cjs');
103
+ require('../../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.cjs');
104
+ require('../DynamicWidgetHeader/DynamicWidgetHeader.cjs');
19
105
  var ChooseLinkedWalletView = require('../../views/ChooseLinkedWalletView/ChooseLinkedWalletView.cjs');
20
106
  var ChooseOnrampProviderView = require('../../views/ChooseOnrampProviderView/ChooseOnrampProviderView.cjs');
21
107
  var ChooseWalletFundingMethod = require('../../views/ChooseWalletFundingMethod/ChooseWalletFundingMethod.cjs');
22
108
  var ConfirmExchangeTransferView = require('../../views/ConfirmExchangeTransferView/ConfirmExchangeTransferView.cjs');
23
109
  var ConnectedAppsView = require('../../views/ConnectedAppsView/ConnectedAppsView.cjs');
110
+ var CryptoComOnramp = require('../../views/CryptoComOnramp/CryptoComOnramp.cjs');
24
111
  var DepositedExchangeView = require('../../views/DepositedExchangeView/DepositedExchangeView.cjs');
25
112
  var DepositView = require('../../views/DepositView/DepositView.cjs');
26
113
  var ExportAndRecoveryView = require('../../views/ExportAndRecoveryView/ExportAndRecoveryView.cjs');
@@ -31,6 +118,13 @@ var ManageTotpMfaWidgetView = require('../../views/ManageTotpMfaWidgetView/Manag
31
118
  var ReceiveWalletFunds = require('../../views/ReceiveWalletFunds/ReceiveWalletFunds.cjs');
32
119
  var RevokeAccessView = require('../../views/SessionManagementView/RevokeAccessView/RevokeAccessView.cjs');
33
120
  var SessionManagementInfoView = require('../../views/SessionManagementView/SessionManagementInfoView/SessionManagementInfoView.cjs');
121
+ require('../../../../views/TransactionConfirmationView/TransactionConfirmationView.cjs');
122
+ require('../../../../../index.cjs');
123
+ require('../../../../store/state/tokenBalances.cjs');
124
+ require('../../../../store/state/multichainBalances.cjs');
125
+ require('../../../../shared/utils/functions/getInitialUrl/getInitialUrl.cjs');
126
+ var WaasBackupInfoView = require('../../views/WaasBackupView/WaasBackupInfoView.cjs');
127
+ var WaasBackupView = require('../../views/WaasBackupView/WaasBackupView.cjs');
34
128
 
35
129
  const mapViewToComponent = {
36
130
  'account-and-security-settings': AccountAndSecuritySettingsView.AccountAndSecuritySettingsView,
@@ -9,14 +9,101 @@ import { SettingsView } from '../../views/SettingsView/SettingsView.js';
9
9
  import { AccountAndSecuritySettingsView } from '../../views/AccountAndSecuritySettingsView/AccountAndSecuritySettingsView.js';
10
10
  import { SessionManagementView } from '../../views/SessionManagementView/SessionManagementView.js';
11
11
  import { WalletsDelegatedSettingsView } from '../../views/WalletsDelegatedSettingsView/WalletsDelegatedSettingsView.js';
12
- import { WaasBackupView } from '../../views/WaasBackupView/WaasBackupView.js';
13
- import { WaasBackupInfoView } from '../../views/WaasBackupView/WaasBackupInfoView.js';
14
- import { CryptoComOnramp } from '../../views/CryptoComOnramp/CryptoComOnramp.js';
12
+ import 'react/jsx-runtime';
13
+ import 'react';
14
+ import '@dynamic-labs/iconic';
15
+ import '../../../../context/ViewContext/ViewContext.js';
16
+ import '../../../../../../_virtual/_tslib.js';
17
+ import 'react-i18next';
18
+ import '@dynamic-labs/sdk-api-core';
19
+ import '@dynamic-labs/wallet-connector-core';
20
+ import '../../../../shared/logger.js';
21
+ import '@dynamic-labs/wallet-book';
22
+ import '@dynamic-labs/utils';
23
+ import '../../../../utils/constants/colors.js';
24
+ import '../../../../utils/constants/values.js';
25
+ import '../../../../shared/consts/index.js';
26
+ import '../../../../components/IconButton/IconButton.js';
27
+ import '@dynamic-labs/types';
28
+ import '../../../../context/DynamicContext/DynamicContext.js';
29
+ import '../../../../store/state/loadingAndLifecycle/loadingAndLifecycle.js';
30
+ import '../../../../events/dynamicEvents.js';
31
+ import '../../../../context/CaptchaContext/CaptchaContext.js';
32
+ import '../../../../context/ErrorContext/ErrorContext.js';
33
+ import '@dynamic-labs/multi-wallet';
34
+ import 'react-international-phone';
35
+ import '../../../../store/state/nonce/nonce.js';
36
+ import '@dynamic-labs-sdk/client/core';
37
+ import '../../../../client/client.js';
38
+ import '@dynamic-labs-sdk/client';
39
+ import '../../../../config/ApiEndpoint.js';
40
+ import '@dynamic-labs/locale';
41
+ import '../../../../store/state/dynamicContextProps/dynamicContextProps.js';
42
+ import '../../../../store/state/primaryWalletId/primaryWalletId.js';
43
+ import '../../../../store/state/connectedWalletsInfo/connectedWalletsInfo.js';
44
+ import '../../../../context/AccessDeniedContext/AccessDeniedContext.js';
45
+ import '../../../../context/AccountExistsContext/AccountExistsContext.js';
46
+ import '../../../../context/UserWalletsContext/UserWalletsContext.js';
47
+ import '../../../../store/state/authMode/authMode.js';
48
+ import '../../../../context/VerificationContext/VerificationContext.js';
49
+ import 'react-dom';
50
+ import '../../../../utils/functions/compareChains/compareChains.js';
51
+ import '../../../../views/Passkey/utils/findPrimaryEmbeddedChain/findPrimaryEmbeddedChain.js';
52
+ import '../../../../context/ThemeContext/ThemeContext.js';
53
+ import '../../../../utils/hooks/useUserUpdateRequest/useUpdateUser/userFieldsSchema.js';
54
+ import 'bs58';
55
+ import 'yup';
56
+ import '../../../../context/MockContext/MockContext.js';
57
+ import '../../../../views/CollectUserDataView/useFields.js';
58
+ import '../../../../context/FieldsStateContext/FieldsStateContext.js';
59
+ import '../../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
60
+ import '@dynamic-labs/rpc-providers';
61
+ import '../../../../store/state/walletOptions/walletOptions.js';
62
+ import '../../../../components/Accordion/components/AccordionItem/AccordionItem.js';
63
+ import '../../../../components/Alert/Alert.js';
64
+ import '../../../../context/WalletContext/WalletContext.js';
65
+ import '../../../../components/ShadowDOM/ShadowDOM.js';
66
+ import '../../../../components/InlineWidget/InlineWidget.js';
67
+ import '../../../../components/Input/Input.js';
68
+ import '../../../../components/IsBrowser/IsBrowser.js';
69
+ import '../../../../components/MenuList/Dropdown/Dropdown.js';
70
+ import '../../../../components/OverlayCard/OverlayCard.js';
71
+ import '../../../../components/Transition/ZoomTransition/ZoomTransition.js';
72
+ import '../../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
73
+ import '../../../../components/Transition/OpacityTransition/OpacityTransition.js';
74
+ import '../../../../components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
75
+ import '../../../../components/Popper/Popper/Popper.js';
76
+ import '../../../../components/Popper/PopperContext/PopperContext.js';
77
+ import 'react-focus-lock';
78
+ import 'qrcode';
79
+ import 'formik';
80
+ import '../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
81
+ import '../../../../context/WalletGroupContext/WalletGroupContext.js';
82
+ import '../../../../context/IpConfigurationContext/IpConfigurationContext.js';
83
+ import '../../../../context/SocialRedirectContext/SocialRedirectContext.js';
84
+ import '../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
85
+ import '../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
86
+ import '@hcaptcha/react-hcaptcha';
87
+ import '../../../../context/LoadingContext/LoadingContext.js';
88
+ import '../../context/DynamicWidgetContext.js';
89
+ import '../../helpers/convertExchangeKeyAndProviderEnum.js';
90
+ import '../../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.js';
91
+ import '../../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
92
+ import '../../../../context/FooterAnimationContext/index.js';
93
+ import '../../../../utils/hooks/useEmbeddedWallet/useSecureEnclaveEmbeddedWallet/constants.js';
94
+ import '../../../../views/MfaChooseDeviceView/useGetMfaOptions/useGetMfaOptions.js';
95
+ import '../../../../context/PasskeyContext/PasskeyContext.js';
96
+ import '../../../../context/OnrampContext/OnrampContext.js';
97
+ import '../../../../store/state/sendBalances.js';
98
+ import '../../../../store/state/connectorsInitializing/connectorsInitializing.js';
99
+ import '../../../../components/OverlayCardBase/OverlayCardTarget/OverlayCardTarget.js';
100
+ import '../DynamicWidgetHeader/DynamicWidgetHeader.js';
15
101
  import { ChooseLinkedWalletView } from '../../views/ChooseLinkedWalletView/ChooseLinkedWalletView.js';
16
102
  import { ChooseOnrampProviderView } from '../../views/ChooseOnrampProviderView/ChooseOnrampProviderView.js';
17
103
  import { ChooseWalletFundingMethod } from '../../views/ChooseWalletFundingMethod/ChooseWalletFundingMethod.js';
18
104
  import { ConfirmExchangeTransferView } from '../../views/ConfirmExchangeTransferView/ConfirmExchangeTransferView.js';
19
105
  import { ConnectedAppsView } from '../../views/ConnectedAppsView/ConnectedAppsView.js';
106
+ import { CryptoComOnramp } from '../../views/CryptoComOnramp/CryptoComOnramp.js';
20
107
  import { DepositedExchangeView } from '../../views/DepositedExchangeView/DepositedExchangeView.js';
21
108
  import { DepositView } from '../../views/DepositView/DepositView.js';
22
109
  import { ExportAndRecoveryView } from '../../views/ExportAndRecoveryView/ExportAndRecoveryView.js';
@@ -27,6 +114,13 @@ import { ManageTotpMfaWidgetView } from '../../views/ManageTotpMfaWidgetView/Man
27
114
  import { ReceiveWalletFunds } from '../../views/ReceiveWalletFunds/ReceiveWalletFunds.js';
28
115
  import { RevokeAccessView } from '../../views/SessionManagementView/RevokeAccessView/RevokeAccessView.js';
29
116
  import { SessionManagementInfoView } from '../../views/SessionManagementView/SessionManagementInfoView/SessionManagementInfoView.js';
117
+ import '../../../../views/TransactionConfirmationView/TransactionConfirmationView.js';
118
+ import '../../../../../index.js';
119
+ import '../../../../store/state/tokenBalances.js';
120
+ import '../../../../store/state/multichainBalances.js';
121
+ import '../../../../shared/utils/functions/getInitialUrl/getInitialUrl.js';
122
+ import { WaasBackupInfoView } from '../../views/WaasBackupView/WaasBackupInfoView.js';
123
+ import { WaasBackupView } from '../../views/WaasBackupView/WaasBackupView.js';
30
124
 
31
125
  const mapViewToComponent = {
32
126
  'account-and-security-settings': AccountAndSecuritySettingsView,
@@ -9,6 +9,7 @@ var React = require('react');
9
9
  var reactI18next = require('react-i18next');
10
10
  var sdkApiCore = require('@dynamic-labs/sdk-api-core');
11
11
  var walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
12
+ var Badge = require('../../../../../components/Badge/Badge.cjs');
12
13
  var Typography = require('../../../../../components/Typography/Typography.cjs');
13
14
  var TypographyButton = require('../../../../../components/TypographyButton/TypographyButton.cjs');
14
15
  require('../../../../../context/DynamicContext/DynamicContext.cjs');
@@ -17,7 +18,7 @@ require('@dynamic-labs/iconic');
17
18
  var chevronLeft = require('../../../../../shared/assets/chevron-left.cjs');
18
19
  var exportPrivateKey = require('../../../../../shared/assets/export-private-key.cjs');
19
20
  var exportRecoveryPhrase = require('../../../../../shared/assets/export-recovery-phrase.cjs');
20
- require('../../../../../context/ViewContext/ViewContext.cjs');
21
+ var ViewContext = require('../../../../../context/ViewContext/ViewContext.cjs');
21
22
  var backupArrow = require('../../../../../shared/assets/backupArrow.cjs');
22
23
  require('../../../../../shared/logger.cjs');
23
24
  require('@dynamic-labs/wallet-book');
@@ -84,11 +85,12 @@ require('qrcode');
84
85
  require('formik');
85
86
  require('../../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.cjs');
86
87
  require('../../../../../context/WalletGroupContext/WalletGroupContext.cjs');
88
+ var useWalletBackup = require('../../../../../utils/hooks/useWalletBackup/useWalletBackup.cjs');
87
89
  require('../../../../../context/IpConfigurationContext/IpConfigurationContext.cjs');
88
90
  require('../../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.cjs');
89
91
  require('../../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.cjs');
90
92
  require('@hcaptcha/react-hcaptcha');
91
- var DynamicWidgetContext = require('../../../context/DynamicWidgetContext.cjs');
93
+ require('../../../context/DynamicWidgetContext.cjs');
92
94
  require('../../../helpers/convertExchangeKeyAndProviderEnum.cjs');
93
95
  require('../../../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.cjs');
94
96
  require('../../../../../context/ErrorContext/hooks/useErrorText/useErrorText.cjs');
@@ -115,8 +117,8 @@ const EmbeddedWalletExportSection = () => {
115
117
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
116
118
  const { t } = reactI18next.useTranslation();
117
119
  const { theme } = ThemeContext.useThemeContext();
118
- const { primaryWallet, user, projectSettings } = useInternalDynamicContext.useInternalDynamicContext();
119
- const { setDynamicWidgetView } = DynamicWidgetContext.useWidgetContext();
120
+ const { primaryWallet, user, projectSettings, setShowAuthFlow } = useInternalDynamicContext.useInternalDynamicContext();
121
+ const { pushView } = ViewContext.useViewContext();
120
122
  const { getEOAWallet } = useSmartWallets.useSmartWallets();
121
123
  const { initPasskeyRecoveryProcess, shouldInitRecovery } = usePasskeyRecovery.usePasskeyRecovery();
122
124
  const { initExportProcess } = useEmbeddedReveal.useEmbeddedReveal();
@@ -147,20 +149,20 @@ const EmbeddedWalletExportSection = () => {
147
149
  isSessionKeyCompatible,
148
150
  ]);
149
151
  const handleExportButtonClick = React.useCallback(() => {
150
- if (isV3WaasWallet) {
151
- setDynamicWidgetView('export-and-recovery');
152
- }
153
- else {
154
- handleExportClick();
155
- }
156
- }, [handleExportClick, isV3WaasWallet, setDynamicWidgetView]);
152
+ handleExportClick();
153
+ }, [handleExportClick]);
157
154
  const handleExportWithPhraseClick = React.useCallback(() => handleExportClick(true), [handleExportClick]);
158
155
  const exportIconClasses = React.useMemo(() => `settings-view__body__section__button__icon${theme.theme.name === 'dark' ? '__stroke' : ''}`, [theme.theme.name]);
159
156
  const isGoogleDriveBackupEnabled = Boolean((_l = (_k = (_j = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _j === void 0 ? void 0 : _j.waas) === null || _k === void 0 ? void 0 : _k.backupOptions) === null || _l === void 0 ? void 0 : _l.includes(sdkApiCore.WaasBackupOptionsEnum.GoogleDrive));
160
157
  const shouldShowBackupOption = isV3WaasWallet && isGoogleDriveBackupEnabled;
158
+ const { areAllWalletsBackedUp } = useWalletBackup.useWalletBackup();
161
159
  const handleBackupClick = React.useCallback(() => {
162
- setDynamicWidgetView('waas-backup');
163
- }, [setDynamicWidgetView]);
160
+ setShowAuthFlow(true, {
161
+ ignoreIfIsEmbeddedWidget: false,
162
+ performMultiWalletChecks: false,
163
+ });
164
+ pushView(areAllWalletsBackedUp ? 'waas-backup-download-view' : 'waas-backup-view');
165
+ }, [setShowAuthFlow, pushView, areAllWalletsBackedUp]);
164
166
  const exportButtonStartSlot = React.useMemo(() => (jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(exportPrivateKey.ReactComponent, { className: exportIconClasses }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: isV3WaasWallet
165
167
  ? 'dyn_settings.export_section.export_button'
166
168
  : 'dyn_settings.export_section.private_key_button', children: isV3WaasWallet
@@ -172,7 +174,7 @@ const EmbeddedWalletExportSection = () => {
172
174
  }
173
175
  return (jsxRuntime.jsxs("div", { className: 'settings-view__body__section', children: [jsxRuntime.jsx("div", { className: 'settings-view__body__section__title', children: jsxRuntime.jsx(Typography.Typography, { copykey: 'dyn_settings.export_section.title', color: 'secondary', weight: 'medium', children: t('dyn_settings.export_section.title') }) }), jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'embedded-reveal-account-button', onClick: handleExportButtonClick, buttonClassName: 'settings-view__body__section__button', startSlot: exportButtonStartSlot, endSlot: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false }), isTurnkeyHDWallet && !isV3WaasWallet && (jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'embedded-reveal-button', onClick: handleExportWithPhraseClick, buttonClassName: 'settings-view__body__section__button', startSlot: recoveryPhraseButtonStartSlot, endSlot: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false })), shouldShowBackupOption && (jsxRuntime.jsx(TypographyButton.TypographyButton, { dataTestId: 'backup-button', onClick: handleBackupClick, buttonClassName: 'settings-view__body__section__button', startSlot:
174
176
  // eslint-disable-next-line react/jsx-wrap-multilines
175
- jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(backupArrow.ReactComponent, { className: exportIconClasses }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.export_section.backup_button', children: t('dyn_settings.export_section.backup_button') })] }), endSlot: jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false }))] }));
177
+ jsxRuntime.jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsxRuntime.jsx(backupArrow.ReactComponent, { className: exportIconClasses }), jsxRuntime.jsx(Typography.Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.export_section.backup_button', children: t('dyn_settings.export_section.backup_button') })] }), endSlot: areAllWalletsBackedUp ? (jsxRuntime.jsx(Badge.Badge, { variant: 'primary', text: t('dyn_waas.backup.backed_up'), copykey: 'dyn_waas.backup.backed_up' })) : (jsxRuntime.jsx(chevronLeft.ReactComponent, { className: 'settings-view__body__section__button__icon-secondary--rotate' })), showInternalLoading: false }))] }));
176
178
  };
177
179
 
178
180
  exports.EmbeddedWalletExportSection = EmbeddedWalletExportSection;
@@ -5,6 +5,7 @@ import { useCallback, useMemo } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
6
6
  import { WaasBackupOptionsEnum } from '@dynamic-labs/sdk-api-core';
7
7
  import { isSessionKeyCompatibleWallet } from '@dynamic-labs/wallet-connector-core';
8
+ import { Badge } from '../../../../../components/Badge/Badge.js';
8
9
  import { Typography } from '../../../../../components/Typography/Typography.js';
9
10
  import { TypographyButton } from '../../../../../components/TypographyButton/TypographyButton.js';
10
11
  import '../../../../../context/DynamicContext/DynamicContext.js';
@@ -13,7 +14,7 @@ import '@dynamic-labs/iconic';
13
14
  import { ReactComponent as SvgChevronLeft } from '../../../../../shared/assets/chevron-left.js';
14
15
  import { ReactComponent as SvgExportPrivateKey } from '../../../../../shared/assets/export-private-key.js';
15
16
  import { ReactComponent as SvgExportRecoveryPhrase } from '../../../../../shared/assets/export-recovery-phrase.js';
16
- import '../../../../../context/ViewContext/ViewContext.js';
17
+ import { useViewContext } from '../../../../../context/ViewContext/ViewContext.js';
17
18
  import { ReactComponent as SvgBackupArrow } from '../../../../../shared/assets/backupArrow.js';
18
19
  import '../../../../../shared/logger.js';
19
20
  import '@dynamic-labs/wallet-book';
@@ -80,11 +81,12 @@ import 'qrcode';
80
81
  import 'formik';
81
82
  import '../../../../../utils/hooks/useSubdomainCheck/useSubdomainCheck.js';
82
83
  import '../../../../../context/WalletGroupContext/WalletGroupContext.js';
84
+ import { useWalletBackup } from '../../../../../utils/hooks/useWalletBackup/useWalletBackup.js';
83
85
  import '../../../../../context/IpConfigurationContext/IpConfigurationContext.js';
84
86
  import '../../../../../context/ConnectWithOtpContext/ConnectWithOtpContext.js';
85
87
  import '../../../../DynamicBridgeWidget/views/WalletsView/components/SecondaryWallets/SecondaryWallets.js';
86
88
  import '@hcaptcha/react-hcaptcha';
87
- import { useWidgetContext } from '../../../context/DynamicWidgetContext.js';
89
+ import '../../../context/DynamicWidgetContext.js';
88
90
  import '../../../helpers/convertExchangeKeyAndProviderEnum.js';
89
91
  import '../../../../../views/ExchangeWhitelistWarning/ExchangeWhitelistWarning.js';
90
92
  import '../../../../../context/ErrorContext/hooks/useErrorText/useErrorText.js';
@@ -111,8 +113,8 @@ const EmbeddedWalletExportSection = () => {
111
113
  var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l;
112
114
  const { t } = useTranslation();
113
115
  const { theme } = useThemeContext();
114
- const { primaryWallet, user, projectSettings } = useInternalDynamicContext();
115
- const { setDynamicWidgetView } = useWidgetContext();
116
+ const { primaryWallet, user, projectSettings, setShowAuthFlow } = useInternalDynamicContext();
117
+ const { pushView } = useViewContext();
116
118
  const { getEOAWallet } = useSmartWallets();
117
119
  const { initPasskeyRecoveryProcess, shouldInitRecovery } = usePasskeyRecovery();
118
120
  const { initExportProcess } = useEmbeddedReveal();
@@ -143,20 +145,20 @@ const EmbeddedWalletExportSection = () => {
143
145
  isSessionKeyCompatible,
144
146
  ]);
145
147
  const handleExportButtonClick = useCallback(() => {
146
- if (isV3WaasWallet) {
147
- setDynamicWidgetView('export-and-recovery');
148
- }
149
- else {
150
- handleExportClick();
151
- }
152
- }, [handleExportClick, isV3WaasWallet, setDynamicWidgetView]);
148
+ handleExportClick();
149
+ }, [handleExportClick]);
153
150
  const handleExportWithPhraseClick = useCallback(() => handleExportClick(true), [handleExportClick]);
154
151
  const exportIconClasses = useMemo(() => `settings-view__body__section__button__icon${theme.theme.name === 'dark' ? '__stroke' : ''}`, [theme.theme.name]);
155
152
  const isGoogleDriveBackupEnabled = Boolean((_l = (_k = (_j = projectSettings === null || projectSettings === void 0 ? void 0 : projectSettings.sdk) === null || _j === void 0 ? void 0 : _j.waas) === null || _k === void 0 ? void 0 : _k.backupOptions) === null || _l === void 0 ? void 0 : _l.includes(WaasBackupOptionsEnum.GoogleDrive));
156
153
  const shouldShowBackupOption = isV3WaasWallet && isGoogleDriveBackupEnabled;
154
+ const { areAllWalletsBackedUp } = useWalletBackup();
157
155
  const handleBackupClick = useCallback(() => {
158
- setDynamicWidgetView('waas-backup');
159
- }, [setDynamicWidgetView]);
156
+ setShowAuthFlow(true, {
157
+ ignoreIfIsEmbeddedWidget: false,
158
+ performMultiWalletChecks: false,
159
+ });
160
+ pushView(areAllWalletsBackedUp ? 'waas-backup-download-view' : 'waas-backup-view');
161
+ }, [setShowAuthFlow, pushView, areAllWalletsBackedUp]);
160
162
  const exportButtonStartSlot = useMemo(() => (jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgExportPrivateKey, { className: exportIconClasses }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: isV3WaasWallet
161
163
  ? 'dyn_settings.export_section.export_button'
162
164
  : 'dyn_settings.export_section.private_key_button', children: isV3WaasWallet
@@ -168,7 +170,7 @@ const EmbeddedWalletExportSection = () => {
168
170
  }
169
171
  return (jsxs("div", { className: 'settings-view__body__section', children: [jsx("div", { className: 'settings-view__body__section__title', children: jsx(Typography, { copykey: 'dyn_settings.export_section.title', color: 'secondary', weight: 'medium', children: t('dyn_settings.export_section.title') }) }), jsx(TypographyButton, { dataTestId: 'embedded-reveal-account-button', onClick: handleExportButtonClick, buttonClassName: 'settings-view__body__section__button', startSlot: exportButtonStartSlot, endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false }), isTurnkeyHDWallet && !isV3WaasWallet && (jsx(TypographyButton, { dataTestId: 'embedded-reveal-button', onClick: handleExportWithPhraseClick, buttonClassName: 'settings-view__body__section__button', startSlot: recoveryPhraseButtonStartSlot, endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false })), shouldShowBackupOption && (jsx(TypographyButton, { dataTestId: 'backup-button', onClick: handleBackupClick, buttonClassName: 'settings-view__body__section__button', startSlot:
170
172
  // eslint-disable-next-line react/jsx-wrap-multilines
171
- jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgBackupArrow, { className: exportIconClasses }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.export_section.backup_button', children: t('dyn_settings.export_section.backup_button') })] }), endSlot: jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' }), showInternalLoading: false }))] }));
173
+ jsxs("div", { className: 'settings-view__body__section__button__start-slot', children: [jsx(SvgBackupArrow, { className: exportIconClasses }), jsx(Typography, { color: 'primary', weight: 'medium', copykey: 'dyn_settings.export_section.backup_button', children: t('dyn_settings.export_section.backup_button') })] }), endSlot: areAllWalletsBackedUp ? (jsx(Badge, { variant: 'primary', text: t('dyn_waas.backup.backed_up'), copykey: 'dyn_waas.backup.backed_up' })) : (jsx(SvgChevronLeft, { className: 'settings-view__body__section__button__icon-secondary--rotate' })), showInternalLoading: false }))] }));
172
174
  };
173
175
 
174
176
  export { EmbeddedWalletExportSection };
@@ -162,7 +162,7 @@ const isCryptoComUrl = (url) => {
162
162
  return false;
163
163
  }
164
164
  };
165
- const CryptoComOnramp = ({ onBack, hideBackButton = false, onPaymentCreated, quickSuggestions = defaultQuickSuggestions, currency: initialCurrency, }) => {
165
+ const CryptoComOnramp = ({ onBack, hideBackButton = false, onPaymentCreated, quickSuggestions = defaultQuickSuggestions, currency: initialCurrency, merchantName, }) => {
166
166
  var _a, _b, _c, _d;
167
167
  const { t } = reactI18next.useTranslation();
168
168
  const { primaryWallet, setShowAuthFlow, setShowDynamicUserProfile, network } = useInternalDynamicContext.useInternalDynamicContext();
@@ -239,6 +239,7 @@ const CryptoComOnramp = ({ onBack, hideBackButton = false, onPaymentCreated, qui
239
239
  currency: selectedCurrency,
240
240
  environmentId,
241
241
  includeDisabled: true,
242
+ merchantName,
242
243
  networkId: selectedNetworkId ? String(selectedNetworkId) : undefined,
243
244
  tokenAmount: parseFloat(fiatAmount),
244
245
  walletAddress: primaryWallet.address,
@@ -271,6 +272,7 @@ const CryptoComOnramp = ({ onBack, hideBackButton = false, onPaymentCreated, qui
271
272
  environmentId,
272
273
  selectedNetworkId,
273
274
  onPaymentCreated,
275
+ merchantName,
274
276
  ]);
275
277
  const disableSubmit = !fiatAmount || parseFloat(fiatAmount) <= 0 || isCreatingPayment;
276
278
  const { backButton, closeButton } = createFundingButtons.createFundingButtons({
@@ -5,5 +5,6 @@ export interface CryptoComOnrampProps {
5
5
  onPaymentCreated?: (paymentUrl: string) => void;
6
6
  quickSuggestions?: number[];
7
7
  currency?: string;
8
+ merchantName?: string;
8
9
  }
9
10
  export declare const CryptoComOnramp: FC<CryptoComOnrampProps>;
@@ -158,7 +158,7 @@ const isCryptoComUrl = (url) => {
158
158
  return false;
159
159
  }
160
160
  };
161
- const CryptoComOnramp = ({ onBack, hideBackButton = false, onPaymentCreated, quickSuggestions = defaultQuickSuggestions, currency: initialCurrency, }) => {
161
+ const CryptoComOnramp = ({ onBack, hideBackButton = false, onPaymentCreated, quickSuggestions = defaultQuickSuggestions, currency: initialCurrency, merchantName, }) => {
162
162
  var _a, _b, _c, _d;
163
163
  const { t } = useTranslation();
164
164
  const { primaryWallet, setShowAuthFlow, setShowDynamicUserProfile, network } = useInternalDynamicContext();
@@ -235,6 +235,7 @@ const CryptoComOnramp = ({ onBack, hideBackButton = false, onPaymentCreated, qui
235
235
  currency: selectedCurrency,
236
236
  environmentId,
237
237
  includeDisabled: true,
238
+ merchantName,
238
239
  networkId: selectedNetworkId ? String(selectedNetworkId) : undefined,
239
240
  tokenAmount: parseFloat(fiatAmount),
240
241
  walletAddress: primaryWallet.address,
@@ -267,6 +268,7 @@ const CryptoComOnramp = ({ onBack, hideBackButton = false, onPaymentCreated, qui
267
268
  environmentId,
268
269
  selectedNetworkId,
269
270
  onPaymentCreated,
271
+ merchantName,
270
272
  ]);
271
273
  const disableSubmit = !fiatAmount || parseFloat(fiatAmount) <= 0 || isCreatingPayment;
272
274
  const { backButton, closeButton } = createFundingButtons({
@@ -0,0 +1,37 @@
1
+ 'use client'
2
+ 'use strict';
3
+
4
+ Object.defineProperty(exports, '__esModule', { value: true });
5
+
6
+ var jsxRuntime = require('react/jsx-runtime');
7
+ require('react');
8
+ var check = require('../../../../shared/assets/check.cjs');
9
+ require('@dynamic-labs/iconic');
10
+ require('../../../../context/ViewContext/ViewContext.cjs');
11
+
12
+ const STEPS = ['Cloud Backup', 'Download'];
13
+ const BackupStepper = ({ currentStep, completedSteps, }) => {
14
+ const getStepClassName = (index) => {
15
+ const classes = ['waas-backup-view__step'];
16
+ if (index < completedSteps) {
17
+ classes.push('waas-backup-view__step--completed');
18
+ }
19
+ else if (index === currentStep) {
20
+ classes.push('waas-backup-view__step--current');
21
+ }
22
+ else {
23
+ classes.push('waas-backup-view__step--upcoming');
24
+ }
25
+ return classes.join(' ');
26
+ };
27
+ const getSeparatorClassName = () => {
28
+ const classes = ['waas-backup-view__step-separator'];
29
+ if (completedSteps >= 1) {
30
+ classes.push('waas-backup-view__step-separator--solid');
31
+ }
32
+ return classes.join(' ');
33
+ };
34
+ return (jsxRuntime.jsx("div", { className: 'waas-backup-view__stepper', children: STEPS.map((step, index) => (jsxRuntime.jsxs("div", { className: 'waas-backup-view__step-container', children: [jsxRuntime.jsx("div", { className: getStepClassName(index), children: jsxRuntime.jsx("div", { className: 'waas-backup-view__step-indicator', children: index < completedSteps ? (jsxRuntime.jsx(check.ReactComponent, { className: 'waas-backup-view__step-check' })) : (jsxRuntime.jsx("div", { className: 'waas-backup-view__step-number', children: index + 1 })) }) }), index < STEPS.length - 1 && (jsxRuntime.jsx("div", { className: getSeparatorClassName() }))] }, step))) }));
35
+ };
36
+
37
+ exports.BackupStepper = BackupStepper;
@@ -0,0 +1,7 @@
1
+ import { FC } from 'react';
2
+ interface BackupStepperProps {
3
+ currentStep: 0 | 1;
4
+ completedSteps: 0 | 1 | 2;
5
+ }
6
+ export declare const BackupStepper: FC<BackupStepperProps>;
7
+ export {};