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 PAY explainer: remove language about LSP if backend doesn't support it #1916

Merged
merged 1 commit into from
Dec 21, 2023
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
1 change: 1 addition & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -898,6 +898,7 @@
"views.Settings.LightningAddress.nostrKeys.changeWarning": "Warning: changing your Nostr keys will delete your pending payments. Please redeem your pending payments before submitting new keys.",
"views.Settings.LightningAddress.explainer1": "To get started with a lightning address you must first have a lightning channel and inbound liquidity.",
"views.Settings.LightningAddress.explainer2": "The easiest way to do so is to purchase a 0-conf channel from our LSP, OLYMPUS by ZEUS. Just generate an invoice and pay yourself from another lightning wallet.",
"views.Settings.LightningAddress.explainer3": "For best results, open up a channel with our node, OLYMPUS by ZEUS.",
"views.Settings.LightningAddress.get0ConfChan": "Get 0-conf channel",
"views.Settings.LightningAddressSettings.title": "Lightning address settings",
"views.Settings.LightningAddressSettings.automaticallyAccept": "Automatically accept payments on startup",
Expand Down
118 changes: 75 additions & 43 deletions views/Settings/LightningAddress/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ import SettingsStore, {
} from '../../../stores/SettingsStore';
import UnitsStore from '../../../stores/UnitsStore';

import BackendUtils from '../../../utils/BackendUtils';
import { localeString } from '../../../utils/LocaleUtils';
import { themeColor } from '../../../utils/ThemeUtils';
import UrlUtils from '../../../utils/UrlUtils';
Expand Down Expand Up @@ -544,61 +545,92 @@ export default class LightningAddress extends React.Component<
'views.Settings.LightningAddress.explainer1'
)}
</Text>
<Text
style={{
...styles.explainer,
color: themeColor('text')
}}
>
{localeString(
'views.Settings.LightningAddress.explainer2'
)}
</Text>
<Text
style={{
...styles.explainer,
color: themeColor('text')
}}
>
{localeString(
'views.Wallet.KeypadPane.lspExplainerFirstChannel'
)}
</Text>
{BackendUtils.supportsLSPs() && (
<Text
style={{
...styles.explainer,
color: themeColor('text')
}}
>
{localeString(
'views.Settings.LightningAddress.explainer2'
)}
</Text>
)}
{BackendUtils.supportsLSPs() && (
<Text
style={{
...styles.explainer,
color: themeColor('text')
}}
>
{localeString(
'views.Wallet.KeypadPane.lspExplainerFirstChannel'
)}
</Text>
)}
{!BackendUtils.supportsLSPs() && (
<Text
style={{
...styles.explainer,
color: themeColor('text')
}}
>
{localeString(
'views.Settings.LightningAddress.explainer3'
)}
</Text>
)}
</View>
<View>
<View
style={{ bottom: 15, margin: 10 }}
>
<Button
title={localeString(
'views.Settings.LightningAddress.get0ConfChan'
BackendUtils.supportsLSPs()
? 'views.Settings.LightningAddress.get0ConfChan'
: 'views.Wallet.Channels.open'
)}
onPress={() => {
UnitsStore.resetUnits();
navigation.navigate(
'Receive',
{
amount: '100000'
}
);
if (
BackendUtils.supportsLSPs()
) {
UnitsStore.resetUnits();
navigation.navigate(
'Receive',
{
amount: '100000'
}
);
} else {
navigation.navigate(
'OpenChannel'
);
}
}}
/>
</View>
<View
style={{ bottom: 15, margin: 10 }}
>
<Button
title={localeString(
'views.LspExplanation.buttonText2'
)}
onPress={() =>
navigation.navigate(
'LspExplanationOverview'
)
}
tertiary
/>
</View>
{BackendUtils.supportsLSPs() && (
<View
style={{
bottom: 15,
margin: 10
}}
>
<Button
title={localeString(
'views.LspExplanation.buttonText2'
)}
onPress={() =>
navigation.navigate(
'LspExplanationOverview'
)
}
tertiary
/>
</View>
)}
<View
style={{ bottom: 15, margin: 10 }}
>
Expand Down