ElementsProject / cln-application

Official core lightning application by Blockstream
MIT License
32 stars 8 forks source link

[Bug] Text when no transactions found is backwards regarding active channels #39

Closed evansmj closed 7 months ago

evansmj commented 8 months ago

The text here looks wrong, since if I have no active channels I need to open a channel first.

Screenshot 2024-03-03 at 12 03 44 PM

<Row className='text-center'> { !(appCtx.listChannels?.activeChannels && appCtx.listChannels.activeChannels.length && appCtx.listChannels.activeChannels.length > 0) ? 'No transaction found. Click send/receive to start!' : 'No transaction found. Open channel to start!' }

It looks like this if statement should have the ! removed, since if you have no active channels, you need to open one before being able to send a transaction.

Steps to reproduce:

Case 1:

  1. Open a node that has no active channels.

Expected: 'No transaction found. Open channel to start!' Actual: 'No transaction found. Click send/receive to start!'

Case 2:

  1. Open a node with active channels.

Expected: 'No transaction found. Click send/receive to start!' Actual: 'No transaction found. Open channel to start!'

evansmj commented 8 months ago

I'll fix this in my upcoming pr that adds tests + routing (for the bookkeeper dashboard). I found this while adding tests for CLNTransactionList.

evansmj commented 8 months ago

https://github.com/ElementsProject/cln-application/pull/42