different dialog text in different cases
MODIFY
WalletWasabi.Fluent/ViewModels/Dialogs/InsufficientBalanceDialogViewModel.cs
WalletWasabi.Fluent/ViewModels/Dialogs/InsufficientBalanceDialogViewModel.cs
@@ -3,12 +3,30 @@ using WalletWasabi.Fluent.ViewModels.Dialogs.Base;
namespace WalletWasabi.Fluent.ViewModels.Dialogs
{
+ public enum BalanceType
+ {
+ All,
+ Private,
+ Pocket
+ }
+
[NavigationMetaData(Title = "Insufficient balance")]
public partial class InsufficientBalanceDialogViewModel : DialogViewModelBase<bool>
{
- public InsufficientBalanceDialogViewModel()
+ public InsufficientBalanceDialogViewModel(BalanceType type)
{
+ switch (type)
+ {
+ case BalanceType.Private:
Text = $"With the included fee, you don't have enough private funds in your wallet. Instead of adding as an extra cost, Wasabi can subtract the fee from the maximum possible amount.\nWould you like Wasabi to do it?";
+ break;
+ case BalanceType.Pocket:
+ Text = $"With the included fee, you don't have enough funds in the selected pocket. Instead of adding as an extra cost, Wasabi can subtract the fee from the amount.\nWould you like Wasabi to do it?";
+ break;
+ default:
+ Text = $"With the included fee, you don't have enough funds in your wallet. Instead of adding as an extra cost, Wasabi can subtract the fee from the amount.\nWould you like Wasabi to do it?";
+ break;
+ }
NextCommand = ReactiveCommand.Create(() => Close(result: true));
CancelCommand = ReactiveCommand.Create(() => Close(DialogResultKind.Cancel));

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/PrivacyControlViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/PrivacyControlViewModel.cs
@@ -63,7 +63,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
}
catch (InsufficientBalanceException)
{
- var dialog = new InsufficientBalanceDialogViewModel();
+ var dialog = new InsufficientBalanceDialogViewModel(BalanceType.Pocket);
var result = await NavigateDialog(dialog, NavigationTarget.DialogScreen);
if (result.Result != true)

MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
@@ -127,7 +127,7 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
}
catch (InsufficientBalanceException)
{
- var dialog = new InsufficientBalanceDialogViewModel();
+ var dialog = new InsufficientBalanceDialogViewModel(BalanceType.Private);
var result = await NavigateDialog(dialog, NavigationTarget.DialogScreen);
if (result.Result)
@@ -137,18 +137,12 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
return;
}
}
- catch (NotEnoughFundsException)
- {
- // Do Nothing
- }
}
Navigate().To(new PrivacyControlViewModel(wallet, transactionInfo, broadcaster));
}, this.WhenAnyValue(x=>x.Labels.Count).Any());
}
-
-
private void SetXAxisCurrentValueIndex(double xAxisCurrentValue)
{
if (!_updatingCurrentValue)

different dialog text in different cases