diff --git a/CHANGELOG.md b/CHANGELOG.md index 15b4308..977dd84 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/components/SubscriptionMonero.vue b/src/components/SubscriptionMonero.vue index 4fb8018..0f0ccc7 100644 --- a/src/components/SubscriptionMonero.vue +++ b/src/components/SubscriptionMonero.vue @@ -242,11 +242,17 @@ async function onCreateInvoice() { return } isLoading = true - invoice = await createInvoice( - sender.id, - recipient.id, - paymentAmount, - ) + 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( {},