Skip to content

Commit

Permalink
fix: clear fast catchup modal
Browse files Browse the repository at this point in the history
  • Loading branch information
PhearZero committed Jan 2, 2025
1 parent 6516303 commit cdf3d45
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ui/modal/controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,12 @@ func (m ViewModel) HandleMessage(msg tea.Msg) (*ViewModel, tea.Cmd) {
m.SetShortLink(msg)
m.SetType(app.TransactionModal)
case *algod.StateModel:
// Clear the catchup modal
if msg.Status.State != algod.FastCatchupState && m.Type == app.ExceptionModal && m.title == "Fast Catchup" {
m.Open = false
m.SetType(app.InfoModal)
}

Check warning on line 46 in ui/modal/controller.go

View check run for this annotation

Codecov / codecov/patch

ui/modal/controller.go#L42-L46

Added lines #L42 - L46 were not covered by tests

m.State = msg
m.transactionModal.State = msg
m.infoModal.State = msg
Expand Down

0 comments on commit cdf3d45

Please sign in to comment.