fix: unauthed users

Don't call preference get or wallet status (on settings page)
This commit is contained in:
Thomas Zarebczan 2019-12-14 11:12:33 -05:00
parent 25ed5a9cf6
commit 508f2249ba
2 changed files with 13 additions and 8 deletions

View file

@ -169,12 +169,13 @@ function App(props: Props) {
};
}
}, [hasVerifiedEmail, syncEnabled, checkSync]);
// @if TARGET='app'
useEffect(() => {
if (hasVerifiedEmail === false) {
updatePreferences();
}
}, [hasVerifiedEmail]);
// @endif
useEffect(() => {
if (syncError) {

View file

@ -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>
}
/>