Fix tests and warnigns

This commit is contained in:
nicolas.dorier
2022-08-04 12:42:15 +09:00
parent 6239f9da75
commit 1854fd307f
3 changed files with 3 additions and 4 deletions

View File

@@ -452,7 +452,7 @@ namespace BTCPayServer.Controllers
} }
} }
} }
catch (Exception e) catch (Exception)
{ {
return BadRequest(); return BadRequest();
} }

View File

@@ -551,8 +551,7 @@ namespace BTCPayServer.Controllers
if (this.GetCurrentStore().Role != StoreRoles.Owner) if (this.GetCurrentStore().Role != StoreRoles.Owner)
return Forbid(); return Forbid();
var settings = (this.GetCurrentStore().GetDerivationSchemeSettings(_NetworkProvider, network.CryptoCode)); var derivationScheme = (this.GetCurrentStore().GetDerivationSchemeSettings(_NetworkProvider, network.CryptoCode))?.AccountDerivation;
var derivationScheme = settings.AccountDerivation;
if (derivationScheme is null) if (derivationScheme is null)
return NotSupported("This feature is only available to BTC wallets"); return NotSupported("This feature is only available to BTC wallets");
var bumpableAddresses = (await GetAddresses(selectedItems)) var bumpableAddresses = (await GetAddresses(selectedItems))

View File

@@ -578,7 +578,7 @@ namespace BTCPayServer.Controllers
public async Task<IActionResult> WalletSend( public async Task<IActionResult> WalletSend(
[ModelBinder(typeof(WalletIdModelBinder))] [ModelBinder(typeof(WalletIdModelBinder))]
WalletId walletId, WalletSendModel vm, string command = "", CancellationToken cancellation = default, WalletId walletId, WalletSendModel vm, string command = "", CancellationToken cancellation = default,
string bip21 = "") string? bip21 = "")
{ {
if (walletId?.StoreId == null) if (walletId?.StoreId == null)
return NotFound(); return NotFound();