Fix: PSBT Signing Option in MultiSig Server redirected incorrectly (fix #6668) (#6690)

This commit is contained in:
Nicolas Dorier
2025-04-23 14:40:28 +09:00
committed by GitHub
parent 391279fced
commit b96491a804
4 changed files with 23 additions and 15 deletions

View File

@@ -172,22 +172,16 @@ namespace BTCPayServer.Controllers
return RedirectToAction(nameof(WalletTransactions), new { walletId = walletId.ToString() });
case "sign":
return await WalletSign(walletId, vm);
case "collect" when vm.SigningContext.PendingTransactionId is not null:
return await RedirectToWalletPSBTReady(walletId,
new WalletPSBTReadyViewModel
{
SigningContext = vm.SigningContext, ReturnUrl = vm.ReturnUrl, BackUrl = vm.BackUrl
});
case "decode":
ModelState.Remove(nameof(vm.PSBT));
ModelState.Remove(nameof(vm.FileName));
ModelState.Remove(nameof(vm.UploadedPSBTFile));
// for pending transactions we collect signature from PSBT and redirect if everything is good
if (vm.SigningContext.PendingTransactionId is not null)
{
return await RedirectToWalletPSBTReady(walletId,
new WalletPSBTReadyViewModel
{
SigningContext = vm.SigningContext, ReturnUrl = vm.ReturnUrl, BackUrl = vm.BackUrl
});
}
// for regular transactions we decode PSBT and show the details
await FetchTransactionDetails(walletId, derivationSchemeSettings, vm, network);
return View("WalletPSBTDecoded", vm);