create dialog
MODIFY
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
WalletWasabi.Fluent/ViewModels/Wallets/Send/SendViewModel.cs
@@ -15,6 +15,7 @@ using ReactiveUI;
using WalletWasabi.Blockchain.Analysis.Clustering;
using WalletWasabi.Blockchain.TransactionBroadcasting;
using WalletWasabi.Blockchain.TransactionBuilding;
+using WalletWasabi.Exceptions;
using WalletWasabi.Fluent.MathNet;
using WalletWasabi.Fluent.Validation;
using WalletWasabi.Fluent.ViewModels.NavBar;
@@ -134,6 +135,10 @@ namespace WalletWasabi.Fluent.ViewModels.Wallets.Send
// Private coins are enough.
Navigate().To(new OptimisePrivacyViewModel(wallet, transactionInfo, broadcaster, txRes));
return;
+ }
+ catch (InsufficientBalanceException ex)
+ {
+
}
catch (NotEnoughFundsException)
{

ADD
WalletWasabi.Fluent/Views/Dialogs/InsufficientBalanceDialogView.axaml
+<UserControl xmlns="https://github.com/avaloniaui"
+ xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
+ xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
+ xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
+ xmlns:c="using:WalletWasabi.Fluent.Controls"
+ xmlns:dialog="using:WalletWasabi.Fluent.ViewModels.Dialogs"
+ mc:Ignorable="d" d:DesignWidth="428" d:DesignHeight="371"
+ x:DataType="dialog:InsufficientBalanceDialogViewModel"
+ x:CompileBindings="True"
+ x:Class="WalletWasabi.Fluent.Views.Dialogs.InsufficientBalanceDialogView">
+ <c:ContentArea Title="{Binding Title}"
+ ScrollViewer.VerticalScrollBarVisibility="Disabled">
+ <c:QuestionControl Text="{Binding Text}"
+ YesCommand="{Binding NextCommand}"
+ NoCommand="{Binding CancelCommand}"
+ HighlightButton="YesButton">
+ <Viewbox MaxHeight="150" Margin="40">
+ <PathIcon Data="{StaticResource delete_regular}" Opacity="0.6" />
+ </Viewbox>
+ </c:QuestionControl>
+ </c:ContentArea>
+</UserControl>

ADD
WalletWasabi.Fluent/Views/Dialogs/InsufficientBalanceDialogView.axaml.cs
+using Avalonia.Controls;
+using Avalonia.Markup.Xaml;
+
+namespace WalletWasabi.Fluent.Views.Dialogs
+{
+ public class InsufficientBalanceDialogView : UserControl
+ {
+ public InsufficientBalanceDialogView()
+ {
+ InitializeComponent();
+ }
+
+ private void InitializeComponent()
+ {
+ AvaloniaXamlLoader.Load(this);
+ }
+ }
+}

create dialog