mirror of
https://github.com/trezor/trezor-wallet
synced 2024-12-29 02:18:06 +00:00
Fix flow
This commit is contained in:
parent
83e46bd012
commit
f93eb3bebd
@ -28,9 +28,9 @@ export type SelectedAccountAction = {
|
||||
};
|
||||
|
||||
type AccountStatus = {
|
||||
type: string; // notification type
|
||||
title: string; // notification title
|
||||
message?: string; // notification message
|
||||
type: ?string; // notification type
|
||||
title: ?string; // notification title
|
||||
message?: ?string; // notification message
|
||||
shouldRender: boolean; // should render account page
|
||||
}
|
||||
|
||||
|
@ -19,7 +19,7 @@ type Props = {
|
||||
cancelable?: boolean;
|
||||
title: string;
|
||||
className?: string;
|
||||
message?: string;
|
||||
message?: ?string;
|
||||
actions?: Array<CallbackAction>;
|
||||
close?: typeof NotificationActions.close,
|
||||
loading?: boolean
|
||||
|
@ -7,7 +7,7 @@ import type { Props } from '../../index';
|
||||
// There could be only one account notification
|
||||
export default (props: Props) => {
|
||||
const { network, notification } = props.selectedAccount;
|
||||
if (network && notification.type && notification.type !== 'loader-progress' && notification.type !== 'loader-info') {
|
||||
if (network && notification.type && notification.title && notification.type !== 'loader-progress' && notification.type !== 'loader-info') {
|
||||
if (notification.type === 'backend') {
|
||||
// special case: backend is down
|
||||
// TODO: this is a different component with "auto resolve" button
|
||||
@ -27,7 +27,14 @@ export default (props: Props) => {
|
||||
/>
|
||||
);
|
||||
}
|
||||
return (<Notification type={notification.type} title={notification.title} message={notification.message} />);
|
||||
return (
|
||||
<Notification
|
||||
type={notification.type}
|
||||
title={notification.title}
|
||||
message={notification.message}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
||||
return null;
|
||||
};
|
Loading…
Reference in New Issue
Block a user