@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
@@ -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 };
@@ -4,7 +4,7 @@ interface IChain {
4
4
  enabled: boolean;
5
5
  name: string;
6
6
  }
7
- export declare const getEnabledChains: (chains: IChain[]) => ("STARK" | "ETH" | "FLOW" | "SOL" | "EVM" | "ALGO" | "ATOM" | "COSMOS")[];
7
+ export declare const getEnabledChains: (chains: IChain[]) => ("STARK" | "ETH" | "FLOW" | "SOL" | "EVM" | "ALGO" | "ATOM" | "COSMOS" | "BTC")[];
8
8
  type BaseGetSupportedWalletOpts = Omit<GetSupportedWalletsOpts, 'isWalletConnectV2Enabled' | 'walletConnectProjectId' | 'chainRpcProviders'>;
9
9
  export declare const getWallets: (props: {
10
10
  getSupportedWalletOpts: BaseGetSupportedWalletOpts;
@@ -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 };
@@ -84,10 +84,13 @@ const DynamicWidgetWalletHeader = ({ variant, }) => {
84
84
  const { supportsFunding, setShowFunding, fundingEnabled } = FundingContext.useFundingContext();
85
85
  const { setDynamicWidgetView, setIsOpen } = DynamicWidgetContext.useWidgetContext();
86
86
  const isSendBalanceEnabled = React.useMemo(() => {
87
+ var _a;
87
88
  const connector = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
88
89
  if (!connector)
89
90
  return false;
90
- return walletConnectorCore.isEmbeddedConnector(connector);
91
+ // @todo: QNTM-804 Remove supported chains check to support other chains
92
+ return (((_a = connector.supportedChains) === null || _a === void 0 ? void 0 : _a.includes('EVM')) &&
93
+ walletConnectorCore.isEmbeddedConnector(connector));
91
94
  }, [primaryWallet]);
92
95
  const handleOnClickSend = () => {
93
96
  if (variant === 'dropdown') {
@@ -76,10 +76,13 @@ const DynamicWidgetWalletHeader = ({ variant, }) => {
76
76
  const { supportsFunding, setShowFunding, fundingEnabled } = useFundingContext();
77
77
  const { setDynamicWidgetView, setIsOpen } = useWidgetContext();
78
78
  const isSendBalanceEnabled = useMemo(() => {
79
+ var _a;
79
80
  const connector = primaryWallet === null || primaryWallet === void 0 ? void 0 : primaryWallet.connector;
80
81
  if (!connector)
81
82
  return false;
82
- return isEmbeddedConnector(connector);
83
+ // @todo: QNTM-804 Remove supported chains check to support other chains
84
+ return (((_a = connector.supportedChains) === null || _a === void 0 ? void 0 : _a.includes('EVM')) &&
85
+ isEmbeddedConnector(connector));
83
86
  }, [primaryWallet]);
84
87
  const handleOnClickSend = () => {
85
88
  if (variant === 'dropdown') {
@@ -1 +0,0 @@
1
- export { useFetchNetworkConfigurations } from './useFetchNetworkConfigurations';