mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Use the store's default currency when creating entities (#3585)
* Use default currency for new pull payments Closes #3582. * Pull payment: Improve create form * Use default currency for new invoices Closes #3581. * Clean up old invoice form code * Use default currency for new payment requests * Test fixes
This commit is contained in:
@@ -89,10 +89,14 @@ namespace BTCPayServer.Controllers
|
||||
return NotFound();
|
||||
}
|
||||
|
||||
return View(nameof(EditPaymentRequest), new UpdatePaymentRequestViewModel(paymentRequest)
|
||||
var vm = new UpdatePaymentRequestViewModel(paymentRequest)
|
||||
{
|
||||
StoreId = store.Id
|
||||
});
|
||||
};
|
||||
|
||||
vm.Currency ??= store.GetStoreBlob().DefaultCurrency;
|
||||
|
||||
return View(nameof(EditPaymentRequest), vm);
|
||||
}
|
||||
|
||||
[HttpPost("/stores/{storeId}/payment-requests/edit/{payReqId?}")]
|
||||
|
||||
Reference in New Issue
Block a user