mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
The PayButton should select the default currency of the store as default
This commit is contained in:
@@ -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",
|
||||
|
||||
Reference in New Issue
Block a user