@dynamic-labs/sdk-react-core 4.8.0 → 4.8.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,4 +1,11 @@
1
1
 
2
+ ### [4.8.1](https://github.com/dynamic-labs/dynamic-auth/compare/v4.8.0...v4.8.1) (2025-02-25)
3
+
4
+
5
+ ### Bug Fixes
6
+
7
+ * wc redirect for safari inside iframe ([#8131](https://github.com/dynamic-labs/dynamic-auth/issues/8131)) ([8c74bea](https://github.com/dynamic-labs/dynamic-auth/commit/8c74beae505014eb85be4fd211909709d0a339dd))
8
+
2
9
  ## [4.8.0](https://github.com/dynamic-labs/dynamic-auth/compare/v4.7.2...v4.8.0) (2025-02-25)
3
10
 
4
11
 
package/package.cjs CHANGED
@@ -3,7 +3,7 @@
3
3
 
4
4
  Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
- var version = "4.8.0";
6
+ var version = "4.8.1";
7
7
  var dependencies = {
8
8
  "@dynamic-labs/sdk-api-core": "0.0.628",
9
9
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.js CHANGED
@@ -1,5 +1,5 @@
1
1
  'use client'
2
- var version = "4.8.0";
2
+ var version = "4.8.1";
3
3
  var dependencies = {
4
4
  "@dynamic-labs/sdk-api-core": "0.0.628",
5
5
  "@hcaptcha/react-hcaptcha": "1.4.4",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynamic-labs/sdk-react-core",
3
- "version": "4.8.0",
3
+ "version": "4.8.1",
4
4
  "dependencies": {
5
5
  "@dynamic-labs/sdk-api-core": "0.0.628",
6
6
  "@hcaptcha/react-hcaptcha": "1.4.4",
@@ -14,16 +14,16 @@
14
14
  "yup": "0.32.11",
15
15
  "react-international-phone": "4.2.5",
16
16
  "bs58": "5.0.0",
17
- "@dynamic-labs/assert-package-version": "4.8.0",
18
- "@dynamic-labs/iconic": "4.8.0",
19
- "@dynamic-labs/logger": "4.8.0",
20
- "@dynamic-labs/multi-wallet": "4.8.0",
21
- "@dynamic-labs/rpc-providers": "4.8.0",
22
- "@dynamic-labs/store": "4.8.0",
23
- "@dynamic-labs/types": "4.8.0",
24
- "@dynamic-labs/utils": "4.8.0",
25
- "@dynamic-labs/wallet-book": "4.8.0",
26
- "@dynamic-labs/wallet-connector-core": "4.8.0",
17
+ "@dynamic-labs/assert-package-version": "4.8.1",
18
+ "@dynamic-labs/iconic": "4.8.1",
19
+ "@dynamic-labs/logger": "4.8.1",
20
+ "@dynamic-labs/multi-wallet": "4.8.1",
21
+ "@dynamic-labs/rpc-providers": "4.8.1",
22
+ "@dynamic-labs/store": "4.8.1",
23
+ "@dynamic-labs/types": "4.8.1",
24
+ "@dynamic-labs/utils": "4.8.1",
25
+ "@dynamic-labs/wallet-book": "4.8.1",
26
+ "@dynamic-labs/wallet-connector-core": "4.8.1",
27
27
  "eventemitter3": "5.0.1"
28
28
  },
29
29
  "devDependencies": {
@@ -5,6 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var reactI18next = require('react-i18next');
8
+ var utils = require('@dynamic-labs/utils');
8
9
  require('@dynamic-labs/sdk-api-core');
9
10
  require('../../../shared/logger.cjs');
10
11
  require('@dynamic-labs/iconic');
@@ -14,7 +15,6 @@ var externalLink = require('../../../shared/assets/externalLink.cjs');
14
15
  var link = require('../../../shared/assets/link.cjs');
15
16
  var ViewContext = require('../../../context/ViewContext/ViewContext.cjs');
16
17
  require('@dynamic-labs/wallet-book');
17
- require('@dynamic-labs/utils');
18
18
  require('../../../utils/constants/colors.cjs');
19
19
  require('../../../utils/constants/values.cjs');
20
20
  require('../../../shared/consts/index.cjs');
@@ -107,7 +107,7 @@ const QrCodeContainer = ({ accentColor, walletConnector, qrcodeValue, Icon: Main
107
107
  const downloadLinks = useWalletDownloadLinks.useWalletDownloadLinks(walletConnector);
108
108
  const renderAppOrExtensionButton = () => {
109
109
  if (desktopUri) {
110
- return (jsxRuntime.jsx(TypographyButton.TypographyButton, { expanded: true, dataTestId: 'get-extension-button', buttonPadding: 'small', buttonVariant: 'primary', buttonClassName: 'qr-code-button', onClick: () => window.open(desktopUri), copykey: 'dyn_qr_code.open_button', typographyProps: { variant: 'button_secondary' }, startSlot:
110
+ return (jsxRuntime.jsx(TypographyButton.TypographyButton, { expanded: true, dataTestId: 'get-extension-button', buttonPadding: 'small', buttonVariant: 'primary', buttonClassName: 'qr-code-button', onClick: () => utils.PlatformService.openURL(desktopUri, 'blank'), copykey: 'dyn_qr_code.open_button', typographyProps: { variant: 'button_secondary' }, startSlot:
111
111
  // eslint-disable-next-line react/jsx-wrap-multilines
112
112
  jsxRuntime.jsx(Icon.Icon, { size: 'xsmall', color: 'text-tertiary', children: jsxRuntime.jsx(externalLink.ReactComponent, {}) }), children: t('dyn_qr_code.open_button') }));
113
113
  }
@@ -1,6 +1,7 @@
1
1
  'use client'
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import { useTranslation } from 'react-i18next';
4
+ import { PlatformService } from '@dynamic-labs/utils';
4
5
  import '@dynamic-labs/sdk-api-core';
5
6
  import '../../../shared/logger.js';
6
7
  import '@dynamic-labs/iconic';
@@ -10,7 +11,6 @@ import { ReactComponent as SvgExternalLink } from '../../../shared/assets/extern
10
11
  import { ReactComponent as SvgLink } from '../../../shared/assets/link.js';
11
12
  import { useViewContext } from '../../../context/ViewContext/ViewContext.js';
12
13
  import '@dynamic-labs/wallet-book';
13
- import '@dynamic-labs/utils';
14
14
  import '../../../utils/constants/colors.js';
15
15
  import '../../../utils/constants/values.js';
16
16
  import '../../../shared/consts/index.js';
@@ -103,7 +103,7 @@ const QrCodeContainer = ({ accentColor, walletConnector, qrcodeValue, Icon: Main
103
103
  const downloadLinks = useWalletDownloadLinks(walletConnector);
104
104
  const renderAppOrExtensionButton = () => {
105
105
  if (desktopUri) {
106
- return (jsx(TypographyButton, { expanded: true, dataTestId: 'get-extension-button', buttonPadding: 'small', buttonVariant: 'primary', buttonClassName: 'qr-code-button', onClick: () => window.open(desktopUri), copykey: 'dyn_qr_code.open_button', typographyProps: { variant: 'button_secondary' }, startSlot:
106
+ return (jsx(TypographyButton, { expanded: true, dataTestId: 'get-extension-button', buttonPadding: 'small', buttonVariant: 'primary', buttonClassName: 'qr-code-button', onClick: () => PlatformService.openURL(desktopUri, 'blank'), copykey: 'dyn_qr_code.open_button', typographyProps: { variant: 'button_secondary' }, startSlot:
107
107
  // eslint-disable-next-line react/jsx-wrap-multilines
108
108
  jsx(Icon, { size: 'xsmall', color: 'text-tertiary', children: jsx(SvgExternalLink, {}) }), children: t('dyn_qr_code.open_button') }));
109
109
  }
@@ -119,7 +119,8 @@ const MobileWalletRedirectView = ({ onRetry, }) => {
119
119
  walletLink: undefined,
120
120
  };
121
121
  }, [selectedWalletConnector]);
122
- const openWalletApp = () => walletLink && window.open(walletLink, '_blank', 'noopener,noreferrer');
122
+ const openWalletApp = () => walletLink &&
123
+ utils.PlatformService.openURL(walletLink, 'blank', 'noopener,noreferrer');
123
124
  const makeIcon = (size) => (jsxRuntime.jsx(walletBook.WalletIcon, { icon: selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.metadata.icon, walletKey: selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.key, style: {
124
125
  height: pixelToRem.pixelToRem(size),
125
126
  width: pixelToRem.pixelToRem(size),
@@ -2,7 +2,7 @@
2
2
  import { jsxs, jsx } from 'react/jsx-runtime';
3
3
  import { useMemo } from 'react';
4
4
  import { useTranslation } from 'react-i18next';
5
- import { isIOS, isAndroid, isSamsungBrowser } from '@dynamic-labs/utils';
5
+ import { isIOS, isAndroid, isSamsungBrowser, PlatformService } from '@dynamic-labs/utils';
6
6
  import { WalletIcon } from '@dynamic-labs/wallet-book';
7
7
  import { getWalletLinks } from '@dynamic-labs/wallet-connector-core';
8
8
  import { Icon } from '../../components/Icon/Icon.js';
@@ -115,7 +115,8 @@ const MobileWalletRedirectView = ({ onRetry, }) => {
115
115
  walletLink: undefined,
116
116
  };
117
117
  }, [selectedWalletConnector]);
118
- const openWalletApp = () => walletLink && window.open(walletLink, '_blank', 'noopener,noreferrer');
118
+ const openWalletApp = () => walletLink &&
119
+ PlatformService.openURL(walletLink, 'blank', 'noopener,noreferrer');
119
120
  const makeIcon = (size) => (jsx(WalletIcon, { icon: selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.metadata.icon, walletKey: selectedWalletConnector === null || selectedWalletConnector === void 0 ? void 0 : selectedWalletConnector.key, style: {
120
121
  height: pixelToRem(size),
121
122
  width: pixelToRem(size),
@@ -119,7 +119,7 @@ const UserDeleteAccountView = () => {
119
119
  yield deleteUser();
120
120
  }), [deleteUser, isBackupConfirmed]);
121
121
  const isDeleteEnabled = React.useMemo(() => isBackupConfirmed && confirmText === 'DELETE' && !isLoading, [isBackupConfirmed, confirmText, isLoading]);
122
- return (jsxRuntime.jsx("div", { className: 'delete-account-view', children: jsxRuntime.jsxs("div", { className: 'delete-account-view__content', children: [jsxRuntime.jsx("div", { className: 'warning-section', children: jsxRuntime.jsxs("div", { className: 'warning-icon-container', children: [jsxRuntime.jsx(warningRed.ReactComponent, { className: 'warning-icon' }), jsxRuntime.jsx(exclamation.ReactComponent, { className: 'exclamation-icon' })] }) }), jsxRuntime.jsx("div", { className: 'message-box', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', children: t('dyn_settings.delete_account.description') }) }), jsxRuntime.jsxs("div", { className: 'confirmation-section', children: [jsxRuntime.jsxs("div", { className: 'checkbox-container', children: [jsxRuntime.jsx("input", { type: 'checkbox', checked: isBackupConfirmed, onChange: handleBackupConfirmChange }), jsxRuntime.jsx(Typography.Typography, { className: 'checkbox-text', variant: 'body_small', children: t('dyn_settings.delete_account.backup_confirmation') })] }), jsxRuntime.jsxs("div", { className: 'input-section', children: [jsxRuntime.jsx(Typography.Typography, { className: 'input-label', variant: 'body_small', children: t('dyn_settings.delete_account.type_delete') }), jsxRuntime.jsx(Input.Input, { id: 'delete-confirmation', label: t('dyn_settings.delete_account.type_delete_label'), value: confirmText, onChange: handleConfirmTextChange, placeholder: 'DELETE', variant: 'dense' })] }), error && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'error-1', children: error.message }))] }), jsxRuntime.jsxs("div", { className: 'button-group', children: [jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'cancel-button', buttonVariant: 'primary', type: 'button', onClick: handleCancel, copykey: 'dyn_settings.delete_account.cancel', children: t('dyn_settings.delete_account.cancel') }), jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'delete-button', buttonVariant: 'primary', type: 'submit', onClick: handleDelete, disabled: !isDeleteEnabled, typographyProps: {
122
+ return (jsxRuntime.jsx("div", { className: 'delete-account-view', children: jsxRuntime.jsxs("div", { className: 'delete-account-view__content', children: [jsxRuntime.jsx("div", { className: 'warning-section', children: jsxRuntime.jsxs("div", { className: 'warning-icon-container', children: [jsxRuntime.jsx(warningRed.ReactComponent, { className: 'warning-icon' }), jsxRuntime.jsx(exclamation.ReactComponent, { className: 'exclamation-icon' })] }) }), jsxRuntime.jsx("div", { className: 'message-box', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', children: t('dyn_settings.delete_account.description') }) }), jsxRuntime.jsxs("div", { className: 'confirmation-section', children: [jsxRuntime.jsxs("div", { className: 'checkbox-container', children: [jsxRuntime.jsx("input", { type: 'checkbox', checked: isBackupConfirmed, onChange: handleBackupConfirmChange, "data-testid": 'delete-account-checkbox' }), jsxRuntime.jsx(Typography.Typography, { className: 'checkbox-text', variant: 'body_small', children: t('dyn_settings.delete_account.backup_confirmation') })] }), jsxRuntime.jsxs("div", { className: 'input-section', children: [jsxRuntime.jsx(Typography.Typography, { className: 'input-label', variant: 'body_small', children: t('dyn_settings.delete_account.type_delete') }), jsxRuntime.jsx(Input.Input, { id: 'delete-confirmation', label: t('dyn_settings.delete_account.type_delete_label'), value: confirmText, onChange: handleConfirmTextChange, placeholder: 'DELETE', variant: 'dense', "data-testid": 'delete-account-input' })] }), error && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'error-1', children: error.message }))] }), jsxRuntime.jsxs("div", { className: 'button-group', children: [jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'cancel-button', buttonVariant: 'primary', type: 'button', onClick: handleCancel, copykey: 'dyn_settings.delete_account.cancel', children: t('dyn_settings.delete_account.cancel') }), jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'delete-button', buttonVariant: 'primary', type: 'submit', onClick: handleDelete, disabled: !isDeleteEnabled, typographyProps: {
123
123
  color: isDeleteEnabled ? 'white' : 'tertiary',
124
124
  }, copykey: 'dyn_settings.delete_account.confirm', children: isLoading
125
125
  ? t('dyn_settings.delete_account.deleting')
@@ -115,7 +115,7 @@ const UserDeleteAccountView = () => {
115
115
  yield deleteUser();
116
116
  }), [deleteUser, isBackupConfirmed]);
117
117
  const isDeleteEnabled = useMemo(() => isBackupConfirmed && confirmText === 'DELETE' && !isLoading, [isBackupConfirmed, confirmText, isLoading]);
118
- return (jsx("div", { className: 'delete-account-view', children: jsxs("div", { className: 'delete-account-view__content', children: [jsx("div", { className: 'warning-section', children: jsxs("div", { className: 'warning-icon-container', children: [jsx(SvgWarningRed, { className: 'warning-icon' }), jsx(SvgExclamation, { className: 'exclamation-icon' })] }) }), jsx("div", { className: 'message-box', children: jsx(Typography, { variant: 'body_normal', children: t('dyn_settings.delete_account.description') }) }), jsxs("div", { className: 'confirmation-section', children: [jsxs("div", { className: 'checkbox-container', children: [jsx("input", { type: 'checkbox', checked: isBackupConfirmed, onChange: handleBackupConfirmChange }), jsx(Typography, { className: 'checkbox-text', variant: 'body_small', children: t('dyn_settings.delete_account.backup_confirmation') })] }), jsxs("div", { className: 'input-section', children: [jsx(Typography, { className: 'input-label', variant: 'body_small', children: t('dyn_settings.delete_account.type_delete') }), jsx(Input, { id: 'delete-confirmation', label: t('dyn_settings.delete_account.type_delete_label'), value: confirmText, onChange: handleConfirmTextChange, placeholder: 'DELETE', variant: 'dense' })] }), error && (jsx(Typography, { variant: 'body_small', color: 'error-1', children: error.message }))] }), jsxs("div", { className: 'button-group', children: [jsx(TypographyButton, { buttonClassName: 'cancel-button', buttonVariant: 'primary', type: 'button', onClick: handleCancel, copykey: 'dyn_settings.delete_account.cancel', children: t('dyn_settings.delete_account.cancel') }), jsx(TypographyButton, { buttonClassName: 'delete-button', buttonVariant: 'primary', type: 'submit', onClick: handleDelete, disabled: !isDeleteEnabled, typographyProps: {
118
+ return (jsx("div", { className: 'delete-account-view', children: jsxs("div", { className: 'delete-account-view__content', children: [jsx("div", { className: 'warning-section', children: jsxs("div", { className: 'warning-icon-container', children: [jsx(SvgWarningRed, { className: 'warning-icon' }), jsx(SvgExclamation, { className: 'exclamation-icon' })] }) }), jsx("div", { className: 'message-box', children: jsx(Typography, { variant: 'body_normal', children: t('dyn_settings.delete_account.description') }) }), jsxs("div", { className: 'confirmation-section', children: [jsxs("div", { className: 'checkbox-container', children: [jsx("input", { type: 'checkbox', checked: isBackupConfirmed, onChange: handleBackupConfirmChange, "data-testid": 'delete-account-checkbox' }), jsx(Typography, { className: 'checkbox-text', variant: 'body_small', children: t('dyn_settings.delete_account.backup_confirmation') })] }), jsxs("div", { className: 'input-section', children: [jsx(Typography, { className: 'input-label', variant: 'body_small', children: t('dyn_settings.delete_account.type_delete') }), jsx(Input, { id: 'delete-confirmation', label: t('dyn_settings.delete_account.type_delete_label'), value: confirmText, onChange: handleConfirmTextChange, placeholder: 'DELETE', variant: 'dense', "data-testid": 'delete-account-input' })] }), error && (jsx(Typography, { variant: 'body_small', color: 'error-1', children: error.message }))] }), jsxs("div", { className: 'button-group', children: [jsx(TypographyButton, { buttonClassName: 'cancel-button', buttonVariant: 'primary', type: 'button', onClick: handleCancel, copykey: 'dyn_settings.delete_account.cancel', children: t('dyn_settings.delete_account.cancel') }), jsx(TypographyButton, { buttonClassName: 'delete-button', buttonVariant: 'primary', type: 'submit', onClick: handleDelete, disabled: !isDeleteEnabled, typographyProps: {
119
119
  color: isDeleteEnabled ? 'white' : 'tertiary',
120
120
  }, copykey: 'dyn_settings.delete_account.confirm', children: isLoading
121
121
  ? t('dyn_settings.delete_account.deleting')
@@ -62,7 +62,7 @@ const getExportKeysOption = (connector, providerSettings) => {
62
62
  return;
63
63
  }
64
64
  return () => {
65
- window.open(keyExportUrl, '_blank');
65
+ utils.PlatformService.openURL(keyExportUrl, 'blank');
66
66
  };
67
67
  };
68
68
 
@@ -1,6 +1,6 @@
1
1
  'use client'
2
2
  import { ProviderEnum } from '@dynamic-labs/sdk-api-core';
3
- import { ceil } from '@dynamic-labs/utils';
3
+ import { ceil, PlatformService } from '@dynamic-labs/utils';
4
4
  import { isMagicConnector } from '@dynamic-labs/wallet-connector-core';
5
5
  import '../../../shared/logger.js';
6
6
  import '@dynamic-labs/iconic';
@@ -58,7 +58,7 @@ const getExportKeysOption = (connector, providerSettings) => {
58
58
  return;
59
59
  }
60
60
  return () => {
61
- window.open(keyExportUrl, '_blank');
61
+ PlatformService.openURL(keyExportUrl, 'blank');
62
62
  };
63
63
  };
64
64
 
@@ -5,7 +5,7 @@ Object.defineProperty(exports, '__esModule', { value: true });
5
5
 
6
6
  var jsxRuntime = require('react/jsx-runtime');
7
7
  var walletBook = require('@dynamic-labs/wallet-book');
8
- require('@dynamic-labs/utils');
8
+ var utils = require('@dynamic-labs/utils');
9
9
  require('../../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
10
10
  require('../../../../components/Alert/Alert.cjs');
11
11
  require('react');
@@ -124,7 +124,7 @@ const QrCodeModalView = ({ walletId }) => {
124
124
  // this div exists to give the parent a child, so that the parent
125
125
  // takes on its given width and height. the result is stable
126
126
  // rendering of this component, without this there is a brief flash
127
- jsxRuntime.jsx("div", { "data-testid": 'no-qrcode' })) }) }), jsxRuntime.jsxs("div", { className: 'button__container', children: [(newPrimaryWallet === null || newPrimaryWallet === void 0 ? void 0 : newPrimaryWallet.connector.isWalletConnect) && qrcodeUri && (jsxRuntime.jsxs(CopyButton.CopyButton, { textToCopy: qrcodeUri, children: [jsxRuntime.jsx(Icon.Icon, { size: 'small', color: 'text-tertiary', children: jsxRuntime.jsx(link.ReactComponent, {}) }), "Copy QR URI"] })), desktopUri && (jsxRuntime.jsxs(TextButton.TextButton, { className: 'button--open-app', onClick: () => window.open(desktopUri), children: [jsxRuntime.jsx(Icon.Icon, { size: 'xsmall', color: 'text-tertiary', children: jsxRuntime.jsx(externalLink.ReactComponent, {}) }), "Open ", walletName, " App"] }))] })] }));
127
+ jsxRuntime.jsx("div", { "data-testid": 'no-qrcode' })) }) }), jsxRuntime.jsxs("div", { className: 'button__container', children: [(newPrimaryWallet === null || newPrimaryWallet === void 0 ? void 0 : newPrimaryWallet.connector.isWalletConnect) && qrcodeUri && (jsxRuntime.jsxs(CopyButton.CopyButton, { textToCopy: qrcodeUri, children: [jsxRuntime.jsx(Icon.Icon, { size: 'small', color: 'text-tertiary', children: jsxRuntime.jsx(link.ReactComponent, {}) }), "Copy QR URI"] })), desktopUri && (jsxRuntime.jsxs(TextButton.TextButton, { className: 'button--open-app', onClick: () => utils.PlatformService.openURL(desktopUri, 'blank'), children: [jsxRuntime.jsx(Icon.Icon, { size: 'xsmall', color: 'text-tertiary', children: jsxRuntime.jsx(externalLink.ReactComponent, {}) }), "Open ", walletName, " App"] }))] })] }));
128
128
  };
129
129
 
130
130
  exports.QrCodeModalView = QrCodeModalView;
@@ -1,7 +1,7 @@
1
1
  'use client'
2
2
  import { jsx, jsxs } from 'react/jsx-runtime';
3
3
  import { WalletIcon } from '@dynamic-labs/wallet-book';
4
- import '@dynamic-labs/utils';
4
+ import { PlatformService } from '@dynamic-labs/utils';
5
5
  import '../../../../components/Accordion/components/AccordionItem/AccordionItem.js';
6
6
  import '../../../../components/Alert/Alert.js';
7
7
  import 'react';
@@ -120,7 +120,7 @@ const QrCodeModalView = ({ walletId }) => {
120
120
  // this div exists to give the parent a child, so that the parent
121
121
  // takes on its given width and height. the result is stable
122
122
  // rendering of this component, without this there is a brief flash
123
- jsx("div", { "data-testid": 'no-qrcode' })) }) }), jsxs("div", { className: 'button__container', children: [(newPrimaryWallet === null || newPrimaryWallet === void 0 ? void 0 : newPrimaryWallet.connector.isWalletConnect) && qrcodeUri && (jsxs(CopyButton, { textToCopy: qrcodeUri, children: [jsx(Icon, { size: 'small', color: 'text-tertiary', children: jsx(SvgLink, {}) }), "Copy QR URI"] })), desktopUri && (jsxs(TextButton, { className: 'button--open-app', onClick: () => window.open(desktopUri), children: [jsx(Icon, { size: 'xsmall', color: 'text-tertiary', children: jsx(SvgExternalLink, {}) }), "Open ", walletName, " App"] }))] })] }));
123
+ jsx("div", { "data-testid": 'no-qrcode' })) }) }), jsxs("div", { className: 'button__container', children: [(newPrimaryWallet === null || newPrimaryWallet === void 0 ? void 0 : newPrimaryWallet.connector.isWalletConnect) && qrcodeUri && (jsxs(CopyButton, { textToCopy: qrcodeUri, children: [jsx(Icon, { size: 'small', color: 'text-tertiary', children: jsx(SvgLink, {}) }), "Copy QR URI"] })), desktopUri && (jsxs(TextButton, { className: 'button--open-app', onClick: () => PlatformService.openURL(desktopUri, 'blank'), children: [jsx(Icon, { size: 'xsmall', color: 'text-tertiary', children: jsx(SvgExternalLink, {}) }), "Open ", walletName, " App"] }))] })] }));
124
124
  };
125
125
 
126
126
  export { QrCodeModalView };
@@ -7,27 +7,27 @@ var _tslib = require('../../../../../../_virtual/_tslib.cjs');
7
7
  var jsxRuntime = require('react/jsx-runtime');
8
8
  var React = require('react');
9
9
  var reactI18next = require('react-i18next');
10
+ var utils = require('@dynamic-labs/utils');
11
+ require('../../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
12
+ require('../../../../components/Alert/Alert.cjs');
13
+ require('../../../../events/dynamicEvents.cjs');
14
+ var useDynamicContext = require('../../../../context/DynamicContext/useDynamicContext/useDynamicContext.cjs');
15
+ require('../../../../context/DynamicContext/DynamicContext.cjs');
16
+ require('@dynamic-labs/wallet-connector-core');
17
+ require('../../../../context/CaptchaContext/CaptchaContext.cjs');
18
+ require('../../../../context/ErrorContext/ErrorContext.cjs');
19
+ require('../../../../context/ViewContext/ViewContext.cjs');
10
20
  require('@dynamic-labs/sdk-api-core');
11
21
  var logger = require('../../../../shared/logger.cjs');
12
22
  require('@dynamic-labs/iconic');
13
- require('@dynamic-labs/wallet-connector-core');
14
23
  var arrowLeft = require('../../../../shared/assets/arrow-left.cjs');
15
24
  var check = require('../../../../shared/assets/check.cjs');
16
25
  var externalLink = require('../../../../shared/assets/externalLink.cjs');
17
26
  var unlink = require('../../../../shared/assets/unlink.cjs');
18
- require('../../../../context/ViewContext/ViewContext.cjs');
19
27
  require('@dynamic-labs/wallet-book');
20
- require('@dynamic-labs/utils');
21
28
  require('../../../../utils/constants/colors.cjs');
22
29
  require('../../../../utils/constants/values.cjs');
23
30
  require('../../../../shared/consts/index.cjs');
24
- require('../../../../components/Accordion/components/AccordionItem/AccordionItem.cjs');
25
- require('../../../../components/Alert/Alert.cjs');
26
- require('../../../../events/dynamicEvents.cjs');
27
- var useDynamicContext = require('../../../../context/DynamicContext/useDynamicContext/useDynamicContext.cjs');
28
- require('../../../../context/DynamicContext/DynamicContext.cjs');
29
- require('../../../../context/CaptchaContext/CaptchaContext.cjs');
30
- require('../../../../context/ErrorContext/ErrorContext.cjs');
31
31
  require('@dynamic-labs/multi-wallet');
32
32
  require('react-international-phone');
33
33
  require('../../../../store/state/nonce/nonce.cjs');
@@ -169,10 +169,10 @@ const ConnectedAppsView = ({ name }) => {
169
169
  logger.logger.warn('Error disconnecting app', error);
170
170
  }
171
171
  });
172
- return (jsxRuntime.jsxs("div", { className: 'connected-apps-view', children: [jsxRuntime.jsxs("div", { className: 'header', children: [jsxRuntime.jsx(IconButton.IconButton, { onClick: () => setDynamicWidgetView('settings'), "data-testid": 'back-button', className: 'back-button', type: 'button', children: jsxRuntime.jsx(arrowLeft.ReactComponent, { className: 'arrow-left-icon' }) }), jsxRuntime.jsx(Typography.Typography, { variant: 'title', weight: 'medium', color: 'primary', className: 'title', children: t('global_wallet.connected_apps.title') })] }), jsxRuntime.jsx("div", { className: 'subheader', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'medium', color: 'primary', className: 'title', children: t('global_wallet.connected_apps.subtitle') }) }), connectedApps.length > 0 && (jsxRuntime.jsx("ul", { className: 'connected-apps-list', children: connectedApps.map((app) => (jsxRuntime.jsxs("li", { className: 'connected-app-item', children: [jsxRuntime.jsx("img", { src: app.icon, alt: app.name, className: 'app-icon' }), jsxRuntime.jsx("div", { className: 'app-info', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', children: app.url }) }), jsxRuntime.jsxs("div", { className: 'app-actions', children: [jsxRuntime.jsx(TypographyButton.TypographyButton, { onClick: () => window.open(app.url, '_blank'), buttonVariant: 'tertiary', buttonPadding: 'none', startSlot: jsxRuntime.jsx(externalLink.ReactComponent, {}), typographyProps: {
172
+ return (jsxRuntime.jsxs("div", { className: 'connected-apps-view', children: [jsxRuntime.jsxs("div", { className: 'header', children: [jsxRuntime.jsx(IconButton.IconButton, { onClick: () => setDynamicWidgetView('settings'), "data-testid": 'back-button', className: 'back-button', type: 'button', children: jsxRuntime.jsx(arrowLeft.ReactComponent, { className: 'arrow-left-icon' }) }), jsxRuntime.jsx(Typography.Typography, { variant: 'title', weight: 'medium', color: 'primary', className: 'title', children: t('global_wallet.connected_apps.title') })] }), jsxRuntime.jsx("div", { className: 'subheader', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', weight: 'medium', color: 'primary', className: 'title', children: t('global_wallet.connected_apps.subtitle') }) }), connectedApps.length > 0 && (jsxRuntime.jsx("ul", { className: 'connected-apps-list', children: connectedApps.map((app) => (jsxRuntime.jsxs("li", { className: 'connected-app-item', children: [jsxRuntime.jsx("img", { src: app.icon, alt: app.name, className: 'app-icon' }), jsxRuntime.jsx("div", { className: 'app-info', children: jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', color: 'primary', children: app.url }) }), jsxRuntime.jsxs("div", { className: 'app-actions', children: [jsxRuntime.jsx(TypographyButton.TypographyButton, { onClick: () => utils.PlatformService.openURL(app.url, 'blank'), buttonVariant: 'tertiary', buttonPadding: 'none', startSlot: jsxRuntime.jsx(externalLink.ReactComponent, {}), typographyProps: {
173
173
  color: 'secondary',
174
174
  variant: 'button_secondary',
175
- } }), jsxRuntime.jsx(TypographyButton.TypographyButton, { onClick: () => handleDisconnect(app.topic), buttonVariant: 'tertiary', buttonPadding: 'none', startSlot: jsxRuntime.jsx(unlink.ReactComponent, {}), typographyProps: {
175
+ }, dataTestId: 'open-app-button' }), jsxRuntime.jsx(TypographyButton.TypographyButton, { onClick: () => handleDisconnect(app.topic), buttonVariant: 'tertiary', buttonPadding: 'none', startSlot: jsxRuntime.jsx(unlink.ReactComponent, {}), typographyProps: {
176
176
  color: 'secondary',
177
177
  variant: 'button_secondary',
178
178
  } })] })] }, app.url))) })), showSuccessMessage && (jsxRuntime.jsxs("div", { className: 'success-message', children: [jsxRuntime.jsx(check.ReactComponent, {}), jsxRuntime.jsx(Typography.Typography, { variant: 'body_small', color: 'primary', children: t('global_wallet.connected_apps.success', { name }) })] }))] }));
@@ -3,27 +3,27 @@ import { __awaiter } from '../../../../../../_virtual/_tslib.js';
3
3
  import { jsxs, jsx } from 'react/jsx-runtime';
4
4
  import { useState, useEffect } from 'react';
5
5
  import { useTranslation } from 'react-i18next';
6
+ import { PlatformService } from '@dynamic-labs/utils';
7
+ import '../../../../components/Accordion/components/AccordionItem/AccordionItem.js';
8
+ import '../../../../components/Alert/Alert.js';
9
+ import '../../../../events/dynamicEvents.js';
10
+ import { useDynamicContext } from '../../../../context/DynamicContext/useDynamicContext/useDynamicContext.js';
11
+ import '../../../../context/DynamicContext/DynamicContext.js';
12
+ import '@dynamic-labs/wallet-connector-core';
13
+ import '../../../../context/CaptchaContext/CaptchaContext.js';
14
+ import '../../../../context/ErrorContext/ErrorContext.js';
15
+ import '../../../../context/ViewContext/ViewContext.js';
6
16
  import '@dynamic-labs/sdk-api-core';
7
17
  import { logger } from '../../../../shared/logger.js';
8
18
  import '@dynamic-labs/iconic';
9
- import '@dynamic-labs/wallet-connector-core';
10
19
  import { ReactComponent as SvgArrowLeft } from '../../../../shared/assets/arrow-left.js';
11
20
  import { ReactComponent as SvgCheck } from '../../../../shared/assets/check.js';
12
21
  import { ReactComponent as SvgExternalLink } from '../../../../shared/assets/externalLink.js';
13
22
  import { ReactComponent as SvgUnlink } from '../../../../shared/assets/unlink.js';
14
- import '../../../../context/ViewContext/ViewContext.js';
15
23
  import '@dynamic-labs/wallet-book';
16
- import '@dynamic-labs/utils';
17
24
  import '../../../../utils/constants/colors.js';
18
25
  import '../../../../utils/constants/values.js';
19
26
  import '../../../../shared/consts/index.js';
20
- import '../../../../components/Accordion/components/AccordionItem/AccordionItem.js';
21
- import '../../../../components/Alert/Alert.js';
22
- import '../../../../events/dynamicEvents.js';
23
- import { useDynamicContext } from '../../../../context/DynamicContext/useDynamicContext/useDynamicContext.js';
24
- import '../../../../context/DynamicContext/DynamicContext.js';
25
- import '../../../../context/CaptchaContext/CaptchaContext.js';
26
- import '../../../../context/ErrorContext/ErrorContext.js';
27
27
  import '@dynamic-labs/multi-wallet';
28
28
  import 'react-international-phone';
29
29
  import '../../../../store/state/nonce/nonce.js';
@@ -165,10 +165,10 @@ const ConnectedAppsView = ({ name }) => {
165
165
  logger.warn('Error disconnecting app', error);
166
166
  }
167
167
  });
168
- return (jsxs("div", { className: 'connected-apps-view', children: [jsxs("div", { className: 'header', children: [jsx(IconButton, { onClick: () => setDynamicWidgetView('settings'), "data-testid": 'back-button', className: 'back-button', type: 'button', children: jsx(SvgArrowLeft, { className: 'arrow-left-icon' }) }), jsx(Typography, { variant: 'title', weight: 'medium', color: 'primary', className: 'title', children: t('global_wallet.connected_apps.title') })] }), jsx("div", { className: 'subheader', children: jsx(Typography, { variant: 'body_small', weight: 'medium', color: 'primary', className: 'title', children: t('global_wallet.connected_apps.subtitle') }) }), connectedApps.length > 0 && (jsx("ul", { className: 'connected-apps-list', children: connectedApps.map((app) => (jsxs("li", { className: 'connected-app-item', children: [jsx("img", { src: app.icon, alt: app.name, className: 'app-icon' }), jsx("div", { className: 'app-info', children: jsx(Typography, { variant: 'body_normal', color: 'primary', children: app.url }) }), jsxs("div", { className: 'app-actions', children: [jsx(TypographyButton, { onClick: () => window.open(app.url, '_blank'), buttonVariant: 'tertiary', buttonPadding: 'none', startSlot: jsx(SvgExternalLink, {}), typographyProps: {
168
+ return (jsxs("div", { className: 'connected-apps-view', children: [jsxs("div", { className: 'header', children: [jsx(IconButton, { onClick: () => setDynamicWidgetView('settings'), "data-testid": 'back-button', className: 'back-button', type: 'button', children: jsx(SvgArrowLeft, { className: 'arrow-left-icon' }) }), jsx(Typography, { variant: 'title', weight: 'medium', color: 'primary', className: 'title', children: t('global_wallet.connected_apps.title') })] }), jsx("div", { className: 'subheader', children: jsx(Typography, { variant: 'body_small', weight: 'medium', color: 'primary', className: 'title', children: t('global_wallet.connected_apps.subtitle') }) }), connectedApps.length > 0 && (jsx("ul", { className: 'connected-apps-list', children: connectedApps.map((app) => (jsxs("li", { className: 'connected-app-item', children: [jsx("img", { src: app.icon, alt: app.name, className: 'app-icon' }), jsx("div", { className: 'app-info', children: jsx(Typography, { variant: 'body_normal', color: 'primary', children: app.url }) }), jsxs("div", { className: 'app-actions', children: [jsx(TypographyButton, { onClick: () => PlatformService.openURL(app.url, 'blank'), buttonVariant: 'tertiary', buttonPadding: 'none', startSlot: jsx(SvgExternalLink, {}), typographyProps: {
169
169
  color: 'secondary',
170
170
  variant: 'button_secondary',
171
- } }), jsx(TypographyButton, { onClick: () => handleDisconnect(app.topic), buttonVariant: 'tertiary', buttonPadding: 'none', startSlot: jsx(SvgUnlink, {}), typographyProps: {
171
+ }, dataTestId: 'open-app-button' }), jsx(TypographyButton, { onClick: () => handleDisconnect(app.topic), buttonVariant: 'tertiary', buttonPadding: 'none', startSlot: jsx(SvgUnlink, {}), typographyProps: {
172
172
  color: 'secondary',
173
173
  variant: 'button_secondary',
174
174
  } })] })] }, app.url))) })), showSuccessMessage && (jsxs("div", { className: 'success-message', children: [jsx(SvgCheck, {}), jsx(Typography, { variant: 'body_small', color: 'primary', children: t('global_wallet.connected_apps.success', { name }) })] }))] }));