Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ZEUS-2343: Clean up connect a node labels #2392

Merged
merged 6 commits into from
Oct 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 9 additions & 9 deletions App.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,8 +45,8 @@ import ContactQR from './views/ContactQR';

// Settings views
import Settings from './views/Settings/Settings';
import NodeConfiguration from './views/Settings/NodeConfiguration';
import Nodes from './views/Settings/Nodes';
import WalletConfiguration from './views/Settings/WalletConfiguration';
import Wallets from './views/Settings/Wallets';
import Privacy from './views/Settings/Privacy';
import Security from './views/Settings/Security';
import SetPassword from './views/Settings/SetPassword';
Expand Down Expand Up @@ -77,7 +77,7 @@ import PaymentsSettings from './views/Settings/PaymentsSettings';
import InvoicesSettings from './views/Settings/InvoicesSettings';
import LSP from './views/Settings/LSP';
import ChannelsSettings from './views/Settings/ChannelsSettings';
import SetNodePicture from './views/Settings/SetNodePicture';
import SetWalletPicture from './views/Settings/SetWalletPicture';

// Lightning address
import LightningAddress from './views/Settings/LightningAddress';
Expand Down Expand Up @@ -341,14 +341,14 @@ export default class App extends React.PureComponent {
component={Tools}
/>
<Stack.Screen
name="NodeConfiguration" // @ts-ignore:next-line
name="WalletConfiguration" // @ts-ignore:next-line
component={
NodeConfiguration
WalletConfiguration
}
/>
<Stack.Screen
name="Nodes" // @ts-ignore:next-line
component={Nodes}
name="Wallets" // @ts-ignore:next-line
component={Wallets}
/>
<Stack.Screen
name="Privacy" // @ts-ignore:next-line
Expand Down Expand Up @@ -831,9 +831,9 @@ export default class App extends React.PureComponent {
}
/>
<Stack.Screen
name="SetNodePicture" // @ts-ignore:next-line
name="SetWalletPicture" // @ts-ignore:next-line
component={
SetNodePicture
SetWalletPicture
}
/>
<Stack.Screen
Expand Down
4 changes: 2 additions & 2 deletions components/WalletHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ export default class WalletHeader extends React.Component<
const NodeButton = () => (
<TouchableOpacity
onPress={() =>
protectedNavigation(navigation, 'Nodes', undefined, {
protectedNavigation(navigation, 'Wallets', undefined, {
animation: 'slide_from_right'
})
}
Expand Down Expand Up @@ -558,7 +558,7 @@ export default class WalletHeader extends React.Component<
fontSize: 16
}}
onPress={() => {
navigation.navigate('Nodes');
navigation.navigate('Wallets');
}}
>
{PrivacyUtils.sensitiveValue(
Expand Down
29 changes: 14 additions & 15 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -220,8 +220,8 @@
"views.Routing.RoutingEvent.title": "You received",
"views.Routing.SetFees": "Your node fees",
"views.Routing.channelFees": "Edit channel fees",
"views.Settings.WalletConfiguration.title": "Wallet Configuration",
"views.Settings.AddEditNode.certificateButton": "Certificate Install Instructions",
"views.Settings.AddEditNode.nodeConfig": "Node Configuration",
"views.Settings.AddEditNode.connectionStringClipboard": "Detected the following connection string in your clipboard",
"views.Settings.AddEditNode.import": "Import",
"views.Settings.AddEditNode.importPrompt": "Would you like to import it?",
Expand All @@ -230,7 +230,7 @@
"views.Settings.AddEditNode.lndhubUnderstand": "I understand, create my account",
"views.Settings.AddEditNode.certificateWarning1": "Opting not to use Certificate Verification may leave you vulnerable to a man-in-the-middle attack. Do so at your own discretion.",
"views.Settings.AddEditNode.certificateWarning2": "If you're not verifying your connection with a VPN or Tor v3 hidden service configuration, we strongly advise you install your node's certificate on this device.",
"views.Settings.AddEditNode.certificateUnderstand": "I understand, save node config",
"views.Settings.WalletConfiguration.certificateUnderstand": "I understand, save wallet config",
"views.Settings.AddEditNode.existingAccount": "Existing Account",
"views.Settings.AddEditNode.username": "Username",
"views.Settings.AddEditNode.password": "Password",
Expand All @@ -244,19 +244,19 @@
"views.Settings.AddEditNode.rune": "Rune",
"views.Settings.AddEditNode.certificateVerification": "Certificate Verification",
"views.Settings.AddEditNode.createLndhub": "Create LNDHub account",
"views.Settings.AddEditNode.saveNode": "Save Node Config",
"views.Settings.AddEditNode.setNodeActive": "Set Node Config as Active",
"views.Settings.AddEditNode.nodeActive": "Node Active",
"views.Settings.WalletConfiguration.saveWallet": "Save Wallet Config",
"views.Settings.WalletConfiguration.setWalletActive": "Set Wallet Config as Active",
"views.Settings.WalletConfiguration.walletActive": "Wallet Active",
"views.Settings.AddEditNode.scanLndconnect": "Scan lndconnect config",
"views.Settings.AddEditNode.scanLnc": "Scan LNC QR from Lightning Terminal",
"views.Settings.AddEditNode.scanCLightningRest": "Scan c-lightning-REST QR",
"views.Settings.AddEditNode.scanBtcpay": "Scan BTCPay config",
"views.Settings.AddEditNode.scanLndhub": "Scan LNDHub QR",
"views.Settings.AddEditNode.scanSpark": "Scan Spark QR",
"views.Settings.AddEditNode.deleteNode": "Delete Node config",
"views.Settings.WalletConfiguration.deleteWallet": "Delete Wallet Config",
"views.Settings.AddEditNode.tapToConfirm": "Tap to confirm",
"views.Settings.AddEditNode.duplicateNode": "Duplicate Node Config",
"views.Settings.AddEditNode.nodeInterface": "Node interface",
"views.Settings.WalletConfiguration.duplicateWallet": "Duplicate Wallet Config",
"views.Settings.WalletConfiguration.walletInterface": "Wallet interface",
"views.Settings.AddEditNode.useTor": "Use Tor",
"views.Settings.AddEditNode.pairingPhrase": "Pairing Phrase",
"views.Settings.AddEditNode.mailboxServer": "Mailbox Server",
Expand All @@ -271,8 +271,8 @@
"views.Settings.CertInstallInstructions.graph3": "Alternatively, you can provision a profile with the certificate for your phone in XCode.",
"views.Settings.CertInstallInstructions.graph4": "You can access the certificate at any time in Settings > General > Profiles and remove it if required.",
"views.Settings.CertInstallInstructions.graph5": "If you're connecting to your node via an external hostname or via Tor you must add the hostname to the certificate. lnd provides an option to do this with the TLSExtraDomain option in its config. You'll have to delete and regenerate the certificate after you make the change.",
"views.Settings.Nodes.title": "Nodes",
"views.Settings.Nodes.noNodes": "No Nodes",
"views.Settings.Wallets.title": "Wallets",
"views.Settings.Wallets.noWallets": "No wallets",
"views.Settings.security": "Security",
"views.Settings.Security.title": "Security settings",
"views.Settings.Security.deletePIN": "Delete PIN",
Expand Down Expand Up @@ -767,7 +767,7 @@
"views.Settings.SetPassword.deletePassword": "Delete Password",
"views.Settings.SetDuressPassword.title": "Set / Change Duress Password",
"views.Settings.SetDuressPassword.deletePassword": "Delete Duress Password",
"views.Settings.SetDuressPassword.duressPasswordExplanation": "Once set, you can enter your duress password on the login screen to delete all of your node configurations.",
"views.Settings.SetDuressPassword.duressPasswordExplanation": "Once set, you can enter your duress password on the login screen to delete all of your wallet configurations.",
"views.Settings.SetPin.title": "Set / Change PIN",
"views.Settings.Security.FaceID.title": "FaceID",
"views.Settings.Security.TouchID.title": "TouchID",
Expand All @@ -781,9 +781,9 @@
"views.Settings.SetPin.scramblePin": "The order of numbers on the PIN Pad is randomized to prevent against attacks",
"views.Settings.SetDuressPin.title": "Set / Change Duress PIN",
"views.Settings.SetDuressPin.createDuressPin": "Create your Duress PIN",
"views.Settings.SetDuressPin.duressPinExplanation": "Once set, you can enter your duress PIN on the PIN login screen to delete all of your node configurations.",
"views.Settings.SetDuressPin.duressPinExplanation": "Once set, you can enter your duress PIN on the PIN login screen to delete all of your wallet configurations.",
"views.Settings.SetDuressPin.confirmDuressPin": "Confirm your Duress PIN",
"views.Settings.connectNode": "Connect a node",
"views.Settings.createConnectWallet": "Create or connect a wallet",
"views.Settings.Help.docs": "Zeus Documentation",
"views.Settings.Help.github": "GitHub Issues",
"views.Settings.Help.telegram": "Telegram (we will not DM you)",
Expand Down Expand Up @@ -974,7 +974,6 @@
"views.Sponsors.title": "Sponsors",
"views.Gods.title": "Gods",
"views.Mortals.title": "Mortals",
"views.Splash.scanConfig": "Scan node config",
"views.BumpFee.title": "Speed up transaction",
"views.BumpFee.titleAlt": "Speed up channel open",
"views.BumpFee.targetConfs": "Target confirmations",
Expand Down Expand Up @@ -1054,7 +1053,7 @@
"stores.SettingsStore.btcPayImplementationSupport": "Sorry, we currently only support BTCPay instances using lnd or c-lightning",
"stores.SettingsStore.btcPayFetchConfigError": "Error fetching BTCPay configuration",
"stores.SettingsStore.olympianFetchError": "Error fetching Olympians",
"stores.SettingsStore.lndhubSuccess": "Successfully created LNDHub account. Record the username and password somewhere so you can restore your funds if something happens to your device. Then hit Save Node Config to continue.",
"stores.SettingsStore.lndhubSuccess": "Successfully created LNDHub account. Record the username and password somewhere so you can restore your funds if something happens to your device. Then hit Save Wallet Config to continue.",
"stores.SettingsStore.lndhubError": "Error creating LNDHub account. Please check the host and try again.",
"stores.SettingsStore.lndhubLoginError": "Failed to log in to LNDHub server",
"stores.SettingsStore.lncConnectError": "Failed to connect the LNC client to the proxy server",
Expand Down
12 changes: 6 additions & 6 deletions utils/handleAnything.ts
Original file line number Diff line number Diff line change
Expand Up @@ -207,7 +207,7 @@ const handleAnything = async (

if (host && port && macaroonHex) {
return [
'NodeConfiguration',
'WalletConfiguration',
{
node: {
host,
Expand All @@ -234,7 +234,7 @@ const handleAnything = async (

if (host && port && rune) {
return [
'NodeConfiguration',
'WalletConfiguration',
{
node: {
host,
Expand Down Expand Up @@ -263,7 +263,7 @@ const handleAnything = async (

if (pairingPhrase && mailboxServer) {
return [
'NodeConfiguration',
'WalletConfiguration',
{
node: {
pairingPhrase,
Expand All @@ -286,7 +286,7 @@ const handleAnything = async (
if (isClipboardValue) return true;
const node = ConnectionFormatUtils.processLndConnectUrl(value);
return [
'NodeConfiguration',
'WalletConfiguration',
{
node,
enableTor: node.host && node.host.includes('.onion'),
Expand Down Expand Up @@ -321,7 +321,7 @@ const handleAnything = async (
};
}
return [
'NodeConfiguration',
'WalletConfiguration',
{
node,
newEntry: true
Expand Down Expand Up @@ -462,7 +462,7 @@ const handleAnything = async (
}

return [
'NodeConfiguration',
'WalletConfiguration',
{
node,
enableTor: node.host && node.host.includes('.onion'),
Expand Down
2 changes: 1 addition & 1 deletion views/Lockscreen.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ export default class Lockscreen extends React.Component<
SettingsStore.settings.selectNodeOnStartup &&
SettingsStore.initialStart
) {
navigation.navigate('Nodes');
navigation.navigate('Wallets');
} else {
navigation.pop();
}
Expand Down
8 changes: 5 additions & 3 deletions views/Menu.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -153,7 +153,7 @@ export default class Menu extends React.Component<MenuProps, MenuState> {
>
{selectedNode ? (
<TouchableOpacity
onPress={() => navigation.navigate('Nodes')}
onPress={() => navigation.navigate('Wallets')}
>
<View
style={{
Expand Down Expand Up @@ -222,7 +222,7 @@ export default class Menu extends React.Component<MenuProps, MenuState> {
<TouchableOpacity
style={styles.columnField}
onPress={() =>
navigation.navigate('NodeConfiguration', {
navigation.navigate('WalletConfiguration', {
newEntry: true,
index: 0
})
Expand All @@ -241,7 +241,9 @@ export default class Menu extends React.Component<MenuProps, MenuState> {
color: themeColor('highlight')
}}
>
{localeString('views.Settings.connectNode')}
{localeString(
'views.Settings.createConnectWallet'
)}
</Text>
<View style={styles.ForwardArrow}>
<ForwardIcon stroke={forwardArrowColor} />
Expand Down
2 changes: 1 addition & 1 deletion views/Settings/CustodialWalletWarning.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -191,7 +191,7 @@ export default class CustodialWalletWarning extends React.Component<
'views.Settings.CustodialWalletWarning.create'
)}
onPress={() => {
navigation.navigate('NodeConfiguration', {
navigation.navigate('WalletConfiguration', {
newEntry: true,
index:
(nodes &&
Expand Down
2 changes: 1 addition & 1 deletion views/Settings/LSP.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export default class LSP extends React.Component<LSPProps, LSPState> {
)}
onPress={() =>
navigation.navigate(
'NodeConfiguration',
'WalletConfiguration',
{
node: nodes[
selectedNode || 0
Expand Down
6 changes: 3 additions & 3 deletions views/Settings/SeedRecovery.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ export default class SeedRecovery extends React.PureComponent<
}
}

saveNodeConfiguration = (recoveryCipherSeed?: string) => {
saveWalletConfiguration = (recoveryCipherSeed?: string) => {
const { SettingsStore, navigation } = this.props;
const {
walletPassword,
Expand Down Expand Up @@ -248,7 +248,7 @@ export default class SeedRecovery extends React.PureComponent<
setConnectingStatus(true);
navigation.popTo('Wallet', { refresh: true });
} else {
navigation.popTo('Nodes', { refresh: true });
navigation.popTo('Wallets', { refresh: true });
}
});
};
Expand Down Expand Up @@ -740,7 +740,7 @@ export default class SeedRecovery extends React.PureComponent<
network.slice(1)
});

this.saveNodeConfiguration(
this.saveWalletConfiguration(
recoveryCipherSeed
);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,21 +26,21 @@ import Button from '../../components/Button';

import { localeString } from '../../utils/LocaleUtils';

interface SetNodePictureProps {
interface SetWalletPictureProps {
navigation: StackNavigationProp<any, any>;
route: Route<'SetNodePicture', { implementation: string }>;
route: Route<'SetWalletPicture', { implementation: string }>;
}

interface SetNodePictureState {
interface SetWalletPictureState {
images: string[];
photo: string;
}

export default class SetNodePicture extends React.Component<
SetNodePictureProps,
SetNodePictureState
export default class SetWalletPicture extends React.Component<
SetWalletPictureProps,
SetWalletPictureState
> {
constructor(props: SetNodePictureProps) {
constructor(props: SetWalletPictureProps) {
super(props);
const implementation = this.props.route.params?.implementation;
let images: string[] = [
Expand Down Expand Up @@ -154,7 +154,7 @@ export default class SetNodePicture extends React.Component<
onChoosePicturePress = async () => {
const { navigation } = this.props;

navigation.popTo('NodeConfiguration', {
navigation.popTo('WalletConfiguration', {
photo: this.state.photo,
saved: false
});
Expand All @@ -179,7 +179,7 @@ export default class SetNodePicture extends React.Component<
leftComponent="Back"
centerComponent={{
text: localeString(
'views.SetNodePicture.choosePicture'
'views.SetWalletPicture.choosePicture'
),
style: {
color: themeColor('text'),
Expand Down Expand Up @@ -251,7 +251,7 @@ export default class SetNodePicture extends React.Component<
/>

<Button
title={localeString('views.SetNodePicture.choosePicture')}
title={localeString('views.SetWalletPicture.choosePicture')}
onPress={() => {
this.onChoosePicturePress();
}}
Expand Down
Loading
Loading