Fix build warnings (#3870)

Fixes #3866.
This commit is contained in:
d11n
2022-06-15 04:17:10 +02:00
committed by GitHub
parent 3abde67671
commit f48bb5a40a
6 changed files with 32 additions and 23 deletions

View File

@@ -43,8 +43,12 @@ namespace BTCPayServer.Controllers.Greenfield
{
return validationResult;
}
var defaultCurrency = (await _storeRepository.FindStore(storeId)).GetStoreBlob().DefaultCurrency;
var store = await _storeRepository.FindStore(storeId);
if (store == null)
return this.CreateAPIError(404, "store-not-found", "The store was not found");
var defaultCurrency = store.GetStoreBlob().DefaultCurrency;
var appData = new AppData
{
StoreDataId = storeId,