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

Commit

Permalink
fix: lightning channel opening flow
Browse files Browse the repository at this point in the history
  • Loading branch information
rolznz committed May 4, 2024
1 parent 283c5e4 commit 43cb34e
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions frontend/src/screens/channels/CurrentChannelOrder.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,12 @@ function PayLightningChannelOrder({ order }: { order: NewChannelOrder }) {
// This is not a good check if user already has enough inbound liquidity
// - check balance instead or how else to check the invoice is paid?
const newChannel =
channels &&
prevChannels &&
channels.find((newChannel) => prevChannels.indexOf(newChannel) < 0);
channels && prevChannels
? channels.find(
(newChannel) =>
!prevChannels.some((current) => current.id === newChannel.id)
)
: undefined;

React.useEffect(() => {
if (newChannel) {
Expand Down

0 comments on commit 43cb34e

Please sign in to comment.