Improve warning when creating invoice without wallet (#2844)

* Improve warning when creating invoice without wallet

close #2834

* Update link class name
This commit is contained in:
Umar Bolatov
2021-09-12 22:24:10 -07:00
committed by GitHub
parent f96767d3dc
commit d88f012d82

View File

@@ -829,7 +829,12 @@ namespace BTCPayServer.Controllers
if (!store.GetSupportedPaymentMethods(_NetworkProvider).Any()) if (!store.GetSupportedPaymentMethods(_NetworkProvider).Any())
{ {
ModelState.AddModelError(nameof(model.StoreId), "You need to configure the derivation scheme in order to create an invoice"); TempData.SetStatusMessageModel(new StatusMessageModel()
{
Severity = StatusMessageModel.StatusSeverity.Error,
Html = $"To create an invoice, you need to <a href='{Url.Action(nameof(StoresController.UpdateStore), "Stores", new { storeId = store.Id })}' class='alert-link'>set up your wallet</a> first",
AllowDismiss = false
});
return View(model); return View(model);
} }