pass caption as parameter
MODIFY
WalletWasabi.Fluent/ViewModels/AddWallet/HardwareWallet/DetectedHardwareWalletViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWallet/HardwareWallet/DetectedHardwareWalletViewModel.cs
@@ -14,7 +14,6 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet.HardwareWallet
WalletName = walletName;
Title = "Hardware Wallet";
- ErrorCaption = "Error occured during adding your wallet.";
switch (hardwareWalletOperations.SelectedDevice!.Model)
{
@@ -52,7 +51,7 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet.HardwareWallet
}
catch(Exception ex)
{
- ShowError(ex.Message);
+ ShowError(ex.Message, "Error occured during adding your wallet.");
Navigate().Back();
}

MODIFY
WalletWasabi.Fluent/ViewModels/AddWallet/ImportWalletViewModel.cs
WalletWasabi.Fluent/ViewModels/AddWallet/ImportWalletViewModel.cs
@@ -20,7 +20,6 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
public ImportWalletViewModel(string walletName, WalletManager walletManager)
{
Title = "Import Wallet";
- ErrorCaption = "The wallet file was not valid or compatible with Wasabi.";
WalletName = walletName;
WalletManager = walletManager;
@@ -61,7 +60,7 @@ namespace WalletWasabi.Fluent.ViewModels.AddWallet
catch (Exception ex)
{
Logger.LogError(ex);
- ShowError(ex.Message);
+ ShowError(ex.Message, "The wallet file was not valid or compatible with Wasabi.");
}
}

MODIFY
WalletWasabi.Fluent/ViewModels/Navigation/RoutableViewModel.cs
WalletWasabi.Fluent/ViewModels/Navigation/RoutableViewModel.cs
@@ -25,15 +25,12 @@ namespace WalletWasabi.Fluent.ViewModels.Navigation
CancelCommand = ReactiveCommand.Create(() => Navigate().Clear());
Title = "";
- ErrorCaption = "We are sorry, something happened during the process.";
}
public virtual string IconName => "navigation_regular";
public string Title { get; set; }
- public string ErrorCaption { get; set; }
-
public ICommand? NextCommand { get; protected set; }
public ICommand BackCommand { get; protected set; }
@@ -113,9 +110,9 @@ namespace WalletWasabi.Fluent.ViewModels.Navigation
return result;
}
- protected void ShowError(string message)
+ protected void ShowError(string message, string caption)
{
- var dialog = new ShowErrorDialogViewModel(message, Title, ErrorCaption);
+ var dialog = new ShowErrorDialogViewModel(message, Title, caption);
NavigateDialog(dialog, CurrentTarget == NavigationTarget.HomeScreen ? NavigationTarget.DialogScreen : CurrentTarget);
}
}

MODIFY
WalletWasabi.Fluent/ViewModels/TransactionBroadcasting/BroadcastTransactionViewModel.cs
WalletWasabi.Fluent/ViewModels/TransactionBroadcasting/BroadcastTransactionViewModel.cs
@@ -39,7 +39,6 @@ namespace WalletWasabi.Fluent.ViewModels.TransactionBroadcasting
SmartTransaction transaction)
{
Title = "Broadcast Transaction";
- ErrorCaption = "It was not possible to broadcast the transaction.";
var nullMoney = new Money(-1L);
var nullOutput = new TxOut(nullMoney, Script.Empty);
@@ -92,7 +91,7 @@ namespace WalletWasabi.Fluent.ViewModels.TransactionBroadcasting
catch (Exception ex)
{
Logger.LogError(ex);
- ShowError(ex.Message);
+ ShowError(ex.Message, "It was not possible to broadcast the transaction.");
}
Navigate().Back();

MODIFY
WalletWasabi.Fluent/ViewModels/TransactionBroadcasting/LoadTransactionViewModel.cs
WalletWasabi.Fluent/ViewModels/TransactionBroadcasting/LoadTransactionViewModel.cs
@@ -22,7 +22,6 @@ namespace WalletWasabi.Fluent.ViewModels.TransactionBroadcasting
Network = network;
Title = "Transaction Broadcaster";
- ErrorCaption = "It was not possible to load the transaction.";
this.WhenAnyValue(x => x.FinalTransaction)
.Where(x => x is { })
@@ -43,7 +42,7 @@ namespace WalletWasabi.Fluent.ViewModels.TransactionBroadcasting
catch (Exception ex)
{
Logger.LogError(ex);
- ShowError(ex.Message);
+ ShowError(ex.Message, "It was not possible to load the transaction.");
}
},
outputScheduler: RxApp.MainThreadScheduler);
@@ -76,7 +75,7 @@ namespace WalletWasabi.Fluent.ViewModels.TransactionBroadcasting
catch (Exception ex)
{
Logger.LogError(ex);
- ShowError(ex.Message);
+ ShowError(ex.Message, "It was not possible to paste the transaction.");
}
});
}

pass caption as parameter