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

LSPS7: Channel lease extensions #2720

Open
wants to merge 21 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
c55b7fa
Refactor LSPS1 code + wire up lsps7.get_extendable_channels call
kaloudis Jan 9, 2025
a19da8c
Channel: fix shortChannelId
kaloudis Jan 10, 2025
9f7bea7
LSPS: custom message listener on start-up
kaloudis Jan 10, 2025
05f3d8f
LSPS7: Single channel view
kaloudis Jan 10, 2025
c628e54
Views: move LSPS1 dir
kaloudis Jan 10, 2025
bb5f9d5
LSPS7: wire up Create Order view
kaloudis Jan 11, 2025
0c4965c
LSPS7: Create Order: fix params
kaloudis Jan 13, 2025
dfe2b34
LSPS7: adds months to expiry display
kaloudis Jan 13, 2025
63a3847
LSPS7: Create Order + Get Order
kaloudis Jan 14, 2025
ad97b78
LSPS7: separate loading state from LSPS1
kaloudis Jan 14, 2025
afee3bf
LSPS7: add expiration status to Channels list
kaloudis Jan 14, 2025
5a1cea8
DateTimeUtils: blocksToMonthsAndDays tests
kaloudis Jan 14, 2025
fb089d5
LSPS7: enable custom messages for remote LND nodes
kaloudis Jan 17, 2025
db7d785
Localize channel statuses
kaloudis Jan 17, 2025
bc708f3
LSPS7: Create order: add block heights
kaloudis Jan 17, 2025
ce35f5d
Channel: SCID: handle undefined chanIds (Pending open chans)
kaloudis Jan 18, 2025
857f210
Channel: fix display of SCID for CLN nodes
kaloudis Jan 21, 2025
35507a3
LSPS7: upgrade to new Storage system
kaloudis Jan 25, 2025
6627c87
LSPS1: GetInfo: add loading to REST call
kaloudis Jan 29, 2025
5dfe915
LSPS7: only call get_extendable_channels if backend supports custom m…
kaloudis Jan 29, 2025
6d4bab5
supportsLSPS1customMessage -> supportsLSPScustomMessage
kaloudis Jan 29, 2025
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
Prev Previous commit
Next Next commit
Localize channel statuses
  • Loading branch information
kaloudis committed Jan 25, 2025
commit db7d78572d386ccf46dda990266c8b390c6bbd08
26 changes: 12 additions & 14 deletions components/Channels/Tag.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,7 @@ import { ExpirationStatus, Status } from '../../views/Channels/ChannelsPane';
import { themeColor } from '../../utils/ThemeUtils';

export function Tag({ status }: { status: Status | ExpirationStatus }) {
// Garish colors to let you know you fucked up
const colors = { background: 'pink', dot: 'blue' };
const colors = { background: '', dot: '' };

// TODO: should all these colors be in the theme?
switch (status) {
Expand All @@ -33,11 +32,9 @@ export function Tag({ status }: { status: Status | ExpirationStatus }) {
break;
case ExpirationStatus.Expiring:
colors.background = themeColor('warning');
colors.dot = '#E5E5E5';
break;
case ExpirationStatus.Expired:
colors.background = themeColor('error');
colors.dot = '#E5E5E5';
break;
}

Expand All @@ -54,16 +51,17 @@ export function Tag({ status }: { status: Status | ExpirationStatus }) {
}}
>
<Row>
<View
style={{
width: 6,
height: 6,
borderRadius: 6,
backgroundColor: colors.dot
}}
/>
<Spacer width={6} />
{/* TODO: localize */}
{colors.dot && (
<View
style={{
width: 6,
height: 6,
borderRadius: 6,
backgroundColor: colors.dot
}}
/>
)}
{colors.dot && <Spacer width={6} />}
<Body colorOverride="white" small>
{status}
</Body>
Expand Down
8 changes: 8 additions & 0 deletions locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -129,6 +129,14 @@
"general.defaultNodeNickname": "My Lightning Node",
"general.active": "Active",
"general.retry": "Retry",
"channel.status.good": "Good",
"channel.status.stable": "Stable",
"channel.status.unstable": "Unstable",
"channel.status.offline": "Offline",
"channel.status.opening": "Opening",
"channel.status.closing": "Closing",
"channel.expirationStatus.expiring": "Expiring soon",
"channel.expirationStatus.expired": "Expired",
"restart.title": "Restart required",
"restart.msg": "ZEUS has to be restarted before the new configuration is applied.",
"restart.msg1": "Would you like to restart now?",
Expand Down
16 changes: 8 additions & 8 deletions views/Channels/ChannelsPane.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -43,17 +43,17 @@ import Channel from '../../models/Channel';

// TODO: does this belong in the model? Or can it be computed from the model?
export enum Status {
Good = 'Good',
Stable = 'Stable',
Unstable = 'Unstable',
Offline = 'Offline',
Opening = 'Opening',
Closing = 'Closing'
Good = localeString('channel.status.good'),
Stable = localeString('channel.status.stable'),
Unstable = localeString('channel.status.unstable'),
Offline = localeString('channel.status.offline'),
Opening = localeString('channel.status.opening'),
Closing = localeString('channel.status.closing')
}

export enum ExpirationStatus {
Expiring = 'Expiring soon',
Expired = 'Expired'
Expiring = localeString('channel.expirationStatus.expiring'),
Expired = localeString('channel.expirationStatus.expired')
}

interface ChannelsProps {
Expand Down