Error when broadcasting transactions weren't shown in the UI

This commit is contained in:
nicolas.dorier 2022-05-27 16:34:05 +09:00
parent f08f064bc6
commit a0d0f1f98b
No known key found for this signature in database
GPG Key ID: 6618763EF09186FE
2 changed files with 4 additions and 5 deletions

View File

@ -399,7 +399,7 @@ namespace BTCPayServer.Controllers
if (vm.InvalidPSBT || psbt is null)
{
if (vm.InvalidPSBT)
vm.GlobalError = "Invalid PSBT";
vm.Errors.Add("Invalid PSBT");
return View(nameof(WalletPSBT), vm);
}
DerivationSchemeSettings derivationSchemeSettings = GetDerivationSchemeSettings(walletId);
@ -503,7 +503,7 @@ namespace BTCPayServer.Controllers
return await WalletPSBTReady(walletId, vm, "broadcast");
}
vm.GlobalError = $"RPC Error while broadcasting: {broadcastResult.RPCCode} {broadcastResult.RPCCodeMessage} {broadcastResult.RPCMessage}";
vm.Errors.Add($"RPC Error while broadcasting: {broadcastResult.RPCCode} {broadcastResult.RPCCodeMessage} {broadcastResult.RPCMessage}");
return View(nameof(WalletPSBT), vm);
}
else
@ -515,7 +515,7 @@ namespace BTCPayServer.Controllers
}
catch (Exception ex)
{
vm.GlobalError = "Error while broadcasting: " + ex.Message;
vm.Errors.Add("Error while broadcasting: " + ex.Message);
return View(nameof(WalletPSBT), vm);
}
@ -539,7 +539,7 @@ namespace BTCPayServer.Controllers
await FetchTransactionDetails(derivationSchemeSettings, vm, network);
return View("WalletPSBTDecoded", vm);
default:
vm.GlobalError = "Unknown command";
vm.Errors.Add("Unknown command");
return View(nameof(WalletPSBT), vm);
}
}

View File

@ -9,7 +9,6 @@ namespace BTCPayServer.Models.WalletViewModels
public SigningContextModel SigningContext { get; set; } = new SigningContextModel();
public string SigningKey { get; set; }
public string SigningKeyPath { get; set; }
public string GlobalError { get; set; }
public class DestinationViewModel
{