getAlby / getAlby/lightning-browser-extension

[BUG] Handle keysend errors

Open
#2,801 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
TypeScript
Stars
585
Forks
228
Avg merge
6d 7h
Merged PRs (30d)
16

Description

### Describe the bug

Errors during keysend payments using `webln.keysend()` are currently not handled.

### Screenshots [optional]

![image](https://github.com/getAlby/lightning-browser-extension/assets/100827540/42187261-1d97-476d-a116-50fc7e447729)

### Steps To Reproduce

1. Go to this [repl](https://codepen.io/reneaaron/pen/BaraQmg?editors=1111) (old Alby node ID with no active channels)
2. Click send
3. While the payment ultimately fails (because there is no route) the extension seems to not handle those cases, you will see the success message and an entry in your transaction list is created still (see screenshot)

### Expected behavior

An error should be shown when a keysend payment fails.

Contributor guide

Open the contributing guide

Research direction

Reproduce the failure with the linked CodePen using webln.keysend(), then trace the keysend payment flow through the extension and its transaction-list update. Done means a failed payment shows an error, does not show a success message, and does not create a successful transaction entry.

Written by the indexing model from the issue text.

Assessment

Tech stack
typescript
Domain
payments
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.