fix: unauthed users
Don't call preference get or wallet status (on settings page)
This commit is contained in:
parent
25ed5a9cf6
commit
508f2249ba
2 changed files with 13 additions and 8 deletions
|
@ -169,12 +169,13 @@ function App(props: Props) {
|
|||
};
|
||||
}
|
||||
}, [hasVerifiedEmail, syncEnabled, checkSync]);
|
||||
|
||||
// @if TARGET='app'
|
||||
useEffect(() => {
|
||||
if (hasVerifiedEmail === false) {
|
||||
updatePreferences();
|
||||
}
|
||||
}, [hasVerifiedEmail]);
|
||||
// @endif
|
||||
|
||||
useEffect(() => {
|
||||
if (syncError) {
|
||||
|
|
|
@ -102,12 +102,16 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
|||
}
|
||||
|
||||
componentDidMount() {
|
||||
this.props.updateWalletStatus();
|
||||
getSavedPassword().then(p => {
|
||||
if (p) {
|
||||
this.setState({ storedPassword: true });
|
||||
}
|
||||
});
|
||||
const { isAuthenticated } = this.props;
|
||||
if (isAuthenticated) {
|
||||
this.props.updateWalletStatus();
|
||||
|
||||
getSavedPassword().then(p => {
|
||||
if (p) {
|
||||
this.setState({ storedPassword: true });
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
onKeyFeeChange(newValue: Price) {
|
||||
|
@ -647,7 +651,7 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
|||
</FormField>
|
||||
</fieldset-section>
|
||||
<SettingWalletServer />
|
||||
{/* @endif */}
|
||||
{/* @endif */}
|
||||
</React.Fragment>
|
||||
}
|
||||
/>
|
||||
|
|
Loading…
Add table
Reference in a new issue