mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2025-12-17 22:14:26 +01:00
Use a redirect for update
This commit is contained in:
@@ -91,15 +91,11 @@ namespace BTCPayServer.Controllers
|
|||||||
psbt = await UpdatePSBT(derivationSchemeSettings, psbt, network);
|
psbt = await UpdatePSBT(derivationSchemeSettings, psbt, network);
|
||||||
if (psbt == null)
|
if (psbt == null)
|
||||||
{
|
{
|
||||||
StatusMessage = "Error: You need to update NBXplorer";
|
ModelState.AddModelError(nameof(vm.PSBT), "You need to update your version of NBXplorer");
|
||||||
return View(vm);
|
return View(vm);
|
||||||
}
|
}
|
||||||
ModelState.Remove(nameof(vm.PSBT));
|
|
||||||
ModelState.Remove(nameof(vm.UploadedPSBTFile));
|
|
||||||
vm.PSBT = psbt.ToBase64();
|
|
||||||
vm.Decoded = psbt.ToString();
|
|
||||||
StatusMessage = "PSBT updated!";
|
StatusMessage = "PSBT updated!";
|
||||||
return View(vm);
|
return RedirectToAction(nameof(WalletPSBT), new { walletId = walletId, psbt = psbt.ToBase64(), FileName = vm.FileName });
|
||||||
case "seed":
|
case "seed":
|
||||||
return SignWithSeed(walletId, psbt.ToBase64());
|
return SignWithSeed(walletId, psbt.ToBase64());
|
||||||
case "broadcast":
|
case "broadcast":
|
||||||
|
|||||||
@@ -324,7 +324,7 @@ namespace BTCPayServer.Controllers
|
|||||||
case "analyze-psbt":
|
case "analyze-psbt":
|
||||||
var name =
|
var name =
|
||||||
$"Send-{string.Join('_', vm.Outputs.Select(output => $"{output.Amount}->{output.DestinationAddress}{(output.SubtractFeesFromOutput ? "-Fees" : string.Empty)}"))}.psbt";
|
$"Send-{string.Join('_', vm.Outputs.Select(output => $"{output.Amount}->{output.DestinationAddress}{(output.SubtractFeesFromOutput ? "-Fees" : string.Empty)}"))}.psbt";
|
||||||
return RedirectToAction(nameof(WalletPSBT), new { walletId = walletId, psbt = psbt.PSBT.ToBase64(), FileName= name });
|
return RedirectToAction(nameof(WalletPSBT), new { walletId = walletId, psbt = psbt.PSBT.ToBase64(), FileName = name });
|
||||||
default:
|
default:
|
||||||
return View(vm);
|
return View(vm);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user