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

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 (57) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/package.cjs +3 -3
  3. package/package.js +3 -3
  4. package/package.json +12 -12
  5. package/src/lib/components/CopyButton/CopyButton.d.ts +2 -1
  6. package/src/lib/context/DynamicContext/DynamicContext.cjs +3 -2
  7. package/src/lib/context/DynamicContext/DynamicContext.js +3 -2
  8. package/src/lib/context/DynamicContext/useDynamicContext.cjs +2 -1
  9. package/src/lib/context/DynamicContext/useDynamicContext.d.ts +1 -1
  10. package/src/lib/context/DynamicContext/useDynamicContext.js +2 -1
  11. package/src/lib/data/api.cjs +0 -13
  12. package/src/lib/data/api.d.ts +1 -2
  13. package/src/lib/data/api.js +1 -13
  14. package/src/lib/locale/en/translation.cjs +118 -1
  15. package/src/lib/locale/en/translation.d.ts +118 -1
  16. package/src/lib/locale/en/translation.js +118 -1
  17. package/src/lib/shared/consts/index.cjs +1 -0
  18. package/src/lib/shared/consts/index.js +1 -0
  19. package/src/lib/shared/types/index.d.ts +2 -1
  20. package/src/lib/shared/utils/functions/chain/getChainIcon.cjs +1 -0
  21. package/src/lib/shared/utils/functions/chain/getChainIcon.js +2 -1
  22. package/src/lib/utils/functions/getVerifyArgs/getVerifyArgs.d.ts +1 -1
  23. package/src/lib/utils/hooks/useProcessNetworkConfigurations/index.d.ts +1 -0
  24. package/src/lib/utils/hooks/{useFetchNetworkConfigurations/useFetchNetworkConfigurations.cjs → useProcessNetworkConfigurations/useProcessNetworkConfigurations.cjs} +53 -67
  25. package/src/lib/utils/hooks/{useFetchNetworkConfigurations/useFetchNetworkConfigurations.d.ts → useProcessNetworkConfigurations/useProcessNetworkConfigurations.d.ts} +3 -2
  26. package/src/lib/utils/hooks/{useFetchNetworkConfigurations/useFetchNetworkConfigurations.js → useProcessNetworkConfigurations/useProcessNetworkConfigurations.js} +53 -67
  27. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.cjs +3 -2
  28. package/src/lib/views/CaptchaVerifyUser/CaptchaVerifyUser.js +3 -2
  29. package/src/lib/views/CollectUserDataView/UserDataFields/index.cjs +3 -2
  30. package/src/lib/views/CollectUserDataView/UserDataFields/index.js +3 -2
  31. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.cjs +1 -1
  32. package/src/lib/views/MergeUserAccountsView/MergeUserAccountsView.js +1 -1
  33. package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.cjs +6 -2
  34. package/src/lib/views/NoQrNotInstalledView/NoQrNotInstalledView.js +6 -2
  35. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.cjs +10 -5
  36. package/src/lib/views/NoQrNotInstalledView/WalletHelpLink.js +10 -5
  37. package/src/lib/views/PendingConnectView/PendingConnectView.cjs +7 -4
  38. package/src/lib/views/PendingConnectView/PendingConnectView.js +7 -4
  39. package/src/lib/views/PendingSignatureView/PendingSignatureView.cjs +8 -5
  40. package/src/lib/views/PendingSignatureView/PendingSignatureView.js +8 -5
  41. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.cjs +11 -8
  42. package/src/lib/views/QrCodeView/QrCodeContainer/QrCodeContainer.js +11 -8
  43. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.cjs +4 -3
  44. package/src/lib/views/SocialWrongAccountView/SocialWrongAccountView.js +4 -3
  45. package/src/lib/views/WalletList/data.d.ts +1 -1
  46. package/src/lib/views/WalletLockedView/WalletLockedView.cjs +3 -2
  47. package/src/lib/views/WalletLockedView/WalletLockedView.js +3 -2
  48. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.cjs +4 -3
  49. package/src/lib/views/WalletSignSpinnerView/WalletSignSpinnerView.js +4 -3
  50. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.cjs +4 -1
  51. package/src/lib/widgets/DynamicWidget/components/DynamicWidgetHeader/DynamicWidgetWalletHeader/DynamicWidgetWalletHeader.js +4 -1
  52. package/src/lib/utils/hooks/useFetchNetworkConfigurations/index.d.ts +0 -1
  53. /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/index.d.ts +0 -0
  54. /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/index.d.ts +0 -0
  55. /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.cjs +0 -0
  56. /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.d.ts +0 -0
  57. /package/src/lib/utils/hooks/{useFetchNetworkConfigurations → useProcessNetworkConfigurations}/utils/mergeCustomerEvmNetworksWithServerNetworks/mergeCustomerEvmNetworksWithServerNetworks.js +0 -0
@@ -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 iconic = require('@dynamic-labs/iconic');
8
9
  require('react');
9
10
  require('../../events/dynamicEvents.cjs');
@@ -29,7 +30,6 @@ require('react-dom');
29
30
  require('../../context/ThemeContext/ThemeContext.cjs');
30
31
  require('@dynamic-labs/types');
31
32
  require('yup');
32
- require('react-i18next');
33
33
  require('../../context/MockContext/MockContext.cjs');
34
34
  require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
35
35
  require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
@@ -64,12 +64,13 @@ require('react-focus-lock');
64
64
  var Captcha = require('../../components/Captcha/Captcha.cjs');
65
65
 
66
66
  const CaptchaVerifyUser = () => {
67
+ const { t } = reactI18next.useTranslation();
67
68
  const { captchaAuthState } = CaptchaContext.useCaptchaContext();
68
69
  const handleSuccess = (captchaToken) => _tslib.__awaiter(void 0, void 0, void 0, function* () {
69
70
  var _a;
70
71
  yield ((_a = captchaAuthState === null || captchaAuthState === void 0 ? void 0 : captchaAuthState.onCaptchaSuccess) === null || _a === void 0 ? void 0 : _a.call(captchaAuthState, captchaToken));
71
72
  });
72
- return (jsxRuntime.jsxs("div", { className: 'captcha-verify-user__container', children: [jsxRuntime.jsx(iconic.CaptchaWaveIcon, { className: 'captcha-verify-user__icon' }), jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'captcha-verify-user__title', children: "Let\u2019s verify you\u2019re human" }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'captcha-verify-user__subtitle', children: "We need to quickly verify you\u2019re human before we proceed." }), jsxRuntime.jsx(Captcha.Captcha, { handleSuccess: handleSuccess }), jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'captcha-verify-user__dynamic-logo' })] }));
73
+ return (jsxRuntime.jsxs("div", { className: 'captcha-verify-user__container', children: [jsxRuntime.jsx(iconic.CaptchaWaveIcon, { className: 'captcha-verify-user__icon' }), jsxRuntime.jsx(Typography.Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'captcha-verify-user__title', copykey: 'dyn_captcha.verify_user_title', children: t('dyn_captcha.verify_user_title') }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'captcha-verify-user__subtitle', copykey: 'dyn_captcha.verify_user_subtitle', children: t('dyn_captcha.verify_user_subtitle') }), jsxRuntime.jsx(Captcha.Captcha, { handleSuccess: handleSuccess }), jsxRuntime.jsx(PoweredByDynamic.PoweredByDynamic, { classNameRoot: 'captcha-verify-user__dynamic-logo' })] }));
73
74
  };
74
75
 
75
76
  exports.CaptchaVerifyUser = CaptchaVerifyUser;
@@ -1,5 +1,6 @@
1
1
  import { __awaiter } from '../../../../_virtual/_tslib.js';
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
+ import { useTranslation } from 'react-i18next';
3
4
  import { CaptchaWaveIcon } from '@dynamic-labs/iconic';
4
5
  import 'react';
5
6
  import '../../events/dynamicEvents.js';
@@ -25,7 +26,6 @@ import 'react-dom';
25
26
  import '../../context/ThemeContext/ThemeContext.js';
26
27
  import '@dynamic-labs/types';
27
28
  import 'yup';
28
- import 'react-i18next';
29
29
  import '../../context/MockContext/MockContext.js';
30
30
  import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
31
31
  import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
@@ -60,12 +60,13 @@ import 'react-focus-lock';
60
60
  import { Captcha } from '../../components/Captcha/Captcha.js';
61
61
 
62
62
  const CaptchaVerifyUser = () => {
63
+ const { t } = useTranslation();
63
64
  const { captchaAuthState } = useCaptchaContext();
64
65
  const handleSuccess = (captchaToken) => __awaiter(void 0, void 0, void 0, function* () {
65
66
  var _a;
66
67
  yield ((_a = captchaAuthState === null || captchaAuthState === void 0 ? void 0 : captchaAuthState.onCaptchaSuccess) === null || _a === void 0 ? void 0 : _a.call(captchaAuthState, captchaToken));
67
68
  });
68
- return (jsxs("div", { className: 'captcha-verify-user__container', children: [jsx(CaptchaWaveIcon, { className: 'captcha-verify-user__icon' }), jsx(Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'captcha-verify-user__title', children: "Let\u2019s verify you\u2019re human" }), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'captcha-verify-user__subtitle', children: "We need to quickly verify you\u2019re human before we proceed." }), jsx(Captcha, { handleSuccess: handleSuccess }), jsx(PoweredByDynamic, { classNameRoot: 'captcha-verify-user__dynamic-logo' })] }));
69
+ return (jsxs("div", { className: 'captcha-verify-user__container', children: [jsx(CaptchaWaveIcon, { className: 'captcha-verify-user__icon' }), jsx(Typography, { weight: 'medium', variant: 'title', color: 'primary', className: 'captcha-verify-user__title', copykey: 'dyn_captcha.verify_user_title', children: t('dyn_captcha.verify_user_title') }), jsx(Typography, { variant: 'body_normal', weight: 'regular', color: 'secondary', className: 'captcha-verify-user__subtitle', copykey: 'dyn_captcha.verify_user_subtitle', children: t('dyn_captcha.verify_user_subtitle') }), jsx(Captcha, { handleSuccess: handleSuccess }), jsx(PoweredByDynamic, { classNameRoot: 'captcha-verify-user__dynamic-logo' })] }));
69
70
  };
70
71
 
71
72
  export { CaptchaVerifyUser };
@@ -4,6 +4,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
6
  var formik = require('formik');
7
+ var reactI18next = require('react-i18next');
7
8
  require('react');
8
9
  require('../../../events/dynamicEvents.cjs');
9
10
  require('@dynamic-labs/utils');
@@ -36,7 +37,6 @@ require('../../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.c
36
37
  require('../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
37
38
  require('@dynamic-labs/rpc-providers');
38
39
  require('../../../context/UserWalletsContext/UserWalletsContext.cjs');
39
- require('react-i18next');
40
40
  require('../../../components/Transition/ZoomTransition/ZoomTransition.cjs');
41
41
  require('../../../components/Transition/SlideInUpTransition/SlideInUpTransition.cjs');
42
42
  require('../../../components/Transition/OpacityTransition/OpacityTransition.cjs');
@@ -69,6 +69,7 @@ var Select = require('../../../components/Select/Select.cjs');
69
69
 
70
70
  const UserDataFields = ({ errors, policiesConsentInnerComponentArray, fields, touched, }) => {
71
71
  const { fieldsConfig } = useFields.useFields();
72
+ const { t } = reactI18next.useTranslation();
72
73
  return (jsxRuntime.jsx("div", { className: 'user-data-fields__fields-column', children: fields === null || fields === void 0 ? void 0 : fields.map(({ name, required, enabled }) => {
73
74
  const { label, type, key } = index.getValueByKey(fieldsConfig, name);
74
75
  if (name === 'tShirtSize') {
@@ -84,7 +85,7 @@ const UserDataFields = ({ errors, policiesConsentInnerComponentArray, fields, to
84
85
  return (jsxRuntime.jsx("div", { role: 'group', "aria-labelledby": 'checkbox-group', className: 'user-data-fields__checkbox-container', children: policiesConsentInnerComponentArray === null || policiesConsentInnerComponentArray === void 0 ? void 0 : policiesConsentInnerComponentArray.map((component, index) => (jsxRuntime.jsxs("div", { className: 'user-data-fields__consent-checkbox', children: [jsxRuntime.jsx(formik.Field, { copykey: key, as: Checkbox.Checkbox, id: `policiesConsent_${index}`, name: 'policiesConsentArray', type: 'checkbox', value: `${index}` }, `policiesConsent_${index}`), jsxRuntime.jsx("label", { htmlFor: `policiesConsent_${index}`, className: 'user-data-fields__checkbox-label', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'secondary', children: component }) })] }, `policiesConsent_${index}`))) }, 'policiesConsentGroup'));
85
86
  }
86
87
  else if (name === 'email' && !enabled) {
87
- return (jsxRuntime.jsx(Tooltip.Tooltip, { content: 'This email is tied to your wallet so cannot be updated', className: 'user-data-fields__tooltip', children: jsxRuntime.jsx(formik.Field, { copykey: key, disabled: true, as: Input.Input, type: type, id: name, name: name, label: label }, name) }, 'disabled-email-tooltip'));
88
+ return (jsxRuntime.jsx(Tooltip.Tooltip, { content: t('dyn_collect_user_data.update_email_tooltip'), className: 'user-data-fields__tooltip', copykey: 'dyn_collect_user_data.update_email_tooltip', children: jsxRuntime.jsx(formik.Field, { copykey: key, disabled: true, as: Input.Input, type: type, id: name, name: name, label: label }, name) }, 'disabled-email-tooltip'));
88
89
  }
89
90
  else {
90
91
  return (jsxRuntime.jsx(formik.Field, { copykey: key, disabled: !enabled, as: Input.Input, type: type, id: name, name: name, label: label, optional: enabled && !required, error: errors[name] && touched[name], message: touched[name] && getDisplayErrorMessage.getDisplayErrorMessage(label, errors[name]) }, name));
@@ -1,5 +1,6 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
2
  import { Field } from 'formik';
3
+ import { useTranslation } from 'react-i18next';
3
4
  import 'react';
4
5
  import '../../../events/dynamicEvents.js';
5
6
  import '@dynamic-labs/utils';
@@ -32,7 +33,6 @@ import '../../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js
32
33
  import '../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
33
34
  import '@dynamic-labs/rpc-providers';
34
35
  import '../../../context/UserWalletsContext/UserWalletsContext.js';
35
- import 'react-i18next';
36
36
  import '../../../components/Transition/ZoomTransition/ZoomTransition.js';
37
37
  import '../../../components/Transition/SlideInUpTransition/SlideInUpTransition.js';
38
38
  import '../../../components/Transition/OpacityTransition/OpacityTransition.js';
@@ -65,6 +65,7 @@ import { Select } from '../../../components/Select/Select.js';
65
65
 
66
66
  const UserDataFields = ({ errors, policiesConsentInnerComponentArray, fields, touched, }) => {
67
67
  const { fieldsConfig } = useFields();
68
+ const { t } = useTranslation();
68
69
  return (jsx("div", { className: 'user-data-fields__fields-column', children: fields === null || fields === void 0 ? void 0 : fields.map(({ name, required, enabled }) => {
69
70
  const { label, type, key } = getValueByKey(fieldsConfig, name);
70
71
  if (name === 'tShirtSize') {
@@ -80,7 +81,7 @@ const UserDataFields = ({ errors, policiesConsentInnerComponentArray, fields, to
80
81
  return (jsx("div", { role: 'group', "aria-labelledby": 'checkbox-group', className: 'user-data-fields__checkbox-container', children: policiesConsentInnerComponentArray === null || policiesConsentInnerComponentArray === void 0 ? void 0 : policiesConsentInnerComponentArray.map((component, index) => (jsxs("div", { className: 'user-data-fields__consent-checkbox', children: [jsx(Field, { copykey: key, as: Checkbox, id: `policiesConsent_${index}`, name: 'policiesConsentArray', type: 'checkbox', value: `${index}` }, `policiesConsent_${index}`), jsx("label", { htmlFor: `policiesConsent_${index}`, className: 'user-data-fields__checkbox-label', children: jsx(Typography, { variant: 'body_small', color: 'secondary', children: component }) })] }, `policiesConsent_${index}`))) }, 'policiesConsentGroup'));
81
82
  }
82
83
  else if (name === 'email' && !enabled) {
83
- return (jsx(Tooltip, { content: 'This email is tied to your wallet so cannot be updated', className: 'user-data-fields__tooltip', children: jsx(Field, { copykey: key, disabled: true, as: Input, type: type, id: name, name: name, label: label }, name) }, 'disabled-email-tooltip'));
84
+ return (jsx(Tooltip, { content: t('dyn_collect_user_data.update_email_tooltip'), className: 'user-data-fields__tooltip', copykey: 'dyn_collect_user_data.update_email_tooltip', children: jsx(Field, { copykey: key, disabled: true, as: Input, type: type, id: name, name: name, label: label }, name) }, 'disabled-email-tooltip'));
84
85
  }
85
86
  else {
86
87
  return (jsx(Field, { copykey: key, disabled: !enabled, as: Input, type: type, id: name, name: name, label: label, optional: enabled && !required, error: errors[name] && touched[name], message: touched[name] && getDisplayErrorMessage(label, errors[name]) }, name));
@@ -100,7 +100,7 @@ const MergeUserAccountsView = () => {
100
100
  throw new utils.DynamicError('Something went wrong, please try again.');
101
101
  }
102
102
  catch (e) {
103
- setError('Something went wrong, please try again.');
103
+ setError(t('dyn_merge_user_accounts.errors.merge_error'));
104
104
  if (user) {
105
105
  setShowAuthFlow(false);
106
106
  return;
@@ -96,7 +96,7 @@ const MergeUserAccountsView = () => {
96
96
  throw new DynamicError('Something went wrong, please try again.');
97
97
  }
98
98
  catch (e) {
99
- setError('Something went wrong, please try again.');
99
+ setError(t('dyn_merge_user_accounts.errors.merge_error'));
100
100
  if (user) {
101
101
  setShowAuthFlow(false);
102
102
  return;
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
+ var reactI18next = require('react-i18next');
6
7
  var walletBook = require('@dynamic-labs/wallet-book');
7
8
  require('react');
8
9
  require('../../events/dynamicEvents.cjs');
@@ -29,7 +30,6 @@ require('react-dom');
29
30
  require('../../context/ThemeContext/ThemeContext.cjs');
30
31
  require('@dynamic-labs/types');
31
32
  require('yup');
32
- require('react-i18next');
33
33
  require('../../context/MockContext/MockContext.cjs');
34
34
  require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
35
35
  require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
@@ -66,6 +66,7 @@ require('react-focus-lock');
66
66
  const NoQrNotInstalledView = () => {
67
67
  const { selectedWalletConnector } = useInternalDynamicContext.useInternalDynamicContext();
68
68
  const { walletBook: walletBook$1 } = walletBook.useWalletBookContext();
69
+ const { t } = reactI18next.useTranslation();
69
70
  if (!selectedWalletConnector) {
70
71
  return null;
71
72
  }
@@ -75,7 +76,10 @@ const NoQrNotInstalledView = () => {
75
76
  .map(([name, link]) => (jsxRuntime.jsx(WalletHelpLink.WalletHelpLink, { name: name, link: link,
76
77
  // justification: we're looping over the keys of walletLinks.desktop
77
78
  Icon: getBrowserIcon.getBrowserIcon(name) }, name)));
78
- return (jsxRuntime.jsxs("div", { className: 'no-qr-code-installed__container', "data-testid": 'no-qr-code-installed', children: [jsxRuntime.jsx("div", { className: 'no-qr-code-installed__img', children: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: selectedWalletConnector.key, style: { height: pixelToRem.pixelToRem(64), width: pixelToRem.pixelToRem(64) } }) }), jsxRuntime.jsxs(Typography.Typography, { className: 'no-qr-code-installed__typography--title', variant: 'title', children: ["Install", ' ', walletBook.getWalletBookWallet(walletBook$1, selectedWalletConnector.key).name, ' ', "extension to connect"] }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', className: 'no-qr-code-installed__typography', color: 'secondary', children: "Select from your preferred options below:" }), jsxRuntime.jsx("div", { className: 'no-qr-code-installed__links-section', children: downloadLinks }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_mini', className: 'no-qr-code-installed__typography', weight: 'medium', color: 'secondary', children: "Refresh the page once installed" })] }));
79
+ return (jsxRuntime.jsxs("div", { className: 'no-qr-code-installed__container', "data-testid": 'no-qr-code-installed', children: [jsxRuntime.jsx("div", { className: 'no-qr-code-installed__img', children: jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: selectedWalletConnector.key, style: { height: pixelToRem.pixelToRem(64), width: pixelToRem.pixelToRem(64) } }) }), jsxRuntime.jsx(Typography.Typography, { className: 'no-qr-code-installed__typography--title', variant: 'title', copykey: 'dyn_qr_code.wallet_not_installed.install', children: t('dyn_qr_code.wallet_not_installed.install', {
80
+ wallet: walletBook.getWalletBookWallet(walletBook$1, selectedWalletConnector.key)
81
+ .name,
82
+ }) }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', className: 'no-qr-code-installed__typography', color: 'secondary', copykey: 'dyn_qr_code.wallet_not_installed.select', children: t('dyn_qr_code.wallet_not_installed.select') }), jsxRuntime.jsx("div", { className: 'no-qr-code-installed__links-section', children: downloadLinks }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_mini', className: 'no-qr-code-installed__typography', weight: 'medium', color: 'secondary', copykey: 'dyn_qr_code.wallet_not_installed.refresh', children: t('dyn_qr_code.wallet_not_installed.refresh') })] }));
79
83
  };
80
84
 
81
85
  exports.NoQrNotInstalledView = NoQrNotInstalledView;
@@ -1,4 +1,5 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { useTranslation } from 'react-i18next';
2
3
  import { useWalletBookContext, getWalletLinks, WalletIcon, getWalletBookWallet } from '@dynamic-labs/wallet-book';
3
4
  import 'react';
4
5
  import '../../events/dynamicEvents.js';
@@ -25,7 +26,6 @@ import 'react-dom';
25
26
  import '../../context/ThemeContext/ThemeContext.js';
26
27
  import '@dynamic-labs/types';
27
28
  import 'yup';
28
- import 'react-i18next';
29
29
  import '../../context/MockContext/MockContext.js';
30
30
  import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
31
31
  import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
@@ -62,6 +62,7 @@ import 'react-focus-lock';
62
62
  const NoQrNotInstalledView = () => {
63
63
  const { selectedWalletConnector } = useInternalDynamicContext();
64
64
  const { walletBook } = useWalletBookContext();
65
+ const { t } = useTranslation();
65
66
  if (!selectedWalletConnector) {
66
67
  return null;
67
68
  }
@@ -71,7 +72,10 @@ const NoQrNotInstalledView = () => {
71
72
  .map(([name, link]) => (jsx(WalletHelpLink, { name: name, link: link,
72
73
  // justification: we're looping over the keys of walletLinks.desktop
73
74
  Icon: getBrowserIcon(name) }, name)));
74
- return (jsxs("div", { className: 'no-qr-code-installed__container', "data-testid": 'no-qr-code-installed', children: [jsx("div", { className: 'no-qr-code-installed__img', children: jsx(WalletIcon, { walletKey: selectedWalletConnector.key, style: { height: pixelToRem(64), width: pixelToRem(64) } }) }), jsxs(Typography, { className: 'no-qr-code-installed__typography--title', variant: 'title', children: ["Install", ' ', getWalletBookWallet(walletBook, selectedWalletConnector.key).name, ' ', "extension to connect"] }), jsx(Typography, { variant: 'body_normal', className: 'no-qr-code-installed__typography', color: 'secondary', children: "Select from your preferred options below:" }), jsx("div", { className: 'no-qr-code-installed__links-section', children: downloadLinks }), jsx(Typography, { variant: 'body_mini', className: 'no-qr-code-installed__typography', weight: 'medium', color: 'secondary', children: "Refresh the page once installed" })] }));
75
+ return (jsxs("div", { className: 'no-qr-code-installed__container', "data-testid": 'no-qr-code-installed', children: [jsx("div", { className: 'no-qr-code-installed__img', children: jsx(WalletIcon, { walletKey: selectedWalletConnector.key, style: { height: pixelToRem(64), width: pixelToRem(64) } }) }), jsx(Typography, { className: 'no-qr-code-installed__typography--title', variant: 'title', copykey: 'dyn_qr_code.wallet_not_installed.install', children: t('dyn_qr_code.wallet_not_installed.install', {
76
+ wallet: getWalletBookWallet(walletBook, selectedWalletConnector.key)
77
+ .name,
78
+ }) }), jsx(Typography, { variant: 'body_normal', className: 'no-qr-code-installed__typography', color: 'secondary', copykey: 'dyn_qr_code.wallet_not_installed.select', children: t('dyn_qr_code.wallet_not_installed.select') }), jsx("div", { className: 'no-qr-code-installed__links-section', children: downloadLinks }), jsx(Typography, { variant: 'body_mini', className: 'no-qr-code-installed__typography', weight: 'medium', color: 'secondary', copykey: 'dyn_qr_code.wallet_not_installed.refresh', children: t('dyn_qr_code.wallet_not_installed.refresh') })] }));
75
79
  };
76
80
 
77
81
  export { NoQrNotInstalledView };
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
+ var reactI18next = require('react-i18next');
6
7
  require('react');
7
8
  require('../../events/dynamicEvents.cjs');
8
9
  require('@dynamic-labs/utils');
@@ -28,7 +29,6 @@ require('react-dom');
28
29
  require('../../context/ThemeContext/ThemeContext.cjs');
29
30
  require('@dynamic-labs/types');
30
31
  require('yup');
31
- require('react-i18next');
32
32
  require('../../context/MockContext/MockContext.cjs');
33
33
  require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
34
34
  require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
@@ -61,9 +61,14 @@ require('../../components/Popper/PopperContext/PopperContext.cjs');
61
61
  require('react-focus-lock');
62
62
 
63
63
  const capitalize = (value) => value[0].toUpperCase() + value.slice(1);
64
- const WalletHelpLink = ({ name, link, Icon }) => (jsxRuntime.jsx("div", { className: 'wallet-help-link', children: jsxRuntime.jsxs("a", { className: 'wallet-help-link__anchor', href: link, target: '_blank', rel: 'noreferrer', children: [jsxRuntime.jsx(Icon, { style: {
65
- height: '1.5rem',
66
- width: '1.5rem',
67
- } }), jsxRuntime.jsxs(Typography.Typography, { variant: 'button_primary', weight: 'medium', children: ["Install ", capitalize(name), " extension"] })] }) }));
64
+ const WalletHelpLink = ({ name, link, Icon }) => {
65
+ const { t } = reactI18next.useTranslation();
66
+ return (jsxRuntime.jsx("div", { className: 'wallet-help-link', children: jsxRuntime.jsxs("a", { className: 'wallet-help-link__anchor', href: link, target: '_blank', rel: 'noreferrer', children: [jsxRuntime.jsx(Icon, { style: {
67
+ height: '1.5rem',
68
+ width: '1.5rem',
69
+ } }), jsxRuntime.jsx(Typography.Typography, { variant: 'button_primary', weight: 'medium', copykey: 'dyn_qr_code.wallet_not_installed.browser_install', children: t('dyn_qr_code.wallet_not_installed.browser_install', {
70
+ browser: capitalize(name),
71
+ }) })] }) }));
72
+ };
68
73
 
69
74
  exports.WalletHelpLink = WalletHelpLink;
@@ -1,4 +1,5 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { useTranslation } from 'react-i18next';
2
3
  import 'react';
3
4
  import '../../events/dynamicEvents.js';
4
5
  import '@dynamic-labs/utils';
@@ -24,7 +25,6 @@ import 'react-dom';
24
25
  import '../../context/ThemeContext/ThemeContext.js';
25
26
  import '@dynamic-labs/types';
26
27
  import 'yup';
27
- import 'react-i18next';
28
28
  import '../../context/MockContext/MockContext.js';
29
29
  import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
30
30
  import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
@@ -57,9 +57,14 @@ import '../../components/Popper/PopperContext/PopperContext.js';
57
57
  import 'react-focus-lock';
58
58
 
59
59
  const capitalize = (value) => value[0].toUpperCase() + value.slice(1);
60
- const WalletHelpLink = ({ name, link, Icon }) => (jsx("div", { className: 'wallet-help-link', children: jsxs("a", { className: 'wallet-help-link__anchor', href: link, target: '_blank', rel: 'noreferrer', children: [jsx(Icon, { style: {
61
- height: '1.5rem',
62
- width: '1.5rem',
63
- } }), jsxs(Typography, { variant: 'button_primary', weight: 'medium', children: ["Install ", capitalize(name), " extension"] })] }) }));
60
+ const WalletHelpLink = ({ name, link, Icon }) => {
61
+ const { t } = useTranslation();
62
+ return (jsx("div", { className: 'wallet-help-link', children: jsxs("a", { className: 'wallet-help-link__anchor', href: link, target: '_blank', rel: 'noreferrer', children: [jsx(Icon, { style: {
63
+ height: '1.5rem',
64
+ width: '1.5rem',
65
+ } }), jsx(Typography, { variant: 'button_primary', weight: 'medium', copykey: 'dyn_qr_code.wallet_not_installed.browser_install', children: t('dyn_qr_code.wallet_not_installed.browser_install', {
66
+ browser: capitalize(name),
67
+ }) })] }) }));
68
+ };
64
69
 
65
70
  export { WalletHelpLink };
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
+ var reactI18next = require('react-i18next');
6
7
  var utils = require('@dynamic-labs/utils');
7
8
  var walletBook = require('@dynamic-labs/wallet-book');
8
9
  require('react');
@@ -29,7 +30,6 @@ require('react-dom');
29
30
  require('../../context/ThemeContext/ThemeContext.cjs');
30
31
  require('@dynamic-labs/types');
31
32
  require('yup');
32
- require('react-i18next');
33
33
  require('../../context/MockContext/MockContext.cjs');
34
34
  require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
35
35
  require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
@@ -64,14 +64,17 @@ require('react-focus-lock');
64
64
 
65
65
  const PendingConnectView = () => {
66
66
  const { selectedWalletConnector: walletConnector } = useInternalDynamicContext.useInternalDynamicContext();
67
+ const { t } = reactI18next.useTranslation();
67
68
  const iconSize = 94;
68
69
  const icon = (jsxRuntime.jsx(walletBook.WalletIcon, { walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, style: {
69
70
  height: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
70
71
  width: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
71
72
  } }));
72
- return (jsxRuntime.jsxs("div", { className: 'pending-connect__container', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true, className: 'pending-connect__icon-with-spinner' }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: 'pending-connect__copy-text', children: utils.isMobile()
73
- ? 'Click connect in your mobile wallet'
74
- : 'Click connect in your wallet popup' })] }));
73
+ return (jsxRuntime.jsxs("div", { className: 'pending-connect__container', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true, className: 'pending-connect__icon-with-spinner' }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: 'pending-connect__copy-text', copykey: utils.isMobile()
74
+ ? 'dyn_pending_connection.mobile'
75
+ : 'dyn_pending_connection.computer', children: utils.isMobile()
76
+ ? t('dyn_pending_connection.mobile')
77
+ : t('dyn_pending_connection.computer') })] }));
75
78
  };
76
79
 
77
80
  exports.PendingConnectView = PendingConnectView;
@@ -1,4 +1,5 @@
1
1
  import { jsx, jsxs } from 'react/jsx-runtime';
2
+ import { useTranslation } from 'react-i18next';
2
3
  import { isMobile } from '@dynamic-labs/utils';
3
4
  import { WalletIcon } from '@dynamic-labs/wallet-book';
4
5
  import 'react';
@@ -25,7 +26,6 @@ import 'react-dom';
25
26
  import '../../context/ThemeContext/ThemeContext.js';
26
27
  import '@dynamic-labs/types';
27
28
  import 'yup';
28
- import 'react-i18next';
29
29
  import '../../context/MockContext/MockContext.js';
30
30
  import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
31
31
  import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
@@ -60,14 +60,17 @@ import 'react-focus-lock';
60
60
 
61
61
  const PendingConnectView = () => {
62
62
  const { selectedWalletConnector: walletConnector } = useInternalDynamicContext();
63
+ const { t } = useTranslation();
63
64
  const iconSize = 94;
64
65
  const icon = (jsx(WalletIcon, { walletKey: walletConnector === null || walletConnector === void 0 ? void 0 : walletConnector.key, style: {
65
66
  height: pixelToRem(iconSize * iconRatio),
66
67
  width: pixelToRem(iconSize * iconRatio),
67
68
  } }));
68
- return (jsxs("div", { className: 'pending-connect__container', children: [jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true, className: 'pending-connect__icon-with-spinner' }), jsx(Typography, { variant: 'body_normal', weight: 'regular', className: 'pending-connect__copy-text', children: isMobile()
69
- ? 'Click connect in your mobile wallet'
70
- : 'Click connect in your wallet popup' })] }));
69
+ return (jsxs("div", { className: 'pending-connect__container', children: [jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true, className: 'pending-connect__icon-with-spinner' }), jsx(Typography, { variant: 'body_normal', weight: 'regular', className: 'pending-connect__copy-text', copykey: isMobile()
70
+ ? 'dyn_pending_connection.mobile'
71
+ : 'dyn_pending_connection.computer', children: isMobile()
72
+ ? t('dyn_pending_connection.mobile')
73
+ : t('dyn_pending_connection.computer') })] }));
71
74
  };
72
75
 
73
76
  export { PendingConnectView };
@@ -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 walletConnectorCore = require('@dynamic-labs/wallet-connector-core');
9
10
  var walletBook = require('@dynamic-labs/wallet-book');
10
11
  var classNames = require('../../utils/functions/classNames/classNames.cjs');
@@ -33,7 +34,6 @@ require('react-dom');
33
34
  require('../../context/ThemeContext/ThemeContext.cjs');
34
35
  require('@dynamic-labs/types');
35
36
  require('yup');
36
- require('react-i18next');
37
37
  require('../../context/MockContext/MockContext.cjs');
38
38
  require('../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
39
39
  require('../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
@@ -71,6 +71,7 @@ const PendingSignatureView = () => {
71
71
  const [loading, setLoading] = React.useState(false);
72
72
  const { selectedWalletConnector: walletConnector } = useInternalDynamicContext.useInternalDynamicContext();
73
73
  const { signAlreadyConnectedUser } = useConnectAndSignSplitSteps.useConnectAndSignSplitSteps();
74
+ const { t } = reactI18next.useTranslation();
74
75
  const iconSize = 96;
75
76
  /**
76
77
  * The following check on Phantom+Ledger will be fixed in a future ticket.
@@ -96,12 +97,14 @@ const PendingSignatureView = () => {
96
97
  width: pixelToRem.pixelToRem(iconSize * IconWithSpinner.iconRatio),
97
98
  } }));
98
99
  const typographyBodyCopy = isPhantomLedger
99
- ? "Click sign in your wallet to confirm you own this wallet (this doesn't cost gas)."
100
- : 'Click sign-in in your wallet to confirm you own this wallet.';
101
- return (jsxRuntime.jsxs("div", { className: 'pending-signature__container', "data-testid": 'pending-signature-view', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true, indicator: 'connected', className: 'pending-signature__icon-with-spinner' }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: classNames.classNames('pending-signature__copy'), children: typographyBodyCopy }), isPhantomLedger && (jsxRuntime.jsxs(Typography.Typography, { variant: 'body_small', weight: 'regular', className: classNames.classNames('pending-signature__copy', 'pending-signature__copy--mini'), children: [jsxRuntime.jsx("strong", { children: "Note:" }), " Ledger with Phantom doesn\u2019t support message signing. When logging in, a small fee (which should not apply) may appear. See below to learn more."] })), requiresTwoStepAuthentication.requiresTwoStepAuthentication(walletConnector) && (jsxRuntime.jsx(Button.Button, { buttonClassName: 'pending-signature__button', onClick: handleClick, loading: loading, buttonVariant: 'primary', buttonPadding: 'large', expanded: true, typographyProps: {
100
+ ? t('dyn_pending_signature.phantom_ledger_sign')
101
+ : t('dyn_pending_signature.regular_sign_description');
102
+ return (jsxRuntime.jsxs("div", { className: 'pending-signature__container', "data-testid": 'pending-signature-view', children: [jsxRuntime.jsx(IconWithSpinner.IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true, indicator: 'connected', className: 'pending-signature__icon-with-spinner' }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', weight: 'regular', className: classNames.classNames('pending-signature__copy'), copykey: isPhantomLedger
103
+ ? 'dyn_pending_signature.phantom_ledger_sign'
104
+ : 'dyn_pending_signature.regular_sign_description', children: typographyBodyCopy }), isPhantomLedger && (jsxRuntime.jsxs(Typography.Typography, { variant: 'body_small', weight: 'regular', className: classNames.classNames('pending-signature__copy', 'pending-signature__copy--mini'), copykey: 'dyn_pending_signature.phantom_ledger_warning', children: [jsxRuntime.jsx("strong", { children: t('dyn_pending_signature.note') }), t('dyn_pending_signature.phantom_ledger_warning')] })), requiresTwoStepAuthentication.requiresTwoStepAuthentication(walletConnector) && (jsxRuntime.jsx(Button.Button, { buttonClassName: 'pending-signature__button', onClick: handleClick, loading: loading, buttonVariant: 'primary', buttonPadding: 'large', expanded: true, typographyProps: {
102
105
  variant: 'button_primary',
103
106
  weight: 'medium',
104
- }, children: "Click to Sign" }))] }));
107
+ }, copykey: 'dyn_pending_signature.click_to_sign', children: t('dyn_pending_signature.click_to_sign') }))] }));
105
108
  };
106
109
 
107
110
  exports.PendingSignatureView = PendingSignatureView;
@@ -1,6 +1,7 @@
1
1
  import { __awaiter } from '../../../../_virtual/_tslib.js';
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { useState } from 'react';
4
+ import { useTranslation } from 'react-i18next';
4
5
  import { PhantomLedgerWalletName } from '@dynamic-labs/wallet-connector-core';
5
6
  import { WalletIcon } from '@dynamic-labs/wallet-book';
6
7
  import { classNames } from '../../utils/functions/classNames/classNames.js';
@@ -29,7 +30,6 @@ import 'react-dom';
29
30
  import '../../context/ThemeContext/ThemeContext.js';
30
31
  import '@dynamic-labs/types';
31
32
  import 'yup';
32
- import 'react-i18next';
33
33
  import '../../context/MockContext/MockContext.js';
34
34
  import '../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
35
35
  import '../../context/UserFieldEditorContext/UserFieldEditorContext.js';
@@ -67,6 +67,7 @@ const PendingSignatureView = () => {
67
67
  const [loading, setLoading] = useState(false);
68
68
  const { selectedWalletConnector: walletConnector } = useInternalDynamicContext();
69
69
  const { signAlreadyConnectedUser } = useConnectAndSignSplitSteps();
70
+ const { t } = useTranslation();
70
71
  const iconSize = 96;
71
72
  /**
72
73
  * The following check on Phantom+Ledger will be fixed in a future ticket.
@@ -92,12 +93,14 @@ const PendingSignatureView = () => {
92
93
  width: pixelToRem(iconSize * iconRatio),
93
94
  } }));
94
95
  const typographyBodyCopy = isPhantomLedger
95
- ? "Click sign in your wallet to confirm you own this wallet (this doesn't cost gas)."
96
- : 'Click sign-in in your wallet to confirm you own this wallet.';
97
- return (jsxs("div", { className: 'pending-signature__container', "data-testid": 'pending-signature-view', children: [jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true, indicator: 'connected', className: 'pending-signature__icon-with-spinner' }), jsx(Typography, { variant: 'body_normal', weight: 'regular', className: classNames('pending-signature__copy'), children: typographyBodyCopy }), isPhantomLedger && (jsxs(Typography, { variant: 'body_small', weight: 'regular', className: classNames('pending-signature__copy', 'pending-signature__copy--mini'), children: [jsx("strong", { children: "Note:" }), " Ledger with Phantom doesn\u2019t support message signing. When logging in, a small fee (which should not apply) may appear. See below to learn more."] })), requiresTwoStepAuthentication(walletConnector) && (jsx(Button, { buttonClassName: 'pending-signature__button', onClick: handleClick, loading: loading, buttonVariant: 'primary', buttonPadding: 'large', expanded: true, typographyProps: {
96
+ ? t('dyn_pending_signature.phantom_ledger_sign')
97
+ : t('dyn_pending_signature.regular_sign_description');
98
+ return (jsxs("div", { className: 'pending-signature__container', "data-testid": 'pending-signature-view', children: [jsx(IconWithSpinner, { Icon: icon, iconSize: iconSize, isSpinning: true, indicator: 'connected', className: 'pending-signature__icon-with-spinner' }), jsx(Typography, { variant: 'body_normal', weight: 'regular', className: classNames('pending-signature__copy'), copykey: isPhantomLedger
99
+ ? 'dyn_pending_signature.phantom_ledger_sign'
100
+ : 'dyn_pending_signature.regular_sign_description', children: typographyBodyCopy }), isPhantomLedger && (jsxs(Typography, { variant: 'body_small', weight: 'regular', className: classNames('pending-signature__copy', 'pending-signature__copy--mini'), copykey: 'dyn_pending_signature.phantom_ledger_warning', children: [jsx("strong", { children: t('dyn_pending_signature.note') }), t('dyn_pending_signature.phantom_ledger_warning')] })), requiresTwoStepAuthentication(walletConnector) && (jsx(Button, { buttonClassName: 'pending-signature__button', onClick: handleClick, loading: loading, buttonVariant: 'primary', buttonPadding: 'large', expanded: true, typographyProps: {
98
101
  variant: 'button_primary',
99
102
  weight: 'medium',
100
- }, children: "Click to Sign" }))] }));
103
+ }, copykey: 'dyn_pending_signature.click_to_sign', children: t('dyn_pending_signature.click_to_sign') }))] }));
101
104
  };
102
105
 
103
106
  export { PendingSignatureView };
@@ -3,6 +3,7 @@
3
3
  Object.defineProperty(exports, '__esModule', { value: true });
4
4
 
5
5
  var jsxRuntime = require('react/jsx-runtime');
6
+ var reactI18next = require('react-i18next');
6
7
  var MockedQrCode = require('../../../components/MockedQrCode/MockedQrCode.cjs');
7
8
  require('@dynamic-labs/sdk-api');
8
9
  require('../../../shared/logger.cjs');
@@ -33,7 +34,6 @@ require('react-dom');
33
34
  require('../../../context/ThemeContext/ThemeContext.cjs');
34
35
  require('@dynamic-labs/types');
35
36
  require('yup');
36
- require('react-i18next');
37
37
  require('../../../context/MockContext/MockContext.cjs');
38
38
  require('../../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.cjs');
39
39
  require('../../../context/UserFieldEditorContext/UserFieldEditorContext.cjs');
@@ -67,12 +67,15 @@ require('../../../components/Popper/Popper/Popper.cjs');
67
67
  require('../../../components/Popper/PopperContext/PopperContext.cjs');
68
68
  require('react-focus-lock');
69
69
 
70
- const QrCodeContainer = ({ accentColor, walletKey, walletName, qrcodeValue, Icon: WalletIcon, showCopyToClipboardButton = false, desktopUri, showQrCodeMessage, }) => (jsxRuntime.jsxs("div", { className: classNames.classNames('qrcode-container__container', {
71
- 'qrcode-container__container--message': showQrCodeMessage,
72
- }), children: [jsxRuntime.jsxs("div", { className: 'qrcode-container__top', children: [qrcodeValue ? (jsxRuntime.jsx(QRCode.QRCode, { Icon: WalletIcon, accentColor: accentColor, value: qrcodeValue, logoSize: 50, walletKey: walletKey })) : (
73
- // this div exists to give the parent a child, so that the parent
74
- // takes on its given width and height. the result is stable
75
- // rendering of this component, without this there is a brief flash
76
- jsxRuntime.jsx("div", {})), jsxRuntime.jsx(MockedQrCode.MockedQrCode, {}), ((showCopyToClipboardButton && qrcodeValue) || desktopUri) && (jsxRuntime.jsxs("div", { className: 'button-container', children: [showCopyToClipboardButton && qrcodeValue && (jsxRuntime.jsx(CopyButton.CopyButton, { textToCopy: qrcodeValue, children: jsxRuntime.jsxs("div", { className: 'button__content', children: [jsxRuntime.jsx(Icon.Icon, { size: 'small', color: 'text-tertiary', children: jsxRuntime.jsx(link.ReactComponent, {}) }), "Copy QR URI"] }) })), desktopUri && (jsxRuntime.jsxs(TextButton.TextButton, { className: 'desktop-button', onClick: () => window.open(desktopUri), children: [jsxRuntime.jsx(Icon.Icon, { size: 'xsmall', color: 'text-tertiary', children: jsxRuntime.jsx(externalLink.ReactComponent, {}) }), "Open ", walletName, " App"] }))] }))] }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', className: 'qrcode-container__content', children: "Scan this QR code from your mobile wallet or phone's camera to connect." })] }));
70
+ const QrCodeContainer = ({ accentColor, walletKey, walletName, qrcodeValue, Icon: WalletIcon, showCopyToClipboardButton = false, desktopUri, showQrCodeMessage, }) => {
71
+ const { t } = reactI18next.useTranslation();
72
+ return (jsxRuntime.jsxs("div", { className: classNames.classNames('qrcode-container__container', {
73
+ 'qrcode-container__container--message': showQrCodeMessage,
74
+ }), children: [jsxRuntime.jsxs("div", { className: 'qrcode-container__top', children: [qrcodeValue ? (jsxRuntime.jsx(QRCode.QRCode, { Icon: WalletIcon, accentColor: accentColor, value: qrcodeValue, logoSize: 50, walletKey: walletKey })) : (
75
+ // this div exists to give the parent a child, so that the parent
76
+ // takes on its given width and height. the result is stable
77
+ // rendering of this component, without this there is a brief flash
78
+ jsxRuntime.jsx("div", {})), jsxRuntime.jsx(MockedQrCode.MockedQrCode, {}), ((showCopyToClipboardButton && qrcodeValue) || desktopUri) && (jsxRuntime.jsxs("div", { className: 'button-container', children: [showCopyToClipboardButton && qrcodeValue && (jsxRuntime.jsx(CopyButton.CopyButton, { textToCopy: qrcodeValue, copykey: 'dyn_qr_code.copy_button', children: jsxRuntime.jsxs("div", { className: 'button__content', children: [jsxRuntime.jsx(Icon.Icon, { size: 'small', color: 'text-tertiary', children: jsxRuntime.jsx(link.ReactComponent, {}) }), t('dyn_qr_code.copy_button')] }) })), desktopUri && (jsxRuntime.jsxs(TextButton.TextButton, { className: 'desktop-button', onClick: () => window.open(desktopUri), copykey: 'dyn_qr_code.open_button', children: [jsxRuntime.jsx(Icon.Icon, { size: 'xsmall', color: 'text-tertiary', children: jsxRuntime.jsx(externalLink.ReactComponent, {}) }), t('dyn_qr_code.open_button', { wallet: walletName })] }))] }))] }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', className: 'qrcode-container__content', copykey: 'dyn_qr_code.scan_title', children: t('dyn_qr_code.scan_title') })] }));
79
+ };
77
80
 
78
81
  exports.QrCodeContainer = QrCodeContainer;
@@ -1,4 +1,5 @@
1
1
  import { jsxs, jsx } from 'react/jsx-runtime';
2
+ import { useTranslation } from 'react-i18next';
2
3
  import { MockedQrCode } from '../../../components/MockedQrCode/MockedQrCode.js';
3
4
  import '@dynamic-labs/sdk-api';
4
5
  import '../../../shared/logger.js';
@@ -29,7 +30,6 @@ import 'react-dom';
29
30
  import '../../../context/ThemeContext/ThemeContext.js';
30
31
  import '@dynamic-labs/types';
31
32
  import 'yup';
32
- import 'react-i18next';
33
33
  import '../../../context/MockContext/MockContext.js';
34
34
  import '../../../utils/hooks/useUserUpdateRequest/useUpdateUser/useUpdateUser.js';
35
35
  import '../../../context/UserFieldEditorContext/UserFieldEditorContext.js';
@@ -63,12 +63,15 @@ import '../../../components/Popper/Popper/Popper.js';
63
63
  import '../../../components/Popper/PopperContext/PopperContext.js';
64
64
  import 'react-focus-lock';
65
65
 
66
- const QrCodeContainer = ({ accentColor, walletKey, walletName, qrcodeValue, Icon: WalletIcon, showCopyToClipboardButton = false, desktopUri, showQrCodeMessage, }) => (jsxs("div", { className: classNames('qrcode-container__container', {
67
- 'qrcode-container__container--message': showQrCodeMessage,
68
- }), children: [jsxs("div", { className: 'qrcode-container__top', children: [qrcodeValue ? (jsx(QRCode, { Icon: WalletIcon, accentColor: accentColor, value: qrcodeValue, logoSize: 50, walletKey: walletKey })) : (
69
- // this div exists to give the parent a child, so that the parent
70
- // takes on its given width and height. the result is stable
71
- // rendering of this component, without this there is a brief flash
72
- jsx("div", {})), jsx(MockedQrCode, {}), ((showCopyToClipboardButton && qrcodeValue) || desktopUri) && (jsxs("div", { className: 'button-container', children: [showCopyToClipboardButton && qrcodeValue && (jsx(CopyButton, { textToCopy: qrcodeValue, children: jsxs("div", { className: 'button__content', children: [jsx(Icon, { size: 'small', color: 'text-tertiary', children: jsx(SvgLink, {}) }), "Copy QR URI"] }) })), desktopUri && (jsxs(TextButton, { className: 'desktop-button', onClick: () => window.open(desktopUri), children: [jsx(Icon, { size: 'xsmall', color: 'text-tertiary', children: jsx(SvgExternalLink, {}) }), "Open ", walletName, " App"] }))] }))] }), jsx(Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', className: 'qrcode-container__content', children: "Scan this QR code from your mobile wallet or phone's camera to connect." })] }));
66
+ const QrCodeContainer = ({ accentColor, walletKey, walletName, qrcodeValue, Icon: WalletIcon, showCopyToClipboardButton = false, desktopUri, showQrCodeMessage, }) => {
67
+ const { t } = useTranslation();
68
+ return (jsxs("div", { className: classNames('qrcode-container__container', {
69
+ 'qrcode-container__container--message': showQrCodeMessage,
70
+ }), children: [jsxs("div", { className: 'qrcode-container__top', children: [qrcodeValue ? (jsx(QRCode, { Icon: WalletIcon, accentColor: accentColor, value: qrcodeValue, logoSize: 50, walletKey: walletKey })) : (
71
+ // this div exists to give the parent a child, so that the parent
72
+ // takes on its given width and height. the result is stable
73
+ // rendering of this component, without this there is a brief flash
74
+ jsx("div", {})), jsx(MockedQrCode, {}), ((showCopyToClipboardButton && qrcodeValue) || desktopUri) && (jsxs("div", { className: 'button-container', children: [showCopyToClipboardButton && qrcodeValue && (jsx(CopyButton, { textToCopy: qrcodeValue, copykey: 'dyn_qr_code.copy_button', children: jsxs("div", { className: 'button__content', children: [jsx(Icon, { size: 'small', color: 'text-tertiary', children: jsx(SvgLink, {}) }), t('dyn_qr_code.copy_button')] }) })), desktopUri && (jsxs(TextButton, { className: 'desktop-button', onClick: () => window.open(desktopUri), copykey: 'dyn_qr_code.open_button', children: [jsx(Icon, { size: 'xsmall', color: 'text-tertiary', children: jsx(SvgExternalLink, {}) }), t('dyn_qr_code.open_button', { wallet: walletName })] }))] }))] }), jsx(Typography, { variant: 'body_normal', color: 'secondary', weight: 'regular', className: 'qrcode-container__content', copykey: 'dyn_qr_code.scan_title', children: t('dyn_qr_code.scan_title') })] }));
75
+ };
73
76
 
74
77
  export { QrCodeContainer };
@@ -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;