Implement disabling of conversion when theres 0 exchange rate
MODIFY
WalletWasabi.Fluent/Controls/CurrencyEntryBox.axaml
WalletWasabi.Fluent/Controls/CurrencyEntryBox.axaml
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
VerticalAlignment="{TemplateBinding VerticalContentAlignment}" />
<TextBlock Margin="5 0 0 0"
+
Text="{TemplateBinding CurrencyCode}"
IsVisible="{TemplateBinding Text, Converter={x:Static StringConverters.IsNotNullOrEmpty}}"
HorizontalAlignment="{TemplateBinding HorizontalContentAlignment}"
</Setter>
</Style>
+ <Style Selector="c|CurrencyEntryBox:noexchangerate Button#PART_SwapButton">
+ <Setter Property="IsVisible" Value="False" />
+ </Style>
+ <Style Selector="c|CurrencyEntryBox:noexchangerate TextBlock#PART_ConversionWatermark">
+ <Setter Property="IsVisible" Value="False" />
+ </Style>
+
<Style Selector="c|CurrencyEntryBox /template/ Border#PART_BorderElement">
<Setter Property="CornerRadius" Value="0" />
</Style>

MODIFY
WalletWasabi.Fluent/Controls/CurrencyEntryBox.axaml.cs
WalletWasabi.Fluent/Controls/CurrencyEntryBox.axaml.cs
@@ -92,6 +92,8 @@ namespace WalletWasabi.Fluent.Controls
_regexGroupAndDecimal =
new Regex(
$"[{_groupSeparator}{_decimalSeparator}]+", RegexOptions.Compiled);
+
+ PseudoClasses.Set(":noexchangerate", true);
}
public decimal AmountBtc
@@ -420,6 +422,11 @@ namespace WalletWasabi.Fluent.Controls
private void UpdateDisplay(bool updateTextField)
{
+ if (ConversionRate == 0m)
+ {
+ return;
+ }
+
var conversion = BitcoinToFiat(AmountBtc);
if (IsConversionReversed && !IsReadOnly)

Implement disabling of conversion when theres 0 exchange rate