Stop loading if monero subscription setup fails
This commit is contained in:
parent
133cffa120
commit
e6b51f29ce
1 changed files with 11 additions and 5 deletions
|
@ -127,11 +127,17 @@ function isFormValid(): boolean {
|
|||
|
||||
async function saveSubscriptionSettings() {
|
||||
isLoading = true
|
||||
const user = await registerMoneroSubscriptionOption(
|
||||
ensureAuthToken(),
|
||||
getPricePerSec(subscriptionPrice),
|
||||
subscriptionPayoutAddress,
|
||||
)
|
||||
let user
|
||||
try {
|
||||
user = await registerMoneroSubscriptionOption(
|
||||
ensureAuthToken(),
|
||||
getPricePerSec(subscriptionPrice),
|
||||
subscriptionPayoutAddress,
|
||||
)
|
||||
} catch (error: any) {
|
||||
isLoading = false
|
||||
return
|
||||
}
|
||||
setCurrentUser(user)
|
||||
await loadSubscriptionSettings()
|
||||
isFormVisible = false
|
||||
|
|
Loading…
Reference in a new issue