Skip to content

Commit

Permalink
Merge pull request #1916 from kaloudis/zeus-1901
Browse files Browse the repository at this point in the history
ZEUS PAY explainer: remove language about LSP if backend doesn't support it
  • Loading branch information
kaloudis committed Dec 21, 2023
2 parents c8cf58b + 27b788b commit b762653
Show file tree
Hide file tree
Showing 2 changed files with 76 additions and 43 deletions.
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

0 comments on commit b762653

Please sign in to comment.