mirror of
https://github.com/trezor/trezor-wallet
synced 2024-11-24 09:18:09 +00:00
Remove "<section/>" from SelectedAccount
This commit is contained in:
parent
d28c49cb08
commit
f9c8324db4
@ -20,7 +20,7 @@ export type Props = StateProps & DispatchProps;
|
|||||||
const SelectedAccount = (props: Props) => {
|
const SelectedAccount = (props: Props) => {
|
||||||
const device = props.wallet.selectedDevice;
|
const device = props.wallet.selectedDevice;
|
||||||
if (!device || !device.state) {
|
if (!device || !device.state) {
|
||||||
return (<section><Notification type="info" title="Loading device..." /></section>);
|
return (<Notification type="info" title="Loading device..." />);
|
||||||
}
|
}
|
||||||
|
|
||||||
const accountState = props.selectedAccount;
|
const accountState = props.selectedAccount;
|
||||||
@ -37,52 +37,40 @@ const SelectedAccount = (props: Props) => {
|
|||||||
// case 1: device is connected but discovery not started yet (probably waiting for auth)
|
// case 1: device is connected but discovery not started yet (probably waiting for auth)
|
||||||
if (device.available) {
|
if (device.available) {
|
||||||
return (
|
return (
|
||||||
<section>
|
<Notification type="info" title="Loading accounts..." />
|
||||||
<Notification type="info" title="Loading accounts..." />
|
|
||||||
</section>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// case 2: device is unavailable (created with different passphrase settings) account cannot be accessed
|
// case 2: device is unavailable (created with different passphrase settings) account cannot be accessed
|
||||||
return (
|
return (
|
||||||
<section>
|
<Notification
|
||||||
<Notification
|
type="info"
|
||||||
type="info"
|
title={`Device ${device.instanceLabel} is unavailable`}
|
||||||
title={`Device ${device.instanceLabel} is unavailable`}
|
message="Change passphrase settings to use this device"
|
||||||
message="Change passphrase settings to use this device"
|
/>
|
||||||
/>
|
|
||||||
</section>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// case 3: device is disconnected
|
// case 3: device is disconnected
|
||||||
return (
|
return (
|
||||||
<section>
|
<Notification
|
||||||
<Notification
|
type="info"
|
||||||
type="info"
|
title={`Device ${device.instanceLabel} is disconnected`}
|
||||||
title={`Device ${device.instanceLabel} is disconnected`}
|
message="Connect device to load accounts"
|
||||||
message="Connect device to load accounts"
|
/>
|
||||||
/>
|
|
||||||
</section>
|
|
||||||
);
|
);
|
||||||
} if (discovery.waitingForBackend) {
|
} if (discovery.waitingForBackend) {
|
||||||
// case 4: backend is not working
|
// case 4: backend is not working
|
||||||
return (
|
return (
|
||||||
<section>
|
<Notification type="warning" title="Backend not working" />
|
||||||
<Notification type="warning" title="Backend not working" />
|
|
||||||
</section>
|
|
||||||
);
|
);
|
||||||
} if (discovery.completed) {
|
} if (discovery.completed) {
|
||||||
// case 5: account not found and discovery is completed
|
// case 5: account not found and discovery is completed
|
||||||
return (
|
return (
|
||||||
<section>
|
<Notification type="warning" title="Account does not exist" />
|
||||||
<Notification type="warning" title="Account does not exist" />
|
|
||||||
</section>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
// case 6: discovery is not completed yet
|
// case 6: discovery is not completed yet
|
||||||
return (
|
return (
|
||||||
<section>
|
<Notification type="info" title="Loading accounts..." />
|
||||||
<Notification type="info" title="Loading accounts..." />
|
|
||||||
</section>
|
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user