diff --git a/backends/CLightningREST.ts b/backends/CLightningREST.ts index 1778b274e..b5744c389 100644 --- a/backends/CLightningREST.ts +++ b/backends/CLightningREST.ts @@ -89,7 +89,7 @@ export default class CLightningREST extends LND { id: data.id, satoshis: data.satoshis, feeRate: data.sat_per_byte, - annnounce: data.announce, + announce: !data.private ? 'true' : 'false', minfConf: data.min_confs, utxos: data.utxos }; @@ -98,7 +98,7 @@ export default class CLightningREST extends LND { id: data.id, satoshis: data.satoshis, feeRate: data.sat_per_byte, - annnounce: data.announce, + announce: !data.private ? 'true' : 'false', minfConf: data.min_confs }; } diff --git a/components/Touchable.tsx b/components/Touchable.tsx index fe98e5a0b..987730643 100644 --- a/components/Touchable.tsx +++ b/components/Touchable.tsx @@ -1,5 +1,5 @@ import React from 'react'; -import { Pressable, TouchableOpacity, View } from 'react-native'; +import { Pressable, TouchableOpacity } from 'react-native'; interface TouchableProps { touch: () => void; diff --git a/models/OpenChannelRequest.ts b/models/OpenChannelRequest.ts index 87a758471..140dab2da 100644 --- a/models/OpenChannelRequest.ts +++ b/models/OpenChannelRequest.ts @@ -15,13 +15,11 @@ export default class OpenChannelRequest extends BaseModel { public host: string; public id?: string; public satoshis?: string; - public announce?: boolean; public utxos?: string[]; constructor(data?: any) { super(data); this.id = data.node_pubkey_string || data.node_pubkey; this.satoshis = data.local_funding_amount; - this.announce = !data.private; } } diff --git a/views/Lockscreen.tsx b/views/Lockscreen.tsx index cde056df0..0a5e29d3c 100644 --- a/views/Lockscreen.tsx +++ b/views/Lockscreen.tsx @@ -1,18 +1,18 @@ import * as React from 'react'; import { ScrollView, StyleSheet, Text, View } from 'react-native'; import { inject, observer } from 'mobx-react'; +import { Header, Icon } from 'react-native-elements'; import Button from './../components/Button'; +import Pin from './../components/Pin'; import { ErrorMessage } from './../components/SuccessErrorMessage'; import TextInput from './../components/TextInput'; +import SettingsStore from './../stores/SettingsStore'; + import LinkingUtils from './../utils/LinkingUtils'; import { localeString } from './../utils/LocaleUtils'; - -import SettingsStore from './../stores/SettingsStore'; -import Pin from './../components/Pin'; import { themeColor } from './../utils/ThemeUtils'; -import { Header, Icon } from 'react-native-elements'; interface LockscreenProps { navigation: any; @@ -70,7 +70,7 @@ export default class Lockscreen extends React.Component< const deletePin: boolean = navigation.getParam('deletePin'); const deleteDuressPin: boolean = navigation.getParam('deleteDuressPin'); - if (!!settings.authenticationAttempts) { + if (settings.authenticationAttempts) { this.setState({ authenticationAttempts: settings.authenticationAttempts }); @@ -185,7 +185,7 @@ export default class Lockscreen extends React.Component< duressPassphrase: updatedSettings?.duressPassphrase, pin: updatedSettings?.pin, duressPin: updatedSettings?.duressPin, - authenticationAttempts: authenticationAttempts, + authenticationAttempts, fiat: updatedSettings?.fiat, locale: updatedSettings?.locale, privacy: updatedSettings?.privacy @@ -324,7 +324,7 @@ export default class Lockscreen extends React.Component< const { passphrase, authenticationAttempts } = this.state; let incorrect = ''; - if (!!passphrase) { + if (passphrase) { incorrect = localeString('views.Lockscreen.incorrect'); } else { incorrect = localeString('views.Lockscreen.incorrectPin'); @@ -340,18 +340,16 @@ export default class Lockscreen extends React.Component< }; render() { - const { navigation, SettingsStore } = this.props; + const { navigation } = this.props; const { passphrase, passphraseAttempt, pin, - pinAttempt, hidden, error, modifySecurityScreen, deletePin, - deleteDuressPin, - authenticationAttempts + deleteDuressPin } = this.state; const BackButton = () => ( diff --git a/views/OpenChannel.tsx b/views/OpenChannel.tsx index 9ebc1777d..a52b21173 100644 --- a/views/OpenChannel.tsx +++ b/views/OpenChannel.tsx @@ -213,11 +213,11 @@ export default class OpenChannel extends React.Component< host, sat_per_byte, suggestImport, - utxoBalance + utxoBalance, + private } = this.state; const { implementation, settings } = SettingsStore; const { privacy } = settings; - const privateChannel = this.state.private; const enableMempoolRates = privacy && privacy.enableMempoolRates; const { @@ -484,10 +484,10 @@ export default class OpenChannel extends React.Component< {localeString('views.OpenChannel.private')} this.setState({ - private: !privateChannel + private: !private }) } trackColor={{ diff --git a/views/Settings/AddEditNode.tsx b/views/Settings/AddEditNode.tsx index cdfd8d42a..ba1e23a0b 100644 --- a/views/Settings/AddEditNode.tsx +++ b/views/Settings/AddEditNode.tsx @@ -239,8 +239,7 @@ export default class AddEditNode extends React.Component< index } = this.state; const { setSettings, settings } = SettingsStore; - const { privacy, passphrase, fiat, locale } = settings; - const lurkerMode = (privacy && privacy.lurkerMode) || false; + const { passphrase, fiat, locale } = settings; if ( implementation === 'lndhub' && diff --git a/views/Settings/Security.tsx b/views/Settings/Security.tsx index 478b3a3d0..3fa5394fa 100644 --- a/views/Settings/Security.tsx +++ b/views/Settings/Security.tsx @@ -1,10 +1,11 @@ import * as React from 'react'; import { FlatList, View } from 'react-native'; import { Header, Icon, ListItem } from 'react-native-elements'; + +import stores from '../../stores/Stores'; + import { localeString } from './../../utils/LocaleUtils'; import { themeColor } from './../../utils/ThemeUtils'; -import stores from '../../stores/Stores'; -import { useEffect, useState } from 'react'; interface SecurityProps { navigation: any; diff --git a/views/Settings/SetDuressPin.tsx b/views/Settings/SetDuressPin.tsx index 1e6462c37..f6764843b 100644 --- a/views/Settings/SetDuressPin.tsx +++ b/views/Settings/SetDuressPin.tsx @@ -119,12 +119,8 @@ export default class SetDuressPin extends React.Component< render() { const { navigation } = this.props; - const { - duressPin, - duressPinConfirm, - duressPinMismatchError, - duressPinInvalidError - } = this.state; + const { duressPin, duressPinMismatchError, duressPinInvalidError } = + this.state; const BackButton = () => ( { render() { const { navigation } = this.props; - const { pin, pinConfirm, pinMismatchError, pinInvalidError } = - this.state; + const { pin, pinMismatchError, pinInvalidError } = this.state; const BackButton = () => (