Prevent error 500 if bad psbt

This commit is contained in:
nicolas.dorier
2019-07-12 12:57:56 +09:00
parent 56976898bd
commit e6e9668bbb

View File

@@ -141,7 +141,11 @@ namespace BTCPayServer.Controllers
var derivationSchemeSettings = await GetDerivationSchemeSettings(walletId);
if (derivationSchemeSettings == null)
return NotFound();
try
{
await FetchTransactionDetails(derivationSchemeSettings, vm, network);
}
catch { return BadRequest(); }
return View(nameof(WalletPSBTReady), vm);
}