Skip to content

Commit

Permalink
Fix speed up confirmation logic
Browse files Browse the repository at this point in the history
  • Loading branch information
SuperJMN committed May 28, 2024
1 parent 1673cb0 commit a4f2d86
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ private TransactionHistoryItemViewModel(IWalletModel wallet, TransactionModel tr
HasBeenSpedUp = transaction.HasBeenSpedUp;
}

private bool CanBeSpedUp => _transaction.CanSpeedUpTransaction && !IsChild && !_transaction.HasBeenSpedUp;
private bool CanBeSpedUp => _transaction.CanSpeedUpTransaction && !IsChild;

public bool TransactionOperationsVisible => Transaction.CanCancelTransaction || CanBeSpedUp;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,16 +24,22 @@
</Classes.transparent>
<InvalidatingStackPanel Orientation="Horizontal" HorizontalAlignment="Center" Spacing="15" Margin="15 0">

<!--Speed Up Confirmed indicator-->
<PathIcon IsVisible="{Binding HasBeenSpedUp}"
ToolTip.Tip="This transaction has been sped up"
Height="16" Data="{StaticResource rocket_confirmed}" />

<!-- SpeedUp button -->
<Button Classes="plain" ToolTip.Tip="Speed Up Transaction"
Command="{Binding SpeedUpTransactionCommand}"
IsVisible="{Binding $self.IsEffectivelyEnabled}">
<PathIcon Data="{StaticResource rocket_regular}" Height="16" />
<PathIcon Classes.AlreadySpedUp="{Binding HasBeenSpedUp}"
Classes.NotSpedUp="{Binding !HasBeenSpedUp}"
Height="16">
<PathIcon.Styles>
<Style Selector="PathIcon.AlreadySpedUp">
<Setter Property="Data" Value="{StaticResource rocket_confirmed}" />
</Style>
<Style Selector="PathIcon.NotSpedUp">
<Setter Property="Data" Value="{StaticResource rocket_regular}" />
</Style>
</PathIcon.Styles>
</PathIcon>
</Button>

<!-- Cancel -->
Expand Down

0 comments on commit a4f2d86

Please sign in to comment.