@dynamic-labs/sdk-react-core 5.12.3 → 5.13.0

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.
@@ -131,7 +131,9 @@ const useWalletCreation = () => {
131
131
  }
132
132
  logger.logger.error('Error creating dynamic waas wallet', error);
133
133
  setShowAuthFlow(true, { ignoreIfIsEmbeddedWidget: false });
134
- clearStackAndPush('backup-unsuccessful');
134
+ clearStackAndPush('backup-unsuccessful', {
135
+ errorMessage: error.message,
136
+ });
135
137
  },
136
138
  });
137
139
  };
@@ -127,7 +127,9 @@ const useWalletCreation = () => {
127
127
  }
128
128
  logger.error('Error creating dynamic waas wallet', error);
129
129
  setShowAuthFlow(true, { ignoreIfIsEmbeddedWidget: false });
130
- clearStackAndPush('backup-unsuccessful');
130
+ clearStackAndPush('backup-unsuccessful', {
131
+ errorMessage: error.message,
132
+ });
131
133
  },
132
134
  });
133
135
  };
@@ -125,7 +125,7 @@ require('../../components/IsBrowser/IsBrowser.cjs');
125
125
  require('../../components/Popper/Popper/Popper.cjs');
126
126
  require('../../components/Popper/PopperContext/PopperContext.cjs');
127
127
 
128
- const BackupUnsuccessfulView = () => {
128
+ const BackupUnsuccessfulView = ({ errorMessage, }) => {
129
129
  var _a, _b;
130
130
  const { t } = reactI18next.useTranslation();
131
131
  const projectSettings = useProjectSettings.useProjectSettings();
@@ -168,7 +168,7 @@ const BackupUnsuccessfulView = () => {
168
168
  position: 'absolute',
169
169
  top: '50%',
170
170
  transform: 'translate(-50%, -50%)',
171
- } })] })] }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', className: 'backup-message', color: 'primary', copykey: 'dyn_waas.backup_unsuccessful.description', children: t('dyn_waas.backup_unsuccessful.description') }), jsxRuntime.jsx("div", { className: classNames.classNames('button-group', {
171
+ } })] })] }), jsxRuntime.jsx(Typography.Typography, { variant: 'body_normal', className: 'backup-message', color: 'primary', copykey: 'dyn_waas.backup_unsuccessful.description', children: t('dyn_waas.backup_unsuccessful.description') }), errorMessage && (jsxRuntime.jsx(Typography.Typography, { variant: 'body_mini', color: 'error-1', className: 'backup-error-message', children: errorMessage })), jsxRuntime.jsx("div", { className: classNames.classNames('button-group', {
172
172
  'button-group--with-help-section': hasContactInfo,
173
173
  }), children: jsxRuntime.jsx(TypographyButton.TypographyButton, { buttonClassName: 'retry-button', buttonVariant: 'brand-primary', type: 'submit', onClick: onTryAgainClick, copykey: 'dyn_waas.backup_unsuccessful.try_again', typographyProps: {
174
174
  color: 'inherit',
@@ -1,3 +1,6 @@
1
1
  import React from 'react';
2
- export declare const BackupUnsuccessfulView: React.FC;
2
+ type BackupUnsuccessfulViewProps = {
3
+ errorMessage?: string;
4
+ };
5
+ export declare const BackupUnsuccessfulView: React.FC<BackupUnsuccessfulViewProps>;
3
6
  export default BackupUnsuccessfulView;
@@ -121,7 +121,7 @@ import '../../components/IsBrowser/IsBrowser.js';
121
121
  import '../../components/Popper/Popper/Popper.js';
122
122
  import '../../components/Popper/PopperContext/PopperContext.js';
123
123
 
124
- const BackupUnsuccessfulView = () => {
124
+ const BackupUnsuccessfulView = ({ errorMessage, }) => {
125
125
  var _a, _b;
126
126
  const { t } = useTranslation();
127
127
  const projectSettings = useProjectSettings();
@@ -164,7 +164,7 @@ const BackupUnsuccessfulView = () => {
164
164
  position: 'absolute',
165
165
  top: '50%',
166
166
  transform: 'translate(-50%, -50%)',
167
- } })] })] }), jsx(Typography, { variant: 'body_normal', className: 'backup-message', color: 'primary', copykey: 'dyn_waas.backup_unsuccessful.description', children: t('dyn_waas.backup_unsuccessful.description') }), jsx("div", { className: classNames('button-group', {
167
+ } })] })] }), jsx(Typography, { variant: 'body_normal', className: 'backup-message', color: 'primary', copykey: 'dyn_waas.backup_unsuccessful.description', children: t('dyn_waas.backup_unsuccessful.description') }), errorMessage && (jsx(Typography, { variant: 'body_mini', color: 'error-1', className: 'backup-error-message', children: errorMessage })), jsx("div", { className: classNames('button-group', {
168
168
  'button-group--with-help-section': hasContactInfo,
169
169
  }), children: jsx(TypographyButton, { buttonClassName: 'retry-button', buttonVariant: 'brand-primary', type: 'submit', onClick: onTryAgainClick, copykey: 'dyn_waas.backup_unsuccessful.try_again', typographyProps: {
170
170
  color: 'inherit',
@@ -3,7 +3,9 @@ export declare const viewToComponentMap: {
3
3
  'access-blocked': import("react").FC;
4
4
  'account-exists': () => JSX.Element;
5
5
  'auth-loading': import("react").FC;
6
- 'backup-unsuccessful': import("react").FC<{}>;
6
+ 'backup-unsuccessful': import("react").FC<{
7
+ errorMessage?: string | undefined;
8
+ }>;
7
9
  'bridge-next-wallet-connection': import("react").FC;
8
10
  'bridge-summary': () => JSX.Element;
9
11
  'bridge-welcome': () => JSX.Element;