lightninglabs / lightninglabs/pool
CLI usability: give more meaningful error messages wrt. balance and amounts
- Dominant language
- Go
- Stars
- 259
- Forks
- 51
- PR merge metrics
- No merged PRs in 30d
Description
When I use the CLI to submit an ask order, several things may go wrong:
1) The amount is not divisible by 100,000 satoshi
2) I do not have enough satoshis available to fund the order
3) My lnd node does not accept channels of the configured size
See #172 for a discussion of 1).
In case 2) I get a message "insufficient account balance" after I confirmed the order. This is OK, but from a usability perspective I'd like to see this message before I confirm the order. Furthermore, the message could/should indicate my current balance and, if possible, the maximum amount I might use for the order (taking fees into account). The goal should be to make it as easy and simple as possible for the user to submit a correct order.
In case 3) I get "order of 1 BTC is wumbo sized, but lnd node isn't signalling wumbo", which is OK if you know what "wumbo" means (:confused:). As above, I'd like to see this message before I confirm the order. Then, a more helpful message would be nice. What is the maximum amount my lnd node accepts? This amount should be shown, possibly rounded to a valid "unit" size, and with fees and available balance taken into account (as above).
Contributor guide
No contributing guide indexed for this repository
Research direction
Start by tracing the CLI ask-order submission flow, especially validation and the confirmation prompt. Review how insufficient balance and wumbo-channel errors are currently produced. Done means the relevant checks happen before confirmation and the messages explain balance, fees, maximum usable amount, or accepted channel size where available.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100