@dynamic-labs/sdk-react-core 1.0.0-alpha.7 → 1.0.0-alpha.8

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 (93) hide show
  1. package/CHANGELOG.md +12 -0
  2. package/package.cjs +1 -1
  3. package/package.js +1 -1
  4. package/package.json +9 -9
  5. package/src/lib/components/NeedHelpSection/NeedHelpSection.cjs +1 -1
  6. package/src/lib/components/NeedHelpSection/NeedHelpSection.js +1 -1
  7. package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs +68 -0
  8. package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.d.ts +6 -0
  9. package/src/lib/components/PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js +64 -0
  10. package/src/lib/components/PasskeyCreatedSuccessBanner/index.d.ts +1 -0
  11. package/src/lib/components/SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.cjs +24 -0
  12. package/src/lib/components/SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.d.ts +6 -0
  13. package/src/lib/components/SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.js +20 -0
  14. package/src/lib/components/SecureTurnkeyWalletCard/index.d.ts +1 -0
  15. package/src/lib/components/SendBalanceForm/SendBalanceForm.cjs +4 -1
  16. package/src/lib/components/SendBalanceForm/SendBalanceForm.js +4 -1
  17. package/src/lib/components/SyncPasskeyFlow/SyncPasskeyFlow.cjs +5 -2
  18. package/src/lib/components/SyncPasskeyFlow/SyncPasskeyFlow.js +5 -2
  19. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.cjs +6 -2
  20. package/src/lib/components/TransactionConfirmationPageLayout/TransactionConfirmationPageLayout.js +6 -2
  21. package/src/lib/components/index.d.ts +2 -0
  22. package/src/lib/context/DynamicContext/DynamicContext.cjs +7 -1
  23. package/src/lib/context/DynamicContext/DynamicContext.js +7 -1
  24. package/src/lib/context/DynamicContext/hooks/index.d.ts +1 -0
  25. package/src/lib/context/DynamicContext/hooks/useShowPasskeyCreateSuccess/index.d.ts +1 -0
  26. package/src/lib/context/DynamicContext/hooks/useShowPasskeyCreateSuccess/useShowPasskeyCreateSuccess.cjs +23 -0
  27. package/src/lib/context/DynamicContext/hooks/useShowPasskeyCreateSuccess/useShowPasskeyCreateSuccess.d.ts +4 -0
  28. package/src/lib/context/DynamicContext/hooks/useShowPasskeyCreateSuccess/useShowPasskeyCreateSuccess.js +19 -0
  29. package/src/lib/context/DynamicContext/types/index.d.ts +2 -0
  30. package/src/lib/data/api.cjs +14 -11
  31. package/src/lib/data/api.d.ts +2 -2
  32. package/src/lib/data/api.js +14 -11
  33. package/src/lib/locale/en/translation.cjs +70 -0
  34. package/src/lib/locale/en/translation.d.ts +70 -0
  35. package/src/lib/locale/en/translation.js +70 -0
  36. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.cjs +6 -2
  37. package/src/lib/modals/SignMessageConfirmationModal/SignMessageConfirmationModal.js +6 -2
  38. package/src/lib/styles/index.shadow.cjs +1 -1
  39. package/src/lib/styles/index.shadow.js +1 -1
  40. package/src/lib/utils/hooks/index.d.ts +1 -0
  41. package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/index.d.ts +1 -0
  42. package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.cjs +83 -0
  43. package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.d.ts +15 -0
  44. package/src/lib/utils/hooks/useCreateDynamicEmbeddedWalletMutation/useCreateDynamicEmbeddedWalletMutation.js +79 -0
  45. package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.cjs +11 -3
  46. package/src/lib/utils/hooks/useDynamicLayoutData/useDynamicLayoutData.js +11 -3
  47. package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs +57 -33
  48. package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.d.ts +1 -1
  49. package/src/lib/utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js +57 -33
  50. package/src/lib/utils/hooks/useIsTurnkeyWallet/index.d.ts +1 -0
  51. package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs +37 -0
  52. package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.d.ts +6 -0
  53. package/src/lib/utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js +33 -0
  54. package/src/lib/views/AccountExistsView/AccountExistsView.cjs +1 -1
  55. package/src/lib/views/AccountExistsView/AccountExistsView.js +1 -1
  56. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.cjs +1 -1
  57. package/src/lib/views/EmailWalletOTPVerificationView/EmailWalletOTPVerificationView.js +1 -1
  58. package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.cjs +1 -1
  59. package/src/lib/views/LoginView/sections/SocialSignInSection/MagicSocialSignIn/MagicSocialSignIn.js +1 -1
  60. package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.cjs +2 -5
  61. package/src/lib/views/LoginView/sections/SocialSignInSection/SocialSignInSection.js +2 -5
  62. package/src/lib/views/LoginView/useLoginView.cjs +101 -84
  63. package/src/lib/views/LoginView/useLoginView.js +102 -85
  64. package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.cjs +20 -50
  65. package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.d.ts +1 -6
  66. package/src/lib/views/Passkey/PasskeyIntroView/PasskeyIntroView.js +20 -50
  67. package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.cjs +7 -2
  68. package/src/lib/views/Passkey/PasskeyRecovery/BundleValidation/PasskeyBundleRecovery.js +7 -2
  69. package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.cjs +11 -7
  70. package/src/lib/views/Passkey/PasskeyRecovery/CompleteRecovery/PasskeyCompleteRecovery.js +11 -7
  71. package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.cjs +8 -10
  72. package/src/lib/views/Passkey/PasskeyRecovery/InitRecovery/PasskeyInitRecovery.js +8 -10
  73. package/src/lib/views/Passkey/utils/createPregeneratedWallet/createPregeneratedWallet.cjs +56 -0
  74. package/src/lib/views/Passkey/utils/createPregeneratedWallet/createPregeneratedWallet.d.ts +13 -0
  75. package/src/lib/views/Passkey/utils/createPregeneratedWallet/createPregeneratedWallet.js +52 -0
  76. package/src/lib/views/Passkey/utils/createPregeneratedWallet/index.d.ts +1 -0
  77. package/src/lib/views/Passkey/utils/index.d.ts +1 -0
  78. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.cjs +1 -1
  79. package/src/lib/views/TransactionConfirmationView/TransactionConfirmationView.js +1 -1
  80. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.cjs +4 -1
  81. package/src/lib/widgets/DynamicWidget/components/ActiveWalletInformation/ActiveWalletInformation.js +4 -1
  82. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs +2 -1
  83. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js +2 -1
  84. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +8 -5
  85. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +8 -5
  86. package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.cjs +1 -1
  87. package/src/lib/widgets/DynamicWidget/components/EmailOTPConnectorPendingSignModalContent/EmailOTPConnectorPendingSignModalContent.js +1 -1
  88. package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.cjs +11 -2
  89. package/src/lib/widgets/DynamicWidget/components/EmptyWallets/EmptyWallets.js +11 -2
  90. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.cjs +2 -1
  91. package/src/lib/widgets/DynamicWidget/views/ManagePasskeysWidgetView/ManagePasskeysWidgetView.js +2 -1
  92. package/src/lib/utils/functions/getEnabledProviders/index.cjs +0 -7
  93. package/src/lib/utils/functions/getEnabledProviders/index.js +0 -3
package/CHANGELOG.md CHANGED
@@ -1,4 +1,16 @@
1
1
 
2
+ ## [1.0.0-alpha.8](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.7...v1.0.0-alpha.8) (2023-12-05)
3
+
4
+
5
+ ### ⚠ BREAKING CHANGES
6
+
7
+ * rename EthereumSmartWalletConnectors to ZeroDevSmartWalletConnectors (#4067)
8
+
9
+
10
+ ### Features
11
+
12
+ * add support for pregenerated wallets + securing them ([#3968](https://github.com/dynamic-labs/DynamicAuth/issues/3968)) ([8212b76](https://github.com/dynamic-labs/DynamicAuth/commit/8212b760ba199bd989e0ba2ad3caf97590db4861))
13
+
2
14
  ## [1.0.0-alpha.7](https://github.com/dynamic-labs/DynamicAuth/compare/v1.0.0-alpha.6...v1.0.0-alpha.7) (2023-12-05)
3
15
 
4
16
 
package/package.cjs CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
- var version = "1.0.0-alpha.7";
5
+ var version = "1.0.0-alpha.8";
6
6
  var dependencies = {
7
7
  "@dynamic-labs/iconic": "0.1.44",
8
8
  "@dynamic-labs/sdk-api": "0.0.315",
package/package.js CHANGED
@@ -1,4 +1,4 @@
1
- var version = "1.0.0-alpha.7";
1
+ var version = "1.0.0-alpha.8";
2
2
  var dependencies = {
3
3
  "@dynamic-labs/iconic": "0.1.44",
4
4
  "@dynamic-labs/sdk-api": "0.0.315",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "1.0.0-alpha.7",
3
+ "version": "1.0.0-alpha.8",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "https://github.com/dynamic-labs/DynamicAuth.git",
@@ -17,14 +17,14 @@
17
17
  "react-focus-lock": "2.9.2",
18
18
  "react-i18next": "^13.2.0",
19
19
  "yup": "0.32.11",
20
- "@dynamic-labs/ethereum": "1.0.0-alpha.7",
21
- "@dynamic-labs/logger": "1.0.0-alpha.7",
22
- "@dynamic-labs/multi-wallet": "1.0.0-alpha.7",
23
- "@dynamic-labs/rpc-providers": "1.0.0-alpha.7",
24
- "@dynamic-labs/types": "1.0.0-alpha.7",
25
- "@dynamic-labs/utils": "1.0.0-alpha.7",
26
- "@dynamic-labs/wallet-book": "1.0.0-alpha.7",
27
- "@dynamic-labs/wallet-connector-core": "1.0.0-alpha.7",
20
+ "@dynamic-labs/ethereum": "1.0.0-alpha.8",
21
+ "@dynamic-labs/logger": "1.0.0-alpha.8",
22
+ "@dynamic-labs/multi-wallet": "1.0.0-alpha.8",
23
+ "@dynamic-labs/rpc-providers": "1.0.0-alpha.8",
24
+ "@dynamic-labs/types": "1.0.0-alpha.8",
25
+ "@dynamic-labs/utils": "1.0.0-alpha.8",
26
+ "@dynamic-labs/wallet-book": "1.0.0-alpha.8",
27
+ "@dynamic-labs/wallet-connector-core": "1.0.0-alpha.8",
28
28
  "eventemitter3": "5.0.1"
29
29
  },
30
30
  "devDependencies": {
@@ -42,6 +42,7 @@ require('../Popper/PopperContext/PopperContext.cjs');
42
42
  require('react-focus-lock');
43
43
  require('formik');
44
44
  require('yup');
45
+ var usePasskeyRecovery = require('../../utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs');
45
46
  require('../OverlayCard/OverlayCard.context.cjs');
46
47
  require('../../context/FooterAnimationContext/index.cjs');
47
48
  require('../../context/MockContext/MockContext.cjs');
@@ -58,7 +59,6 @@ require('../UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/Veri
58
59
  require('@dynamic-labs/types');
59
60
  require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
60
61
  require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
61
- var usePasskeyRecovery = require('../../utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs');
62
62
  require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
63
63
 
64
64
  const NeedHelpSection = () => {
@@ -38,6 +38,7 @@ import '../Popper/PopperContext/PopperContext.js';
38
38
  import 'react-focus-lock';
39
39
  import 'formik';
40
40
  import 'yup';
41
+ import { usePasskeyRecovery } from '../../utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js';
41
42
  import '../OverlayCard/OverlayCard.context.js';
42
43
  import '../../context/FooterAnimationContext/index.js';
43
44
  import '../../context/MockContext/MockContext.js';
@@ -54,7 +55,6 @@ import '../UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/Verif
54
55
  import '@dynamic-labs/types';
55
56
  import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
56
57
  import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
57
- import { usePasskeyRecovery } from '../../utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js';
58
58
  import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
59
59
 
60
60
  const NeedHelpSection = () => {
@@ -0,0 +1,68 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var reactI18next = require('react-i18next');
7
+ var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
8
+ require('../Transition/ZoomTransition/ZoomTransition.cjs');
9
+ require('../Transition/SlideInUpTransition/SlideInUpTransition.cjs');
10
+ var OpacityTransition = require('../Transition/OpacityTransition/OpacityTransition.cjs');
11
+ require('react');
12
+ require('@dynamic-labs/utils');
13
+ require('@dynamic-labs/sdk-api');
14
+ require('../../config/ApiEndpoint.cjs');
15
+ require('../../shared/logger.cjs');
16
+ require('@dynamic-labs/iconic');
17
+ require('@dynamic-labs/wallet-connector-core');
18
+ require('../../context/ViewContext/ViewContext.cjs');
19
+ require('@dynamic-labs/wallet-book');
20
+ require('../../utils/constants/colors.cjs');
21
+ require('../../shared/utils/classes/storage/localStorage.cjs');
22
+ require('viem');
23
+ require('../../shared/consts/index.cjs');
24
+ require('@dynamic-labs/multi-wallet');
25
+ require('@dynamic-labs/rpc-providers');
26
+ require('../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.cjs');
27
+ require('../../context/AccessDeniedContext/AccessDeniedContext.cjs');
28
+ require('../../context/AccountExistsContext/AccountExistsContext.cjs');
29
+ require('../../context/ErrorContext/ErrorContext.cjs');
30
+ require('react-dom');
31
+ require('../Alert/Alert.cjs');
32
+ var AnimatePresence = require('../AnimatePresence/AnimatePresence.cjs');
33
+ require('../ShadowDOM/ShadowDOM.cjs');
34
+ var ErrorContainer = require('../ErrorContainer/ErrorContainer.cjs');
35
+ require('../IconButton/IconButton.cjs');
36
+ require('../../context/ThemeContext/ThemeContext.cjs');
37
+ require('../InlineWidget/InlineWidget.cjs');
38
+ require('../MenuList/Dropdown/Dropdown.cjs');
39
+ require('../Popper/Popper/Popper.cjs');
40
+ require('../Popper/PopperContext/PopperContext.cjs');
41
+ require('react-focus-lock');
42
+ require('formik');
43
+ require('yup');
44
+ require('../OverlayCard/OverlayCard.context.cjs');
45
+ require('../../context/FooterAnimationContext/index.cjs');
46
+ require('../../context/MockContext/MockContext.cjs');
47
+ require('../../context/QrCodeContext/QrCodeContext.cjs');
48
+ require('../../context/WalletGroupContext/WalletGroupContext.cjs');
49
+ require('../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.cjs');
50
+ require('../../context/CaptchaContext/CaptchaContext.cjs');
51
+ require('../../context/EmailVerificationContext/EmailVerificationContext.cjs');
52
+ require('qrcode');
53
+ require('../../context/LoadingContext/LoadingContext.cjs');
54
+ require('i18next');
55
+ require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
56
+ require('../UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
57
+ require('@dynamic-labs/types');
58
+ require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
59
+ require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
60
+ require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
61
+
62
+ const PasskeyCreatedSuccessBanner = ({ className }) => {
63
+ const { showPasskeyCreatedSuccess } = useInternalDynamicContext.useInternalDynamicContext();
64
+ const { t } = reactI18next.useTranslation();
65
+ return (jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(OpacityTransition.OpacityTransition, {}), children: showPasskeyCreatedSuccess && (jsxRuntime.jsx(ErrorContainer.ErrorContainer, { variant: 'success', className: className, children: t('dyn_passkey_created_success.text') })) }));
66
+ };
67
+
68
+ exports.PasskeyCreatedSuccessBanner = PasskeyCreatedSuccessBanner;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ type Props = {
3
+ className?: string;
4
+ };
5
+ export declare const PasskeyCreatedSuccessBanner: ({ className }: Props) => JSX.Element;
6
+ export {};
@@ -0,0 +1,64 @@
1
+ import { jsx } from 'react/jsx-runtime';
2
+ import { useTranslation } from 'react-i18next';
3
+ import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
4
+ import '../Transition/ZoomTransition/ZoomTransition.js';
5
+ import '../Transition/SlideInUpTransition/SlideInUpTransition.js';
6
+ import { OpacityTransition } from '../Transition/OpacityTransition/OpacityTransition.js';
7
+ import 'react';
8
+ import '@dynamic-labs/utils';
9
+ import '@dynamic-labs/sdk-api';
10
+ import '../../config/ApiEndpoint.js';
11
+ import '../../shared/logger.js';
12
+ import '@dynamic-labs/iconic';
13
+ import '@dynamic-labs/wallet-connector-core';
14
+ import '../../context/ViewContext/ViewContext.js';
15
+ import '@dynamic-labs/wallet-book';
16
+ import '../../utils/constants/colors.js';
17
+ import '../../shared/utils/classes/storage/localStorage.js';
18
+ import 'viem';
19
+ import '../../shared/consts/index.js';
20
+ import '@dynamic-labs/multi-wallet';
21
+ import '@dynamic-labs/rpc-providers';
22
+ import '../../utils/hooks/useWallets/utils/verifyMagicIsSetup/verifyMagicIsSetup.js';
23
+ import '../../context/AccessDeniedContext/AccessDeniedContext.js';
24
+ import '../../context/AccountExistsContext/AccountExistsContext.js';
25
+ import '../../context/ErrorContext/ErrorContext.js';
26
+ import 'react-dom';
27
+ import '../Alert/Alert.js';
28
+ import { AnimatePresence } from '../AnimatePresence/AnimatePresence.js';
29
+ import '../ShadowDOM/ShadowDOM.js';
30
+ import { ErrorContainer } from '../ErrorContainer/ErrorContainer.js';
31
+ import '../IconButton/IconButton.js';
32
+ import '../../context/ThemeContext/ThemeContext.js';
33
+ import '../InlineWidget/InlineWidget.js';
34
+ import '../MenuList/Dropdown/Dropdown.js';
35
+ import '../Popper/Popper/Popper.js';
36
+ import '../Popper/PopperContext/PopperContext.js';
37
+ import 'react-focus-lock';
38
+ import 'formik';
39
+ import 'yup';
40
+ import '../OverlayCard/OverlayCard.context.js';
41
+ import '../../context/FooterAnimationContext/index.js';
42
+ import '../../context/MockContext/MockContext.js';
43
+ import '../../context/QrCodeContext/QrCodeContext.js';
44
+ import '../../context/WalletGroupContext/WalletGroupContext.js';
45
+ import '../../widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetHeader.js';
46
+ import '../../context/CaptchaContext/CaptchaContext.js';
47
+ import '../../context/EmailVerificationContext/EmailVerificationContext.js';
48
+ import 'qrcode';
49
+ import '../../context/LoadingContext/LoadingContext.js';
50
+ import 'i18next';
51
+ import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
52
+ import '../UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js';
53
+ import '@dynamic-labs/types';
54
+ import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
55
+ import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
56
+ import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
57
+
58
+ const PasskeyCreatedSuccessBanner = ({ className }) => {
59
+ const { showPasskeyCreatedSuccess } = useInternalDynamicContext();
60
+ const { t } = useTranslation();
61
+ return (jsx(AnimatePresence, { animationComponent: jsx(OpacityTransition, {}), children: showPasskeyCreatedSuccess && (jsx(ErrorContainer, { variant: 'success', className: className, children: t('dyn_passkey_created_success.text') })) }));
62
+ };
63
+
64
+ export { PasskeyCreatedSuccessBanner };
@@ -0,0 +1 @@
1
+ export { PasskeyCreatedSuccessBanner } from './PasskeyCreatedSuccessBanner';
@@ -0,0 +1,24 @@
1
+ 'use strict';
2
+
3
+ Object.defineProperty(exports, '__esModule', { value: true });
4
+
5
+ var jsxRuntime = require('react/jsx-runtime');
6
+ var reactI18next = require('react-i18next');
7
+ var classNames = require('../../utils/functions/classNames/classNames.cjs');
8
+ var useIsTurnkeyWallet = require('../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs');
9
+ var usePasskeyRecovery = require('../../utils/hooks/usePasskeyRecovery/usePasskeyRecovery.cjs');
10
+ var Button = require('../Button/Button.cjs');
11
+ var Typography = require('../Typography/Typography.cjs');
12
+
13
+ const SecureTurnkeyWalletCard = ({ className }) => {
14
+ const { t } = reactI18next.useTranslation();
15
+ const { isTurnkeyWalletWithoutAuthenticator } = useIsTurnkeyWallet.useIsTurnkeyWallet();
16
+ const { initPasskeyRecoveryProcess } = usePasskeyRecovery.usePasskeyRecovery();
17
+ if (!isTurnkeyWalletWithoutAuthenticator)
18
+ return null;
19
+ return (jsxRuntime.jsxs("div", { className: classNames.classNames('secure-turnkey-wallet-card', className), children: [jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'regular', className: 'secure-turnkey-wallet-card__text', children: t('dyn_secure_pregenerated_wallet.description') }), jsxRuntime.jsx(Button.Button, { onClick: initPasskeyRecoveryProcess, buttonVariant: 'brand-primary', color: 'primary', typographyProps: {
20
+ color: 'inherit',
21
+ }, showInternalLoading: false, children: t('dyn_secure_pregenerated_wallet.secure_button') })] }));
22
+ };
23
+
24
+ exports.SecureTurnkeyWalletCard = SecureTurnkeyWalletCard;
@@ -0,0 +1,6 @@
1
+ /// <reference types="react" />
2
+ type Props = {
3
+ className?: string;
4
+ };
5
+ export declare const SecureTurnkeyWalletCard: ({ className }: Props) => JSX.Element | null;
6
+ export {};
@@ -0,0 +1,20 @@
1
+ import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { useTranslation } from 'react-i18next';
3
+ import { classNames } from '../../utils/functions/classNames/classNames.js';
4
+ import { useIsTurnkeyWallet } from '../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js';
5
+ import { usePasskeyRecovery } from '../../utils/hooks/usePasskeyRecovery/usePasskeyRecovery.js';
6
+ import { Button } from '../Button/Button.js';
7
+ import { Typography } from '../Typography/Typography.js';
8
+
9
+ const SecureTurnkeyWalletCard = ({ className }) => {
10
+ const { t } = useTranslation();
11
+ const { isTurnkeyWalletWithoutAuthenticator } = useIsTurnkeyWallet();
12
+ const { initPasskeyRecoveryProcess } = usePasskeyRecovery();
13
+ if (!isTurnkeyWalletWithoutAuthenticator)
14
+ return null;
15
+ return (jsxs("div", { className: classNames('secure-turnkey-wallet-card', className), children: [jsx(Typography, { variant: 'body_small', weight: 'regular', className: 'secure-turnkey-wallet-card__text', children: t('dyn_secure_pregenerated_wallet.description') }), jsx(Button, { onClick: initPasskeyRecoveryProcess, buttonVariant: 'brand-primary', color: 'primary', typographyProps: {
16
+ color: 'inherit',
17
+ }, showInternalLoading: false, children: t('dyn_secure_pregenerated_wallet.secure_button') })] }));
18
+ };
19
+
20
+ export { SecureTurnkeyWalletCard };
@@ -0,0 +1 @@
1
+ export { SecureTurnkeyWalletCard } from './SecureTurnkeyWalletCard';
@@ -22,6 +22,8 @@ require('@dynamic-labs/utils');
22
22
  require('../../shared/consts/index.cjs');
23
23
  require('@dynamic-labs/multi-wallet');
24
24
  var getOrdinalNumber = require('../../utils/functions/getOrdinalNumber/getOrdinalNumber.cjs');
25
+ var useIsTurnkeyWallet = require('../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs');
26
+ var SecureTurnkeyWalletCard = require('../SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.cjs');
25
27
 
26
28
  const sendBalanceFormInitialValues = {
27
29
  amount: '',
@@ -49,6 +51,7 @@ const getDisplayErrorMessage = (errors, t, field, decimals) => {
49
51
  };
50
52
  const SendBalanceForm = ({ initialValues, onSubmit, balance, decimals = 18, }) => {
51
53
  const { t } = reactI18next.useTranslation();
54
+ const { isTurnkeyWalletWithoutAuthenticator } = useIsTurnkeyWallet.useIsTurnkeyWallet();
52
55
  const sendBalanceFormValidationSchema = React.useMemo(() => {
53
56
  const decimalsRegex = new RegExp(`^\\d*(\\.\\d{1,${decimals}})?$`);
54
57
  return yup.object().shape({
@@ -77,7 +80,7 @@ const SendBalanceForm = ({ initialValues, onSubmit, balance, decimals = 18, }) =
77
80
  }, [balance, decimals]);
78
81
  return (jsxRuntime.jsx(formik.Formik, { initialValues: initialValues || sendBalanceFormInitialValues, validationSchema: sendBalanceFormValidationSchema, onSubmit: (values) => onSubmit(values), validateOnChange: false, validateOnBlur: false, children: ({ errors, touched }) => (jsxRuntime.jsxs(formik.Form, { className: 'send-balance-form', children: [jsxRuntime.jsx(formik.Field, { variant: 'regular', className: 'send-balance-form__field', name: 'amount', label: t('dyn_send_transaction.data.amount.label'), placeholder: t('dyn_send_transaction.data.amount.placeholder'), as: Input.Input, error: errors['amount'], message: touched['amount'] &&
79
82
  getDisplayErrorMessage(errors, t, 'amount', decimals) }), jsxRuntime.jsx(formik.Field, { variant: 'regular', className: 'send-balance-form__field', placeholder: t('dyn_send_transaction.data.recipient.placeholder'), label: t('dyn_send_transaction.data.recipient.label'), id: 'recipient', name: 'recipient', as: Input.Input, error: errors['recipient'], message: touched['recipient'] &&
80
- getDisplayErrorMessage(errors, t, 'recipient') }), jsxRuntime.jsx(Button.Button, { dataTestId: 'sendBalanceFormSubmitButton', expanded: true, type: 'submit', buttonVariant: 'primary', buttonPadding: 'medium', buttonClassName: 'send-balance-form__button', children: t('dyn_send_transaction.send_button') })] })) }));
83
+ getDisplayErrorMessage(errors, t, 'recipient') }), jsxRuntime.jsx(SecureTurnkeyWalletCard.SecureTurnkeyWalletCard, { className: 'send-balance-form__secure-wallet' }), jsxRuntime.jsx(Button.Button, { dataTestId: 'sendBalanceFormSubmitButton', expanded: true, type: 'submit', buttonVariant: 'primary', buttonPadding: 'medium', disabled: isTurnkeyWalletWithoutAuthenticator, buttonClassName: 'send-balance-form__button', children: t('dyn_send_transaction.send_button') })] })) }));
81
84
  };
82
85
 
83
86
  exports.SendBalanceForm = SendBalanceForm;
@@ -18,6 +18,8 @@ import '@dynamic-labs/utils';
18
18
  import '../../shared/consts/index.js';
19
19
  import '@dynamic-labs/multi-wallet';
20
20
  import { getOrdinalNumber } from '../../utils/functions/getOrdinalNumber/getOrdinalNumber.js';
21
+ import { useIsTurnkeyWallet } from '../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js';
22
+ import { SecureTurnkeyWalletCard } from '../SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.js';
21
23
 
22
24
  const sendBalanceFormInitialValues = {
23
25
  amount: '',
@@ -45,6 +47,7 @@ const getDisplayErrorMessage = (errors, t, field, decimals) => {
45
47
  };
46
48
  const SendBalanceForm = ({ initialValues, onSubmit, balance, decimals = 18, }) => {
47
49
  const { t } = useTranslation();
50
+ const { isTurnkeyWalletWithoutAuthenticator } = useIsTurnkeyWallet();
48
51
  const sendBalanceFormValidationSchema = useMemo(() => {
49
52
  const decimalsRegex = new RegExp(`^\\d*(\\.\\d{1,${decimals}})?$`);
50
53
  return object().shape({
@@ -73,7 +76,7 @@ const SendBalanceForm = ({ initialValues, onSubmit, balance, decimals = 18, }) =
73
76
  }, [balance, decimals]);
74
77
  return (jsx(Formik, { initialValues: initialValues || sendBalanceFormInitialValues, validationSchema: sendBalanceFormValidationSchema, onSubmit: (values) => onSubmit(values), validateOnChange: false, validateOnBlur: false, children: ({ errors, touched }) => (jsxs(Form, { className: 'send-balance-form', children: [jsx(Field, { variant: 'regular', className: 'send-balance-form__field', name: 'amount', label: t('dyn_send_transaction.data.amount.label'), placeholder: t('dyn_send_transaction.data.amount.placeholder'), as: Input, error: errors['amount'], message: touched['amount'] &&
75
78
  getDisplayErrorMessage(errors, t, 'amount', decimals) }), jsx(Field, { variant: 'regular', className: 'send-balance-form__field', placeholder: t('dyn_send_transaction.data.recipient.placeholder'), label: t('dyn_send_transaction.data.recipient.label'), id: 'recipient', name: 'recipient', as: Input, error: errors['recipient'], message: touched['recipient'] &&
76
- getDisplayErrorMessage(errors, t, 'recipient') }), jsx(Button, { dataTestId: 'sendBalanceFormSubmitButton', expanded: true, type: 'submit', buttonVariant: 'primary', buttonPadding: 'medium', buttonClassName: 'send-balance-form__button', children: t('dyn_send_transaction.send_button') })] })) }));
79
+ getDisplayErrorMessage(errors, t, 'recipient') }), jsx(SecureTurnkeyWalletCard, { className: 'send-balance-form__secure-wallet' }), jsx(Button, { dataTestId: 'sendBalanceFormSubmitButton', expanded: true, type: 'submit', buttonVariant: 'primary', buttonPadding: 'medium', disabled: isTurnkeyWalletWithoutAuthenticator, buttonClassName: 'send-balance-form__button', children: t('dyn_send_transaction.send_button') })] })) }));
77
80
  };
78
81
 
79
82
  export { SendBalanceForm };
@@ -42,6 +42,7 @@ require('../Popper/PopperContext/PopperContext.cjs');
42
42
  require('react-focus-lock');
43
43
  require('formik');
44
44
  require('yup');
45
+ var useEmbeddedWallet = require('../../utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs');
45
46
  require('../OverlayCard/OverlayCard.context.cjs');
46
47
  require('../../context/FooterAnimationContext/index.cjs');
47
48
  require('../../context/MockContext/MockContext.cjs');
@@ -56,7 +57,6 @@ require('i18next');
56
57
  require('../../widgets/DynamicWidget/context/DynamicWidgetContext.cjs');
57
58
  require('../UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.cjs');
58
59
  require('@dynamic-labs/types');
59
- var useEmbeddedWallet = require('../../utils/hooks/useEmbeddedWallet/useEmbeddedWallet.cjs');
60
60
  require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
61
61
  require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
62
62
  require('../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.cjs');
@@ -70,7 +70,7 @@ const SyncPasskeyFlow = () => {
70
70
  // we force them to created it before they can use the app
71
71
  // ** It must be an useEffect because some of the dependencies are async
72
72
  React.useEffect(() => {
73
- var _a;
73
+ var _a, _b, _c, _d, _e;
74
74
  const createWallet = () => _tslib.__awaiter(void 0, void 0, void 0, function* () {
75
75
  try {
76
76
  yield createEmbeddedWallet();
@@ -84,6 +84,9 @@ const SyncPasskeyFlow = () => {
84
84
  !projectSettings ||
85
85
  !isTurnkeyEnabled.isTurnkeyEnabled(projectSettings) ||
86
86
  !((_a = projectSettings.sdk) === null || _a === void 0 ? void 0 : _a.automaticEmbeddedWalletCreation) ||
87
+ // If embedded wallet is enabled and no security method is set don't call createWallet on refresh
88
+ ((_e = (((_b = projectSettings.sdk) === null || _b === void 0 ? void 0 : _b.automaticEmbeddedWalletCreation) &&
89
+ ((_d = (_c = projectSettings.sdk) === null || _c === void 0 ? void 0 : _c.embeddedWalletSecurityMethods) === null || _d === void 0 ? void 0 : _d.length))) !== null && _e !== void 0 ? _e : 0) === 0 ||
87
90
  primaryWalletId || //should not override primary wallet
88
91
  lastUsedWallet !== undefined //untill embedded wallet is generated it's undefined
89
92
  ) {
@@ -38,6 +38,7 @@ import '../Popper/PopperContext/PopperContext.js';
38
38
  import 'react-focus-lock';
39
39
  import 'formik';
40
40
  import 'yup';
41
+ import { useEmbeddedWallet } from '../../utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js';
41
42
  import '../OverlayCard/OverlayCard.context.js';
42
43
  import '../../context/FooterAnimationContext/index.js';
43
44
  import '../../context/MockContext/MockContext.js';
@@ -52,7 +53,6 @@ import 'i18next';
52
53
  import '../../widgets/DynamicWidget/context/DynamicWidgetContext.js';
53
54
  import '../UserProfile/parts/UserProfileField/components/VerifiedEmailIcon/VerifiedEmailIcon.js';
54
55
  import '@dynamic-labs/types';
55
- import { useEmbeddedWallet } from '../../utils/hooks/useEmbeddedWallet/useEmbeddedWallet.js';
56
56
  import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
57
57
  import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
58
58
  import '../../widgets/DynamicWidget/views/ManagePasskeysWidgetView/PasskeyCard/PasskeyCard.js';
@@ -66,7 +66,7 @@ const SyncPasskeyFlow = () => {
66
66
  // we force them to created it before they can use the app
67
67
  // ** It must be an useEffect because some of the dependencies are async
68
68
  useEffect(() => {
69
- var _a;
69
+ var _a, _b, _c, _d, _e;
70
70
  const createWallet = () => __awaiter(void 0, void 0, void 0, function* () {
71
71
  try {
72
72
  yield createEmbeddedWallet();
@@ -80,6 +80,9 @@ const SyncPasskeyFlow = () => {
80
80
  !projectSettings ||
81
81
  !isTurnkeyEnabled(projectSettings) ||
82
82
  !((_a = projectSettings.sdk) === null || _a === void 0 ? void 0 : _a.automaticEmbeddedWalletCreation) ||
83
+ // If embedded wallet is enabled and no security method is set don't call createWallet on refresh
84
+ ((_e = (((_b = projectSettings.sdk) === null || _b === void 0 ? void 0 : _b.automaticEmbeddedWalletCreation) &&
85
+ ((_d = (_c = projectSettings.sdk) === null || _c === void 0 ? void 0 : _c.embeddedWalletSecurityMethods) === null || _d === void 0 ? void 0 : _d.length))) !== null && _e !== void 0 ? _e : 0) === 0 ||
83
86
  primaryWalletId || //should not override primary wallet
84
87
  lastUsedWallet !== undefined //untill embedded wallet is generated it's undefined
85
88
  ) {
@@ -33,14 +33,18 @@ var Alert = require('../Alert/Alert.cjs');
33
33
  var AppOriginTile = require('../AppOriginTile/AppOriginTile.cjs');
34
34
  var Button = require('../Button/Button.cjs');
35
35
  var PoweredByDynamic = require('../PoweredByDynamic/PoweredByDynamic.cjs');
36
+ var useIsTurnkeyWallet = require('../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.cjs');
37
+ var SecureTurnkeyWalletCard = require('../SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.cjs');
38
+ var PasskeyCreatedSuccessBanner = require('../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.cjs');
36
39
 
37
40
  const TransactionConfirmationPageLayout = ({ onClickClose, isLoading, onClickBack, title, error, appOrigin, appLogoUrl, appName, onClickSend, disableSendButton, displayPoweredByDynamicFooter = false, alert, children, }) => {
38
41
  const { t } = reactI18next.useTranslation();
42
+ const { isTurnkeyWalletWithoutAuthenticator } = useIsTurnkeyWallet.useIsTurnkeyWallet();
39
43
  const closeButton = onClickClose && (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: onClickClose, "data-testid": 'close', disabled: isLoading, children: jsxRuntime.jsx(close.ReactComponent, {}) }));
40
44
  const backButton = onClickBack && (jsxRuntime.jsx(IconButton.IconButton, { type: 'button', onClick: onClickBack, "data-testid": 'back-button', children: jsxRuntime.jsx(chevronLeft.ReactComponent, {}) }));
41
- return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: closeButton, leading: backButton, alignContent: 'bottom', children: jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: (props) => (jsxRuntime.jsx(Icon.Icon, { color: 'brand-primary', children: jsxRuntime.jsx(signCircle.ReactComponent, Object.assign({}, props)) })), iconSize: 64, isSpinning: true }) }), jsxRuntime.jsxs("div", { className: 'transaction-confirmation__body', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', className: 'transaction-confirmation__title', children: title }), jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}), children: error && (jsxRuntime.jsx("div", { className: 'transaction-confirmation__error', children: jsxRuntime.jsx(Alert.Alert, { icon: 'error', variant: 'error', children: error }) })) }), jsxRuntime.jsxs("div", { className: 'transaction-confirmation__content', children: [jsxRuntime.jsx("div", { className: 'transaction-confirmation__app-origin-tile', children: jsxRuntime.jsx(AppOriginTile.AppOriginTile, { appLogoUrl: appLogoUrl, appName: appName, appOrigin: appOrigin }) }), jsxRuntime.jsx("div", { className: 'transaction-confirmation__rows', children: children })] }), jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}), children: alert && (jsxRuntime.jsx("div", { className: 'transaction-confirmation__warning', children: alert })) }), jsxRuntime.jsxs("div", { className: 'transaction-confirmation__actions', children: [onClickClose && (jsxRuntime.jsx(Button.Button, { buttonVariant: 'secondary', onClick: onClickClose, expanded: true, buttonPadding: 'large', disabled: isLoading, children: t('dyn_send_transaction.confirmation.cancel_button') })), jsxRuntime.jsx(Button.Button, { buttonVariant: 'primary', buttonPadding: 'large', onClick: (event) => {
45
+ return (jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [jsxRuntime.jsx(ModalHeader.ModalHeader, { trailing: closeButton, leading: backButton, alignContent: 'bottom', children: jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: (props) => (jsxRuntime.jsx(Icon.Icon, { color: 'brand-primary', children: jsxRuntime.jsx(signCircle.ReactComponent, Object.assign({}, props)) })), iconSize: 64, isSpinning: true }) }), jsxRuntime.jsx(PasskeyCreatedSuccessBanner.PasskeyCreatedSuccessBanner, {}), jsxRuntime.jsxs("div", { className: 'transaction-confirmation__body', children: [jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', className: 'transaction-confirmation__title', children: title }), jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}), children: error && (jsxRuntime.jsx("div", { className: 'transaction-confirmation__error', children: jsxRuntime.jsx(Alert.Alert, { icon: 'error', variant: 'error', children: error }) })) }), jsxRuntime.jsxs("div", { className: 'transaction-confirmation__content', children: [jsxRuntime.jsx("div", { className: 'transaction-confirmation__app-origin-tile', children: jsxRuntime.jsx(AppOriginTile.AppOriginTile, { appLogoUrl: appLogoUrl, appName: appName, appOrigin: appOrigin }) }), jsxRuntime.jsx("div", { className: 'transaction-confirmation__rows', children: children })] }), jsxRuntime.jsx(AnimatePresence.AnimatePresence, { animationComponent: jsxRuntime.jsx(VerticalDrawerTransition.VerticalDrawerTransition, {}), children: alert && (jsxRuntime.jsx("div", { className: 'transaction-confirmation__warning', children: alert })) }), jsxRuntime.jsx(SecureTurnkeyWalletCard.SecureTurnkeyWalletCard, { className: 'transaction-confirmation__secure-wallet' }), jsxRuntime.jsxs("div", { className: 'transaction-confirmation__actions', children: [onClickClose && (jsxRuntime.jsx(Button.Button, { buttonVariant: 'secondary', onClick: onClickClose, expanded: true, buttonPadding: 'large', disabled: isLoading, children: t('dyn_send_transaction.confirmation.cancel_button') })), jsxRuntime.jsx(Button.Button, { buttonVariant: 'primary', buttonPadding: 'large', onClick: (event) => {
42
46
  onClickSend === null || onClickSend === void 0 ? void 0 : onClickSend(event);
43
- }, expanded: true, loading: isLoading, disabled: disableSendButton, children: t('dyn_send_transaction.confirmation.confirm_button') })] }), displayPoweredByDynamicFooter && (jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'transaction-confirmation__footer' }))] })] }));
47
+ }, expanded: true, loading: isLoading, disabled: disableSendButton || isTurnkeyWalletWithoutAuthenticator, children: t('dyn_send_transaction.confirmation.confirm_button') })] }), displayPoweredByDynamicFooter && (jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'transaction-confirmation__footer' }))] })] }));
44
48
  };
45
49
 
46
50
  exports.TransactionConfirmationPageLayout = TransactionConfirmationPageLayout;
@@ -29,14 +29,18 @@ import { Alert } from '../Alert/Alert.js';
29
29
  import { AppOriginTile } from '../AppOriginTile/AppOriginTile.js';
30
30
  import { Button } from '../Button/Button.js';
31
31
  import { PoweredByDynamic } from '../PoweredByDynamic/PoweredByDynamic.js';
32
+ import { useIsTurnkeyWallet } from '../../utils/hooks/useIsTurnkeyWallet/useIsTurnkeyWallet.js';
33
+ import { SecureTurnkeyWalletCard } from '../SecureTurnkeyWalletCard/SecureTurnkeyWalletCard.js';
34
+ import { PasskeyCreatedSuccessBanner } from '../PasskeyCreatedSuccessBanner/PasskeyCreatedSuccessBanner.js';
32
35
 
33
36
  const TransactionConfirmationPageLayout = ({ onClickClose, isLoading, onClickBack, title, error, appOrigin, appLogoUrl, appName, onClickSend, disableSendButton, displayPoweredByDynamicFooter = false, alert, children, }) => {
34
37
  const { t } = useTranslation();
38
+ const { isTurnkeyWalletWithoutAuthenticator } = useIsTurnkeyWallet();
35
39
  const closeButton = onClickClose && (jsx(IconButton, { type: 'button', onClick: onClickClose, "data-testid": 'close', disabled: isLoading, children: jsx(SvgClose, {}) }));
36
40
  const backButton = onClickBack && (jsx(IconButton, { type: 'button', onClick: onClickBack, "data-testid": 'back-button', children: jsx(SvgChevronLeft, {}) }));
37
- return (jsxs(Fragment, { children: [jsx(ModalHeader, { trailing: closeButton, leading: backButton, alignContent: 'bottom', children: jsx(IconWithSpinner, { Icon: (props) => (jsx(Icon, { color: 'brand-primary', children: jsx(SvgSignCircle, Object.assign({}, props)) })), iconSize: 64, isSpinning: true }) }), jsxs("div", { className: 'transaction-confirmation__body', children: [jsx(Typography, { variant: 'title', color: 'primary', className: 'transaction-confirmation__title', children: title }), jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, {}), children: error && (jsx("div", { className: 'transaction-confirmation__error', children: jsx(Alert, { icon: 'error', variant: 'error', children: error }) })) }), jsxs("div", { className: 'transaction-confirmation__content', children: [jsx("div", { className: 'transaction-confirmation__app-origin-tile', children: jsx(AppOriginTile, { appLogoUrl: appLogoUrl, appName: appName, appOrigin: appOrigin }) }), jsx("div", { className: 'transaction-confirmation__rows', children: children })] }), jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, {}), children: alert && (jsx("div", { className: 'transaction-confirmation__warning', children: alert })) }), jsxs("div", { className: 'transaction-confirmation__actions', children: [onClickClose && (jsx(Button, { buttonVariant: 'secondary', onClick: onClickClose, expanded: true, buttonPadding: 'large', disabled: isLoading, children: t('dyn_send_transaction.confirmation.cancel_button') })), jsx(Button, { buttonVariant: 'primary', buttonPadding: 'large', onClick: (event) => {
41
+ return (jsxs(Fragment, { children: [jsx(ModalHeader, { trailing: closeButton, leading: backButton, alignContent: 'bottom', children: jsx(IconWithSpinner, { Icon: (props) => (jsx(Icon, { color: 'brand-primary', children: jsx(SvgSignCircle, Object.assign({}, props)) })), iconSize: 64, isSpinning: true }) }), jsx(PasskeyCreatedSuccessBanner, {}), jsxs("div", { className: 'transaction-confirmation__body', children: [jsx(Typography, { variant: 'title', color: 'primary', className: 'transaction-confirmation__title', children: title }), jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, {}), children: error && (jsx("div", { className: 'transaction-confirmation__error', children: jsx(Alert, { icon: 'error', variant: 'error', children: error }) })) }), jsxs("div", { className: 'transaction-confirmation__content', children: [jsx("div", { className: 'transaction-confirmation__app-origin-tile', children: jsx(AppOriginTile, { appLogoUrl: appLogoUrl, appName: appName, appOrigin: appOrigin }) }), jsx("div", { className: 'transaction-confirmation__rows', children: children })] }), jsx(AnimatePresence, { animationComponent: jsx(VerticalDrawerTransition, {}), children: alert && (jsx("div", { className: 'transaction-confirmation__warning', children: alert })) }), jsx(SecureTurnkeyWalletCard, { className: 'transaction-confirmation__secure-wallet' }), jsxs("div", { className: 'transaction-confirmation__actions', children: [onClickClose && (jsx(Button, { buttonVariant: 'secondary', onClick: onClickClose, expanded: true, buttonPadding: 'large', disabled: isLoading, children: t('dyn_send_transaction.confirmation.cancel_button') })), jsx(Button, { buttonVariant: 'primary', buttonPadding: 'large', onClick: (event) => {
38
42
  onClickSend === null || onClickSend === void 0 ? void 0 : onClickSend(event);
39
- }, expanded: true, loading: isLoading, disabled: disableSendButton, children: t('dyn_send_transaction.confirmation.confirm_button') })] }), displayPoweredByDynamicFooter && (jsx(PoweredByDynamic, { classNameRoot: 'transaction-confirmation__footer' }))] })] }));
43
+ }, expanded: true, loading: isLoading, disabled: disableSendButton || isTurnkeyWalletWithoutAuthenticator, children: t('dyn_send_transaction.confirmation.confirm_button') })] }), displayPoweredByDynamicFooter && (jsx(PoweredByDynamic, { classNameRoot: 'transaction-confirmation__footer' }))] })] }));
40
44
  };
41
45
 
42
46
  export { TransactionConfirmationPageLayout };
@@ -51,3 +51,5 @@ export * from './TransactionConfirmationPageLayout';
51
51
  export * from './Transition';
52
52
  export * from './Typography';
53
53
  export * from './WalletInformationCard';
54
+ export * from './SecureTurnkeyWalletCard';
55
+ export * from './PasskeyCreatedSuccessBanner';
@@ -104,6 +104,7 @@ var useNameService = require('./hooks/useNameService/useNameService.cjs');
104
104
  var useSelectedWalletConnector = require('./hooks/useSelectedWalletConnector/useSelectedWalletConnector.cjs');
105
105
  var useSetShowAuthFlowWithInit = require('./hooks/useSetShowAuthFlowWithInit/useSetShowAuthFlowWithInit.cjs');
106
106
  var useVerificationInProgress = require('./hooks/useVerificationInProgress/useVerificationInProgress.cjs');
107
+ var useShowPasskeyCreateSuccess = require('./hooks/useShowPasskeyCreateSuccess/useShowPasskeyCreateSuccess.cjs');
107
108
  var internalEvents = require('./internalEvents/internalEvents.cjs');
108
109
  var useCustomerCallbacks = require('./useCustomerCallbacks/useCustomerCallbacks.cjs');
109
110
  var useCustomerAuthFlowCallbacks = require('./useCustomerCallbacks/useCustomerAuthFlowCallbacks.cjs');
@@ -463,6 +464,7 @@ const DynamicContextProvider = ({ children, theme, settings, locale: locale$1, }
463
464
  clearAllWalletConnectSessions,
464
465
  removeConnectedWalletsInfo,
465
466
  ]);
467
+ const { showPasskeyCreatedSuccess, setShowPasskeyCreatedSuccess } = useShowPasskeyCreateSuccess.useShowPasskeyCreateSuccess();
466
468
  const value = React.useMemo(() => {
467
469
  var _a, _b, _c;
468
470
  return ({
@@ -560,6 +562,7 @@ const DynamicContextProvider = ({ children, theme, settings, locale: locale$1, }
560
562
  setShowAuthFlow: setShowAuthFlowWithInit,
561
563
  setShowBridgeWidget,
562
564
  setShowDynamicUserProfile,
565
+ setShowPasskeyCreatedSuccess,
563
566
  setShowQrcodeModal,
564
567
  setShowWidgetStatePopup,
565
568
  setUser,
@@ -568,6 +571,7 @@ const DynamicContextProvider = ({ children, theme, settings, locale: locale$1, }
568
571
  showBridgeWidget,
569
572
  showDynamicUserProfile,
570
573
  showLockedWalletView,
574
+ showPasskeyCreatedSuccess,
571
575
  showQrcodeModal,
572
576
  showWidgetStatePopup,
573
577
  signWithEmailWalletName,
@@ -625,6 +629,7 @@ const DynamicContextProvider = ({ children, theme, settings, locale: locale$1, }
625
629
  isSingleWalletAccount,
626
630
  isVerificationInProgress,
627
631
  legacyIsVerifying,
632
+ user,
628
633
  linkedOrConnectedWallets,
629
634
  loadingNetwork,
630
635
  loginWithEmail,
@@ -664,6 +669,7 @@ const DynamicContextProvider = ({ children, theme, settings, locale: locale$1, }
664
669
  setSdkHasLoaded,
665
670
  setSelectedWalletConnectorKey,
666
671
  setShowAuthFlowWithInit,
672
+ setShowPasskeyCreatedSuccess,
667
673
  setShowQrcodeModal,
668
674
  setUser,
669
675
  shadowDOMEnabled,
@@ -671,6 +677,7 @@ const DynamicContextProvider = ({ children, theme, settings, locale: locale$1, }
671
677
  showBridgeWidget,
672
678
  showDynamicUserProfile,
673
679
  showLockedWalletView,
680
+ showPasskeyCreatedSuccess,
674
681
  showQrcodeModal,
675
682
  showWidgetStatePopup,
676
683
  signWithEmailWalletName,
@@ -682,7 +689,6 @@ const DynamicContextProvider = ({ children, theme, settings, locale: locale$1, }
682
689
  termsOfServiceUrl,
683
690
  theme,
684
691
  toolkitEnabled,
685
- user,
686
692
  walletUiUtils,
687
693
  wallets,
688
694
  walletsFilter,