@dynamic-labs/sdk-react-core 1.1.0-alpha.1 → 1.1.0-alpha.2

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 (32) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/package.cjs +2 -2
  3. package/package.js +2 -2
  4. package/package.json +11 -11
  5. package/src/lib/components/CopyButton/CopyButton.d.ts +2 -1
  6. package/src/lib/locale/en/translation.cjs +118 -1
  7. package/src/lib/locale/en/translation.d.ts +118 -1
  8. package/src/lib/locale/en/translation.js +118 -1
  9. package/src/lib/shared/utils/functions/chain/getChainIcon.cjs +1 -0
  10. package/src/lib/shared/utils/functions/chain/getChainIcon.js +2 -1
  11. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +3 -2
  12. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +3 -2
  13. package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +3 -2
  14. package/src/lib/views/CollectUserDataView/UserDataFields/index.js +3 -2
  15. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +1 -1
  16. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +1 -1
  17. package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +6 -2
  18. package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +6 -2
  19. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +10 -5
  20. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +10 -5
  21. package/src/lib/views/PendingConnectView/PendingConnectView.cjs +7 -4
  22. package/src/lib/views/PendingConnectView/PendingConnectView.js +7 -4
  23. package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +8 -5
  24. package/src/lib/views/PendingSignatureView/PendingSignatureView.js +8 -5
  25. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +11 -8
  26. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +11 -8
  27. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +4 -3
  28. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +4 -3
  29. package/src/lib/views/WalletLockedView/WalletLockedView.cjs +3 -2
  30. package/src/lib/views/WalletLockedView/WalletLockedView.js +3 -2
  31. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +4 -3
  32. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +4 -3
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var React = require('react');
7
+ var reactI18next = require('react-i18next');
7
8
  var classNames = require('../../utils/functions/classNames/classNames.cjs');
8
9
  require('../../events/dynamicEvents.cjs');
9
10
  require('@dynamic-labs/utils');
@@ -30,7 +31,6 @@ var useFindSocialIcon = require('../../utils/hooks/useFindSocialIcon/useFindSoci
30
31
  require('../../context/ThemeContext/ThemeContext.cjs');
31
32
  require('@dynamic-labs/types');
32
33
  require('yup');
33
- require('react-i18next');
34
34
  require('../../context/MockContext/MockContext.cjs');
35
35
  require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
36
36
  require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
@@ -68,16 +68,17 @@ var SocialRedirectContext = require('../../context/SocialRedirectContext/SocialR
68
68
  const SocialWrongAccountView = () => {
69
69
  const [tryAgainClicked, setTryAgainClicked] = React.useState(false);
70
70
  const { socialWalletConnector, socialAccount } = SocialRedirectContext.useSocialRedirectContext();
71
+ const { t } = reactI18next.useTranslation();
71
72
  const findSocialIcon = useFindSocialIcon.useFindSocialIcon();
72
73
  if (!socialAccount || !socialWalletConnector)
73
74
  return null;
74
- return (jsxRuntime.jsxs("div", { className: classNames.classNames('social-wrong-account-view__container'), children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: findSocialIcon(socialAccount.oauthProvider), isSpinning: tryAgainClicked, iconSize: 64 }), jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', className: classNames.classNames('social-wrong-account-view__title'), children: "Whoops. Wrong Account" }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: classNames.classNames('social-wrong-account-view__copy'), children: "You must connect with the same account you originally signed in with." }), jsxRuntime.jsxs(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: classNames.classNames('social-wrong-account-view__copy'), children: ["Please connect with: ", jsxRuntime.jsx("b", { children: socialAccount.oauthUsername })] }), jsxRuntime.jsx(Button.Button, { buttonClassName: 'social-wrong-account-view__button', buttonVariant: 'primary', buttonPadding: 'large', expanded: true, typographyProps: {
75
+ return (jsxRuntime.jsxs("div", { className: classNames.classNames('social-wrong-account-view__container'), children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: findSocialIcon(socialAccount.oauthProvider), isSpinning: tryAgainClicked, iconSize: 64 }), jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', className: classNames.classNames('social-wrong-account-view__title'), copykey: 'dyn_login.wrong_social_account.title', children: t('dyn_login.wrong_social_account.title') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: classNames.classNames('social-wrong-account-view__copy'), copykey: 'dyn_login.wrong_social_account.subtitle', children: t('dyn_login.wrong_social_account.subtitle') }), jsxRuntime.jsxs(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: classNames.classNames('social-wrong-account-view__copy'), copykey: 'dyn_login.wrong_social_account.retry_title', children: [t('dyn_login.wrong_social_account.retry_title'), jsxRuntime.jsx("b", { children: socialAccount.oauthUsername })] }), jsxRuntime.jsx(Button.Button, { buttonClassName: 'social-wrong-account-view__button', buttonVariant: 'primary', buttonPadding: 'large', expanded: true, typographyProps: {
75
76
  variant: 'button_primary',
76
77
  weight: 'medium',
77
78
  }, disabled: tryAgainClicked, onClick: () => {
78
79
  setTryAgainClicked(true);
79
80
  socialWalletConnector.connect(socialAccount.oauthProvider);
80
- }, children: "Try again" })] }));
81
+ }, copykey: 'dyn_login.wrong_social_account.retry_button', children: t('dyn_login.wrong_social_account.retry_button') })] }));
81
82
  };
82
83
 
83
84
  exports.SocialWrongAccountView = SocialWrongAccountView;
@@ -1,5 +1,6 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
2
  import { useState } from 'react';
3
+ import { useTranslation } from 'react-i18next';
3
4
  import { classNames } from '../../utils/functions/classNames/classNames.js';
4
5
  import '../../events/dynamicEvents.js';
5
6
  import '@dynamic-labs/utils';
@@ -26,7 +27,6 @@ import { useFindSocialIcon } from '../../utils/hooks/useFindSocialIcon/useFindSo
26
27
  import '../../context/ThemeContext/ThemeContext.js';
27
28
  import '@dynamic-labs/types';
28
29
  import 'yup';
29
- import 'react-i18next';
30
30
  import '../../context/MockContext/MockContext.js';
31
31
  import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
32
32
  import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
@@ -64,16 +64,17 @@ import { useSocialRedirectContext } from '../../context/SocialRedirectContext/So
64
64
  const SocialWrongAccountView = () => {
65
65
  const [tryAgainClicked, setTryAgainClicked] = useState(false);
66
66
  const { socialWalletConnector, socialAccount } = useSocialRedirectContext();
67
+ const { t } = useTranslation();
67
68
  const findSocialIcon = useFindSocialIcon();
68
69
  if (!socialAccount || !socialWalletConnector)
69
70
  return null;
70
- return (jsxs("div", { className: classNames('social-wrong-account-view__container'), children: [jsx(IconWithSpinner, { Icon: findSocialIcon(socialAccount.oauthProvider), isSpinning: tryAgainClicked, iconSize: 64 }), jsx(Typography, { weight: 'medium', variant: 'title', className: classNames('social-wrong-account-view__title'), children: "Whoops. Wrong Account" }), jsx(Typography, { variant: 'body_normal', weight: 'regular', className: classNames('social-wrong-account-view__copy'), children: "You must connect with the same account you originally signed in with." }), jsxs(Typography, { variant: 'body_normal', weight: 'regular', className: classNames('social-wrong-account-view__copy'), children: ["Please connect with: ", jsx("b", { children: socialAccount.oauthUsername })] }), jsx(Button, { buttonClassName: 'social-wrong-account-view__button', buttonVariant: 'primary', buttonPadding: 'large', expanded: true, typographyProps: {
71
+ return (jsxs("div", { className: classNames('social-wrong-account-view__container'), children: [jsx(IconWithSpinner, { Icon: findSocialIcon(socialAccount.oauthProvider), isSpinning: tryAgainClicked, iconSize: 64 }), jsx(Typography, { weight: 'medium', variant: 'title', className: classNames('social-wrong-account-view__title'), copykey: 'dyn_login.wrong_social_account.title', children: t('dyn_login.wrong_social_account.title') }), jsx(Typography, { variant: 'body_normal', weight: 'regular', className: classNames('social-wrong-account-view__copy'), copykey: 'dyn_login.wrong_social_account.subtitle', children: t('dyn_login.wrong_social_account.subtitle') }), jsxs(Typography, { variant: 'body_normal', weight: 'regular', className: classNames('social-wrong-account-view__copy'), copykey: 'dyn_login.wrong_social_account.retry_title', children: [t('dyn_login.wrong_social_account.retry_title'), jsx("b", { children: socialAccount.oauthUsername })] }), jsx(Button, { buttonClassName: 'social-wrong-account-view__button', buttonVariant: 'primary', buttonPadding: 'large', expanded: true, typographyProps: {
71
72
  variant: 'button_primary',
72
73
  weight: 'medium',
73
74
  }, disabled: tryAgainClicked, onClick: () => {
74
75
  setTryAgainClicked(true);
75
76
  socialWalletConnector.connect(socialAccount.oauthProvider);
76
- }, children: "Try again" })] }));
77
+ }, copykey: 'dyn_login.wrong_social_account.retry_button', children: t('dyn_login.wrong_social_account.retry_button') })] }));
77
78
  };
78
79
 
79
80
  export { SocialWrongAccountView };
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
  var _tslib = require('../../../../_virtual/_tslib.cjs');
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var React = require('react');
8
+ var reactI18next = require('react-i18next');
8
9
  var walletBook = require('@dynamic-labs/wallet-book');
9
10
  require('../../events/dynamicEvents.cjs');
10
11
  require('@dynamic-labs/utils');
@@ -30,7 +31,6 @@ require('react-dom');
30
31
  require('../../context/ThemeContext/ThemeContext.cjs');
31
32
  require('@dynamic-labs/types');
32
33
  require('yup');
33
- require('react-i18next');
34
34
  require('../../context/MockContext/MockContext.cjs');
35
35
  require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
36
36
  require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
@@ -70,6 +70,7 @@ require('react-focus-lock');
70
70
  const iconSize = 64;
71
71
  const WalletLockedView = () => {
72
72
  const { handleLogOut, primaryWallet, setShowAuthFlow, appName, authToken } = useInternalDynamicContext.useInternalDynamicContext();
73
+ const { t } = reactI18next.useTranslation();
73
74
  React.useEffect(() => {
74
75
  // when there is no valid session, we want to log user out
75
76
  if (!authToken) {
@@ -92,7 +93,7 @@ const WalletLockedView = () => {
92
93
  height: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
93
94
  width: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
94
95
  } }));
95
- return (jsxRuntime.jsxs("div", { "data-testid": 'wallet-locked-view', children: [jsxRuntime.jsx(ErrorContainer.ErrorContainer, { withIcon: false, variant: 'success', className: 'wallet-locked-view__error-container', children: "Connect your wallet to continue" }), jsxRuntime.jsxs("div", { className: 'wallet-locked-view__content', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, className: 'wallet-locked-view__icon', isSpinning: true }), jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', weight: 'medium', className: 'wallet-locked-view__title', children: "Welcome back." }), jsxRuntime.jsxs(Typography.Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', children: ["We couldn't connect to your wallet. Click connect to retry the connection ", appName, "."] }), jsxRuntime.jsx(Button.Button, { onClick: () => handleConnectWallet(), buttonClassName: 'wallet-locked-view__button', children: "Connect wallet" }), jsxRuntime.jsx(Divider.Divider, { text: 'Or' }), jsxRuntime.jsx(TextButton.TextButton, { className: 'wallet-locked-view__log-out', onClick: handleLogOut, children: "Log out" })] })] }));
96
+ return (jsxRuntime.jsxs("div", { "data-testid": 'wallet-locked-view', children: [jsxRuntime.jsx(ErrorContainer.ErrorContainer, { withIcon: false, variant: 'success', className: 'wallet-locked-view__error-container', copykey: 'dyn_wallet_locked.connect_continue', children: t('dyn_wallet_locked.connect_continue') }), jsxRuntime.jsxs("div", { className: 'wallet-locked-view__content', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, className: 'wallet-locked-view__icon', isSpinning: true }), jsxRuntime.jsx(Typography.Typography, { variant: 'title', color: 'primary', weight: 'medium', className: 'wallet-locked-view__title', copykey: 'dyn_wallet_locked.title', children: t('dyn_wallet_locked.title') }), jsxRuntime.jsxs(Typography.Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', copykey: 'dyn_wallet_locked.subtitle', children: [t('dyn_wallet_locked.subtitle'), appName, "."] }), jsxRuntime.jsx(Button.Button, { onClick: () => handleConnectWallet(), buttonClassName: 'wallet-locked-view__button', copykey: 'dyn_wallet_locked.connect', children: t('dyn_wallet_locked.connect') }), jsxRuntime.jsx(Divider.Divider, { text: 'Or' }), jsxRuntime.jsx(TextButton.TextButton, { className: 'wallet-locked-view__log-out', onClick: handleLogOut, copykey: 'dyn_wallet_locked.logout', children: t('dyn_wallet_locked.logout') })] })] }));
96
97
  };
97
98
 
98
99
  exports.WalletLockedView = WalletLockedView;
@@ -1,6 +1,7 @@
1
1
  import { __awaiter } from '../../../../_virtual/_tslib.js';
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { useEffect } from 'react';
4
+ import { useTranslation } from 'react-i18next';
4
5
  import { WalletIcon } from '@dynamic-labs/wallet-book';
5
6
  import '../../events/dynamicEvents.js';
6
7
  import '@dynamic-labs/utils';
@@ -26,7 +27,6 @@ import 'react-dom';
26
27
  import '../../context/ThemeContext/ThemeContext.js';
27
28
  import '@dynamic-labs/types';
28
29
  import 'yup';
29
- import 'react-i18next';
30
30
  import '../../context/MockContext/MockContext.js';
31
31
  import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
32
32
  import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
@@ -66,6 +66,7 @@ import 'react-focus-lock';
66
66
  const iconSize = 64;
67
67
  const WalletLockedView = () => {
68
68
  const { handleLogOut, primaryWallet, setShowAuthFlow, appName, authToken } = useInternalDynamicContext();
69
+ const { t } = useTranslation();
69
70
  useEffect(() => {
70
71
  // when there is no valid session, we want to log user out
71
72
  if (!authToken) {
@@ -88,7 +89,7 @@ const WalletLockedView = () => {
88
89
  height: pixelToRem(iconSize * iconRatio),
89
90
  width: pixelToRem(iconSize * iconRatio),
90
91
  } }));
91
- return (jsxs("div", { "data-testid": 'wallet-locked-view', children: [jsx(ErrorContainer, { withIcon: false, variant: 'success', className: 'wallet-locked-view__error-container', children: "Connect your wallet to continue" }), jsxs("div", { className: 'wallet-locked-view__content', children: [jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, className: 'wallet-locked-view__icon', isSpinning: true }), jsx(Typography, { variant: 'title', color: 'primary', weight: 'medium', className: 'wallet-locked-view__title', children: "Welcome back." }), jsxs(Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', children: ["We couldn't connect to your wallet. Click connect to retry the connection ", appName, "."] }), jsx(Button, { onClick: () => handleConnectWallet(), buttonClassName: 'wallet-locked-view__button', children: "Connect wallet" }), jsx(Divider, { text: 'Or' }), jsx(TextButton, { className: 'wallet-locked-view__log-out', onClick: handleLogOut, children: "Log out" })] })] }));
92
+ return (jsxs("div", { "data-testid": 'wallet-locked-view', children: [jsx(ErrorContainer, { withIcon: false, variant: 'success', className: 'wallet-locked-view__error-container', copykey: 'dyn_wallet_locked.connect_continue', children: t('dyn_wallet_locked.connect_continue') }), jsxs("div", { className: 'wallet-locked-view__content', children: [jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, className: 'wallet-locked-view__icon', isSpinning: true }), jsx(Typography, { variant: 'title', color: 'primary', weight: 'medium', className: 'wallet-locked-view__title', copykey: 'dyn_wallet_locked.title', children: t('dyn_wallet_locked.title') }), jsxs(Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', copykey: 'dyn_wallet_locked.subtitle', children: [t('dyn_wallet_locked.subtitle'), appName, "."] }), jsx(Button, { onClick: () => handleConnectWallet(), buttonClassName: 'wallet-locked-view__button', copykey: 'dyn_wallet_locked.connect', children: t('dyn_wallet_locked.connect') }), jsx(Divider, { text: 'Or' }), jsx(TextButton, { className: 'wallet-locked-view__log-out', onClick: handleLogOut, copykey: 'dyn_wallet_locked.logout', children: t('dyn_wallet_locked.logout') })] })] }));
92
93
  };
93
94
 
94
95
  export { WalletLockedView };
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var _tslib = require('../../../../_virtual/_tslib.cjs');
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
+ var reactI18next = require('react-i18next');
7
8
  var walletBook = require('@dynamic-labs/wallet-book');
8
9
  var useInternalDynamicContext = require('../../context/DynamicContext/useInternalDynamicContext.cjs');
9
10
  var ViewContext = require('../../context/ViewContext/ViewContext.cjs');
@@ -31,7 +32,6 @@ require('react-dom');
31
32
  require('../../context/ThemeContext/ThemeContext.cjs');
32
33
  require('@dynamic-labs/types');
33
34
  require('yup');
34
- require('react-i18next');
35
35
  require('../../context/MockContext/MockContext.cjs');
36
36
  require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
37
37
  require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
@@ -67,6 +67,7 @@ require('react-focus-lock');
67
67
 
68
68
  const WalletSignSpinnerView = () => {
69
69
  const { goToInitialView } = ViewContext.useViewContext();
70
+ const { t } = reactI18next.useTranslation();
70
71
  const { setMultiWalletWidgetState, setSelectedWalletConnectorKey, selectedWalletConnector: walletConnector, } = useInternalDynamicContext.useInternalDynamicContext();
71
72
  if (!walletConnector) {
72
73
  return null;
@@ -83,10 +84,10 @@ const WalletSignSpinnerView = () => {
83
84
  height: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
84
85
  width: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
85
86
  } }));
86
- return (jsxRuntime.jsxs("div", { className: 'wallet-sign-spinner__container', "data-testid": 'wallet-sign-spinner-view', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: classNames.classNames('wallet-sign-spinner__copy'), children: "Sign the message to confirm transferring this wallet to this account." }), jsxRuntime.jsx(Button.Button, { expanded: true, buttonPadding: 'large', buttonVariant: 'primary', buttonClassName: 'wallet-sign-spinner__button', onClick: () => handleClose(), typographyProps: {
87
+ return (jsxRuntime.jsxs("div", { className: 'wallet-sign-spinner__container', "data-testid": 'wallet-sign-spinner-view', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: classNames.classNames('wallet-sign-spinner__copy'), copykey: 'dyn_wallet_transfer.sign.spinner.confirm_transfer', children: t('dyn_wallet_transfer.sign.spinner.confirm_transfer') }), jsxRuntime.jsx(Button.Button, { expanded: true, buttonPadding: 'large', buttonVariant: 'primary', buttonClassName: 'wallet-sign-spinner__button', onClick: () => handleClose(), typographyProps: {
87
88
  variant: 'button_primary',
88
89
  weight: 'medium',
89
- }, children: "Cancel" })] }));
90
+ }, copykey: 'dyn_wallet_transfer.sign.spinner.cancel', children: t('dyn_wallet_transfer.sign.spinner.cancel') })] }));
90
91
  };
91
92
 
92
93
  exports.WalletSignSpinnerView = WalletSignSpinnerView;
@@ -1,5 +1,6 @@
1
1
  import { __awaiter } from '../../../../_virtual/_tslib.js';
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
+ import { useTranslation } from 'react-i18next';
3
4
  import { WalletIcon } from '@dynamic-labs/wallet-book';
4
5
  import { useInternalDynamicContext } from '../../context/DynamicContext/useInternalDynamicContext.js';
5
6
  import { useViewContext } from '../../context/ViewContext/ViewContext.js';
@@ -27,7 +28,6 @@ import 'react-dom';
27
28
  import '../../context/ThemeContext/ThemeContext.js';
28
29
  import '@dynamic-labs/types';
29
30
  import 'yup';
30
- import 'react-i18next';
31
31
  import '../../context/MockContext/MockContext.js';
32
32
  import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
33
33
  import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
@@ -63,6 +63,7 @@ import 'react-focus-lock';
63
63
 
64
64
  const WalletSignSpinnerView = () => {
65
65
  const { goToInitialView } = useViewContext();
66
+ const { t } = useTranslation();
66
67
  const { setMultiWalletWidgetState, setSelectedWalletConnectorKey, selectedWalletConnector: walletConnector, } = useInternalDynamicContext();
67
68
  if (!walletConnector) {
68
69
  return null;
@@ -79,10 +80,10 @@ const WalletSignSpinnerView = () => {
79
80
  height: pixelToRem(iconSize * iconRatio),
80
81
  width: pixelToRem(iconSize * iconRatio),
81
82
  } }));
82
- return (jsxs("div", { className: 'wallet-sign-spinner__container', "data-testid": 'wallet-sign-spinner-view', children: [jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true }), jsx(Typography, { variant: 'body_normal', weight: 'regular', className: classNames('wallet-sign-spinner__copy'), children: "Sign the message to confirm transferring this wallet to this account." }), jsx(Button, { expanded: true, buttonPadding: 'large', buttonVariant: 'primary', buttonClassName: 'wallet-sign-spinner__button', onClick: () => handleClose(), typographyProps: {
83
+ return (jsxs("div", { className: 'wallet-sign-spinner__container', "data-testid": 'wallet-sign-spinner-view', children: [jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true }), jsx(Typography, { variant: 'body_normal', weight: 'regular', className: classNames('wallet-sign-spinner__copy'), copykey: 'dyn_wallet_transfer.sign.spinner.confirm_transfer', children: t('dyn_wallet_transfer.sign.spinner.confirm_transfer') }), jsx(Button, { expanded: true, buttonPadding: 'large', buttonVariant: 'primary', buttonClassName: 'wallet-sign-spinner__button', onClick: () => handleClose(), typographyProps: {
83
84
  variant: 'button_primary',
84
85
  weight: 'medium',
85
- }, children: "Cancel" })] }));
86
+ }, copykey: 'dyn_wallet_transfer.sign.spinner.cancel', children: t('dyn_wallet_transfer.sign.spinner.cancel') })] }));
86
87
  };
87
88
 
88
89
  export { WalletSignSpinnerView };