review fixes
Set disableMaxKeyFee as a local variable. Removed file info from componentdidmount.
This commit is contained in:
parent
ffb4bf46cc
commit
7546f30f96
4 changed files with 3 additions and 6 deletions
|
@ -17,5 +17,4 @@ export const AUTOPLAY = 'autoplay';
|
|||
export const RESULT_COUNT = 'resultCount';
|
||||
export const OS_NOTIFICATIONS_ENABLED = 'osNotificationsEnabled';
|
||||
export const AUTO_DOWNLOAD = 'autoDownload';
|
||||
export const DISABLE_MAX_KEY_FEE = 'disableMaxKeyFee';
|
||||
export const LOCAL_MAX_KEY_FEE = 'localMaxKeyFee';
|
||||
|
|
|
@ -58,8 +58,7 @@ class FilePage extends React.Component<Props> {
|
|||
];
|
||||
|
||||
componentDidMount() {
|
||||
// eslint-disable-next-line no-unused-vars
|
||||
const { uri, fileInfo, fetchFileInfo, fetchCostInfo, setViewed, isSubscribed } = this.props;
|
||||
const { uri, fetchFileInfo, fetchCostInfo, setViewed, isSubscribed } = this.props;
|
||||
|
||||
if (isSubscribed) {
|
||||
this.removeFromSubscriptionNotifications();
|
||||
|
|
|
@ -31,7 +31,6 @@ const select = state => ({
|
|||
walletEncrypted: selectWalletIsEncrypted(state),
|
||||
osNotificationsEnabled: selectosNotificationsEnabled(state),
|
||||
autoDownload: makeSelectClientSetting(settings.AUTO_DOWNLOAD)(state),
|
||||
disableMaxKeyFee: makeSelectClientSetting(settings.DISABLE_MAX_KEY_FEE)(state),
|
||||
localMaxKeyFee: makeSelectClientSetting(settings.LOCAL_MAX_KEY_FEE)(state),
|
||||
});
|
||||
|
||||
|
|
|
@ -39,7 +39,6 @@ type Props = {
|
|||
updateWalletStatus: () => void,
|
||||
walletEncrypted: boolean,
|
||||
osNotificationsEnabled: boolean,
|
||||
disableMaxKeyFee: boolean,
|
||||
localMaxKeyFee: Price,
|
||||
};
|
||||
|
||||
|
@ -175,13 +174,14 @@ class SettingsPage extends React.PureComponent<Props, State> {
|
|||
walletEncrypted,
|
||||
osNotificationsEnabled,
|
||||
autoDownload,
|
||||
disableMaxKeyFee,
|
||||
localMaxKeyFee,
|
||||
} = this.props;
|
||||
|
||||
const noDaemonSettings = !daemonSettings || Object.keys(daemonSettings).length === 0;
|
||||
const isDarkModeEnabled = currentTheme === 'dark';
|
||||
|
||||
const disableMaxKeyFee = !(daemonSettings && daemonSettings.max_key_fee);
|
||||
|
||||
return (
|
||||
<Page>
|
||||
{noDaemonSettings ? (
|
||||
|
|
Loading…
Reference in a new issue