breez / breez-sdk-greenlight

MIT License
244 stars 43 forks source link

sdk: Add pre-flight checks for payments #1057

Closed cdecker closed 3 months ago

cdecker commented 3 months ago

The Greenlight plugin implements a number of pre-flight checks:

All of these are considered to be user-errors (well, the slow channel reconnect could be indicative of several problems, so those trigger introspections from us), and as such they could and likely should be handled on the client side already.

Since the SDK has a very good idea of the channel state, thanks to the background sync of node metadata, the first and last check would be trivial to implement, and would result in an even faster feedback for users.

cdecker commented 3 months ago

We have a number of further pre-flight checks that we're looking to either upstream into CLN, or keep in gl-plugin. If we have further validation that would warrrant checking on the client we'll share them of course :-)

roeierez commented 3 months ago

Makes sense.