Show error message if invoice can not be created
This commit is contained in:
parent
7ab85991db
commit
a90cd5cb20
2 changed files with 12 additions and 5 deletions
|
@ -14,6 +14,7 @@ The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/).
|
|||
### Changed
|
||||
|
||||
- Don't revoke auth token when handling timeline loading error.
|
||||
- Show error message if invoice can not be created.
|
||||
|
||||
## [1.18.0] - 2023-03-21
|
||||
|
||||
|
|
|
@ -242,11 +242,17 @@ async function onCreateInvoice() {
|
|||
return
|
||||
}
|
||||
isLoading = true
|
||||
try {
|
||||
invoice = await createInvoice(
|
||||
sender.id,
|
||||
recipient.id,
|
||||
paymentAmount,
|
||||
)
|
||||
} catch (error: any) {
|
||||
alert(error.message)
|
||||
isLoading = false
|
||||
return
|
||||
}
|
||||
// Add invoice ID to current URL
|
||||
window.history.pushState(
|
||||
{},
|
||||
|
|
Loading…
Reference in a new issue