Skip to content

Commit

Permalink
return early if there are no active trades or expired bonds (#441)
Browse files Browse the repository at this point in the history
Signed-off-by: Philemon Ukane <ukanephilemon@gmail.com>
  • Loading branch information
ukane-philemon authored Jan 30, 2024
1 parent f6caf36 commit 21f77d9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions ui/page/root/home_page.go
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,10 @@ func (hp *HomePage) initDEX() {
expiredBonds = append(expiredBonds, xc.Auth.ExpiredBonds...)
}

if len(activeOrders) == 0 && len(expiredBonds) == 0 {
return // nothing to do
}

dexPassEditor := hp.Theme.EditorPassword(new(widget.Editor), values.String(values.StrDexPassword))
dexPassEditor.Editor.SingleLine, dexPassEditor.IsRequired = true, true

Expand Down

0 comments on commit 21f77d9

Please sign in to comment.