Change Tx broadcaster base to WalletActionViewModel
RENAME
WalletWasabi.Gui/Tabs/TransactionBroadcasterView.xaml
WalletWasabi.Gui/Controls/WalletExplorer/TransactionBroadcasterView.xaml
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"
- mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450"
- x:Class="WalletWasabi.Gui.Tabs.TransactionBroadcasterView">
- Welcome to Avalonia!
+ xmlns:controls="clr-namespace:WalletWasabi.Gui.Controls;assembly=WalletWasabi.Gui"
+ mc:Ignorable="d" d:DesignWidth="800" d:DesignHeight="450">
+ <controls:GroupBox Title="{Binding Title}" TextBlock.FontSize="30" Padding="20" Margin="10">
+ <Grid Classes="content">
+ </Grid>
+ </controls:GroupBox>
</UserControl>

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/WalletExplorerView.xaml
WalletWasabi.Gui/Controls/WalletExplorer/WalletExplorerView.xaml
</StackPanel>
</Button>
</TreeDataTemplate>
+
+ <TreeDataTemplate DataType="ViewModels:TransactionBroadcasterViewModel">
+ <Button BorderThickness="0" Background="Transparent" Command="{Binding DoItCommand}" HorizontalAlignment="Stretch" HorizontalContentAlignment="Left">
+ <StackPanel Orientation="Horizontal" Spacing="6">
+ <DrawingPresenter Width="20" Height="20">
+ <DrawingPresenter.Drawing>
+ <DrawingGroup>
+ <DrawingGroup.Children>
+ <GeometryDrawing Brush="#00FFFFFF" Geometry="F1M16,16L0,16 0,0 16,0z" />
+ <GeometryDrawing Brush="#FFF6F6F6" Geometry="F1M10,3.7446C9.3,3.7446,8.629,3.8656,8,4.0776L8,3.9996 4,-0.000399999999999956 0,3.9996 0,8.8276 2,6.8276 2,8.9996 3.836,8.9996C3.784,9.3236 3.75,9.6516 3.75,9.9896 3.75,10.1726 3.76,10.3426 3.776,10.5176 3.79,10.6776 3.813,10.8126 3.841,10.9856 4.262,13.5246 6.203,15.4776 8.675,15.9996L9.056,15.9996 9.075,15.9996 11.72,15.9996C13.797,15.4116,15.406,13.8066,16,11.7616L16,8.2786C15.258,5.6456,12.862,3.7446,10,3.7446" />
+ <GeometryDrawing Brush="#FF414141" Geometry="F1M5,8L5,4.414 7,6.414 7,4.414 4,1.414 1,4.414 1,6.414 3,4.414 3,8z" />
+ <GeometryDrawing Brush="#FF414141" Geometry="F1M14.2988,10.2803C13.5198,10.6193 12.8198,10.8223 12.1628,10.9273 12.2458,10.4683 12.2878,10.0323 12.2828,9.6213 12.2808,9.3203 12.2578,9.0343 12.2268,8.7543 12.7718,8.6683 13.3478,8.5223 13.9638,8.3013 14.1878,8.8223 14.3128,9.3963 14.3128,10.0003 14.3128,10.0943 14.3048,10.1873 14.2988,10.2803 M11.0378,14.1813C11.4468,13.3213 11.7628,12.5203 11.9668,11.7863 12.6368,11.7003 13.3498,11.5293 14.1308,11.2353 13.6968,12.6873 12.5178,13.8153 11.0378,14.1813 M10.0738,14.3083C10.0488,14.3093 10.0258,14.3123 9.9998,14.3123 9.8728,14.3123 9.7458,14.3043 9.6218,14.2933 9.2448,13.4563 8.9558,12.6253 8.7768,11.8143 9.1688,11.8533 9.5758,11.8793 9.9958,11.8833 10.0968,11.8843 10.1968,11.8843 10.2978,11.8843 10.5588,11.8843 10.8218,11.8773 11.0878,11.8643 10.8598,12.6073 10.5198,13.4223 10.0738,14.3083 M5.8648,11.2183C6.4628,11.4023 7.1488,11.5783 7.9228,11.7023 8.0768,12.4873 8.3288,13.2893 8.6588,14.0973 7.3168,13.6583 6.2658,12.5793 5.8648,11.2183 M8.5838,8.7933C9.0358,8.8443 9.5068,8.8783 9.9958,8.8833 10.0968,8.8843 10.1968,8.8843 10.2978,8.8843 10.6638,8.8843 11.0348,8.8733 11.4138,8.8443 11.4428,9.0983 11.4628,9.3573 11.4668,9.6293 11.4708,10.0623 11.4148,10.5313 11.3098,11.0313 10.8708,11.0623 10.4418,11.0683 10.0038,11.0653 9.5278,11.0603 9.0688,11.0253 8.6258,10.9733 8.5628,10.5163 8.5288,10.0663 8.5328,9.6293 8.5368,9.3403 8.5568,9.0623 8.5838,8.7933 M9.4508,5.7263C9.6308,5.7033 9.8138,5.6873 9.9998,5.6873 10.1238,5.6873 10.2448,5.6963 10.3658,5.7063 10.7168,6.3143 11.0738,7.0903 11.2808,8.0363 10.8538,8.0653 10.4318,8.0693 10.0038,8.0653 9.5548,8.0613 9.1188,8.0303 8.6998,7.9823 8.8748,7.0713 9.1638,6.3223 9.4508,5.7263 M13.5618,7.5703C13.0468,7.7473 12.5618,7.8703 12.0988,7.9423 11.9378,7.1683 11.6858,6.5033 11.4098,5.9283 12.2928,6.2343 13.0448,6.8133 13.5618,7.5703 M15.2408,9.8223C15.1468,7.0063 12.8398,4.7503 9.9998,4.7503 9.2908,4.7503 8.6168,4.8943 7.9998,5.1493L7.9998,6.1933C8.1428,6.1183 8.2858,6.0433 8.4378,5.9843 8.2708,6.4023 8.1238,6.8853 7.9998,7.4043L7.9998,8.8283 6.7958,7.6243C6.6848,7.5953 6.5688,7.5683 6.4618,7.5383 6.4958,7.4893 6.5378,7.4483 6.5728,7.4013L5.9998,6.8283 5.9998,8.4253C6.0198,8.3763 6.0278,8.3223 6.0488,8.2733 6.5638,8.4253 7.1358,8.5683 7.7748,8.6773 7.7418,8.9813 7.7198,9.2933 7.7168,9.6213 7.7118,10.0213 7.7418,10.4323 7.7898,10.8473 6.9838,10.7013 6.2858,10.5003 5.7028,10.3023 5.6948,10.2023 5.6878,10.1013 5.6878,10.0003 5.6878,9.6543 5.7378,9.3223 5.8158,9.0003L4.8508,9.0003C4.7878,9.3243 4.7498,9.6573 4.7498,10.0003 4.7498,10.1533 4.7588,10.3033 4.7728,10.4533 4.7838,10.5883 4.8038,10.7203 4.8248,10.8513 4.8258,10.8563 4.8258,10.8603 4.8268,10.8653 5.1938,13.0723 6.9318,14.8083 9.1398,15.1743 9.1448,15.1753 9.1498,15.1763 9.1538,15.1763 9.2848,15.1973 9.4158,15.2163 9.5498,15.2273 9.6978,15.2413 9.8478,15.2503 9.9998,15.2503 10.1738,15.2503 10.3448,15.2403 10.5138,15.2243 13.1718,14.9663 15.2498,12.7263 15.2498,10.0003 15.2498,9.9393 15.2418,9.8823 15.2408,9.8223" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M12.2266,8.7539C12.7716,8.6689 13.3476,8.5229 13.9636,8.3009 14.1876,8.8229 14.3126,9.3969 14.3126,9.9999 14.3126,10.0949 14.3046,10.1879 14.2986,10.2799 13.5196,10.6189 12.8206,10.8219 12.1636,10.9279 12.2466,10.4689 12.2886,10.0319 12.2836,9.6209 12.2816,9.3199 12.2576,9.0339 12.2266,8.7539" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M13.5615,7.5698C13.0465,7.7468 12.5615,7.8698 12.0985,7.9418 11.9375,7.1688 11.6855,6.5028 11.4105,5.9288 12.2925,6.2338 13.0445,6.8138 13.5615,7.5698" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M10,14.3125C9.873,14.3125 9.746,14.3045 9.622,14.2925 9.245,13.4565 8.956,12.6245 8.776,11.8145 9.169,11.8535 9.576,11.8785 9.996,11.8825 10.097,11.8845 10.197,11.8845 10.298,11.8845 10.559,11.8845 10.822,11.8765 11.088,11.8645 10.859,12.6075 10.52,13.4215 10.074,14.3085 10.049,14.3095 10.025,14.3125 10,14.3125" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M10.0039,11.0654C9.5269,11.0604 9.0679,11.0254 8.6259,10.9734 8.5629,10.5164 8.5289,10.0664 8.5329,9.6284 8.5369,9.3394 8.5569,9.0624 8.5839,8.7934 9.0359,8.8444 9.5069,8.8774 9.9959,8.8824 10.0969,8.8844 10.1969,8.8844 10.2979,8.8844 10.6639,8.8844 11.0349,8.8734 11.4139,8.8444 11.4419,9.0984 11.4629,9.3574 11.4669,9.6284 11.4709,10.0624 11.4149,10.5314 11.3099,11.0314 10.8709,11.0624 10.4419,11.0684 10.0039,11.0654" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M10,5.6875C10.124,5.6875 10.245,5.6955 10.366,5.7065 10.717,6.3145 11.074,7.0895 11.281,8.0365 10.854,8.0655 10.432,8.0695 10.004,8.0655 9.555,8.0615 9.119,8.0305 8.7,7.9825 8.875,7.0715 9.164,6.3215 9.451,5.7265 9.631,5.7035 9.813,5.6875 10,5.6875" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M5.8652,11.2187C6.4632,11.4027 7.1482,11.5777 7.9232,11.7017 8.0772,12.4877 8.3292,13.2887 8.6592,14.0977 7.3162,13.6577 6.2652,12.5787 5.8652,11.2187" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M11.0381,14.1816C11.4471,13.3216 11.7631,12.5206 11.9671,11.7856 12.6371,11.7006 13.3501,11.5296 14.1311,11.2356 13.6971,12.6876 12.5171,13.8156 11.0381,14.1816" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M8,6.1929L8,7.4039C8.124,6.8849 8.271,6.4019 8.438,5.9839 8.286,6.0429 8.143,6.1179 8,6.1929" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M6.5732,7.4014C6.5372,7.4484 6.4952,7.4894 6.4622,7.5384 6.5682,7.5684 6.6842,7.5954 6.7962,7.6244z" />
+ <GeometryDrawing Brush="#FFF0EFF1" Geometry="F1M7.7744,8.6772C7.1354,8.5682 6.5634,8.4252 6.0484,8.2732 6.0274,8.3222 6.0194,8.3762 6.0004,8.4252L6.0004,9.0002 5.8154,9.0002C5.7384,9.3222 5.6874,9.6542 5.6874,10.0002 5.6874,10.1012 5.6954,10.2022 5.7034,10.3022 6.2864,10.5002 6.9834,10.7012 7.7904,10.8472 7.7424,10.4322 7.7114,10.0212 7.7164,9.6212 7.7194,9.2932 7.7424,8.9812 7.7744,8.6772" />
+ </DrawingGroup.Children>
+ </DrawingGroup>
+ </DrawingPresenter.Drawing>
+ </DrawingPresenter>
+ <TextBlock Text="Transaction Broadcaster" Height="19" VerticalAlignment="Center" />
+ </StackPanel>
+ </Button>
+ </TreeDataTemplate>
</TreeView.DataTemplates>
</TreeView>
</Grid>

MODIFY
WalletWasabi.Gui/Controls/WalletExplorer/WalletViewModel.cs
WalletWasabi.Gui/Controls/WalletExplorer/WalletViewModel.cs
@@ -38,6 +38,11 @@ namespace WalletWasabi.Gui.Controls.WalletExplorer
new WalletInfoViewModel(this)
};
+ if (walletService.KeyManager.IsWatchOnly)
+ {
+ Actions.Add(new TransactionBroadcasterViewModel(this));
+ }
+
Actions[0].DisplayActionTab();
if (receiveDominant)
{

MODIFY
WalletWasabi.Gui/Shell/Commands/ToolCommands.cs
WalletWasabi.Gui/Shell/Commands/ToolCommands.cs
@@ -21,7 +21,7 @@ namespace WalletWasabi.Gui.Shell.Commands
var transactionBroadcasterCommand = ReactiveCommand.Create(() =>
{
- IoC.Get<IShell>().AddOrSelectDocument(() => new TransactionBroadcasterViewModel());
+ //IoC.Get<IShell>().AddOrSelectDocument(() => new TransactionBroadcasterViewModel());
});
var settingsCommand = ReactiveCommand.Create(() =>

Change Tx broadcaster base to WalletActionViewModel