Skip to content
This repository has been archived by the owner on Sep 2, 2024. It is now read-only.

Commit

Permalink
feat: show maximum channel size for LSPS1 options
Browse files Browse the repository at this point in the history
  • Loading branch information
rolznz committed Jul 3, 2024
1 parent 9294553 commit 6abea84
Show file tree
Hide file tree
Showing 4 changed files with 16 additions and 9 deletions.
1 change: 1 addition & 0 deletions alby/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@ type ChannelPeerSuggestion struct {
Pubkey string `json:"pubkey"`
Host string `json:"host"`
MinimumChannelSize uint64 `json:"minimumChannelSize"`
MaximumChannelSize uint64 `json:"maximumChannelSize"`
Name string `json:"name"`
Image string `json:"image"`
BrokenLspUrl string `json:"lsp_url"`
Expand Down
22 changes: 13 additions & 9 deletions frontend/src/screens/channels/IncreaseIncomingCapacity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -264,15 +264,19 @@ function NewChannelInternal({ network }: { network: Network }) {
)}
<div>
{peer.name}
{peer.minimumChannelSize > 0 && (
<span className="ml-4 text-xs text-muted-foreground">
Min.{" "}
{new Intl.NumberFormat().format(
peer.minimumChannelSize
)}{" "}
sats
</span>
)}
<span className="ml-4 text-xs text-muted-foreground">
Min.{" "}
{new Intl.NumberFormat().format(
peer.minimumChannelSize
)}
sats
<span className="mr-10" />
Max.{" "}
{new Intl.NumberFormat().format(
peer.maximumChannelSize
)}{" "}
sats
</span>
</div>
</div>
</div>
Expand Down
1 change: 1 addition & 0 deletions frontend/src/screens/channels/IncreaseOutgoingCapacity.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,7 @@ function NewChannelInternal({ network }: { network: Network }) {
network,
paymentMethod: "onchain",
minimumChannelSize: 0,
maximumChannelSize: 0,
pubkey: "",
host: "",
image: "",
Expand Down
1 change: 1 addition & 0 deletions frontend/src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -298,6 +298,7 @@ export type RecommendedChannelPeer = {
image: string;
name: string;
minimumChannelSize: number;
maximumChannelSize: number;
} & (
| {
paymentMethod: "onchain";
Expand Down

0 comments on commit 6abea84

Please sign in to comment.