remove redundant else block.
MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/TransactionBroadcasterViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/TransactionBroadcasterViewModel.cs
@@ -178,14 +178,8 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
}
else
{
- if (Transaction.TryParse(TransactionString, Global.Network, out var txn))
- {
- transaction = new SmartTransaction(txn, WalletWasabi.Models.Height.Unknown);
- }
- else
- {
- throw new FormatException($"Transaction string is invalid or cannot be finalized.");
- }
+ transaction = new SmartTransaction(Transaction.Parse(TransactionString, Global.Network ?? Network.Main),
+ WalletWasabi.Models.Height.Unknown);
}
MainWindowViewModel.Instance.StatusBar.TryAddStatus(StatusBarStatus.BroadcastingTransaction);

remove redundant else block.