The PayButton should select the default currency of the store as default

This commit is contained in:
nicolas.dorier
2022-01-10 20:37:36 +09:00
parent 25a59fff4a
commit e164b1f169

View File

@@ -973,15 +973,10 @@ namespace BTCPayServer.Controllers
return _UserManager.GetUserId(User);
}
// TODO: Need to have talk about how architect default currency implementation
// For now we have also hardcoded USD for Store creation and then Invoice creation
const string DEFAULT_CURRENCY = "USD";
[Route("{storeId}/paybutton")]
public async Task<IActionResult> PayButton()
{
var store = CurrentStore;
var storeBlob = store.GetStoreBlob();
if (!storeBlob.AnyoneCanInvoice)
{
@@ -993,7 +988,7 @@ namespace BTCPayServer.Controllers
var model = new PayButtonViewModel
{
Price = null,
Currency = DEFAULT_CURRENCY,
Currency = storeBlob.DefaultCurrency,
ButtonSize = 2,
UrlRoot = appUrl,
PayButtonImageUrl = appUrl + "img/paybutton/pay.svg",