[Bug fix] If error while signing with hot wallet, do not white page crash

This commit is contained in:
nicolas.dorier
2020-09-03 23:06:48 +09:00
parent 81561c6f3d
commit 69c2400ec7

View File

@@ -891,7 +891,7 @@ namespace BTCPayServer.Controllers
else
{
ModelState.AddModelError(nameof(viewModel.SeedOrKey), "The master fingerprint does not match the one set in your wallet settings. Probable cause are: wrong seed, wrong passphrase or wrong fingerprint in your wallet settings.");
return View(viewModel);
return View(nameof(SignWithSeed), viewModel);
}
var changed = PSBTChanged(psbt, () => psbt.SignAll(settings.AccountDerivation, signingKey, rootedKeyPath, new SigningOptions()
@@ -901,7 +901,7 @@ namespace BTCPayServer.Controllers
if (!changed)
{
ModelState.AddModelError(nameof(viewModel.SeedOrKey), "Impossible to sign the transaction. Probable cause: Incorrect account key path in wallet settings, PSBT already signed.");
return View(viewModel);
return View(nameof(SignWithSeed), viewModel);
}
ModelState.Remove(nameof(viewModel.SigningContext.PSBT));
viewModel.SigningContext.PSBT = psbt.ToBase64();