Skip to content

Commit

Permalink
hide governance wallet dropdown if only one dcr wallet is available
Browse files Browse the repository at this point in the history
  • Loading branch information
dreacot committed Oct 15, 2024
1 parent 04f2d6c commit 0e8d895
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion ui/page/governance/consensus_page.go
Original file line number Diff line number Diff line change
Expand Up @@ -466,7 +466,7 @@ func (pg *ConsensusPage) leftDropdown(gtx C) D {
if pg.walletDropDown == nil {
return D{}
}
if len(pg.assetWallets) == 0 {
if len(pg.assetWallets) < 2 {
return D{}
}
return layout.W.Layout(gtx, pg.walletDropDown.Layout)
Expand Down
2 changes: 1 addition & 1 deletion ui/page/governance/proposals_page.go
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ func (pg *ProposalsPage) leftDropdown(gtx C) D {
if pg.walletDropDown == nil {
return D{}
}
if len(pg.assetWallets) == 0 {
if len(pg.assetWallets) < 2 {
return D{}
}
return layout.W.Layout(gtx, pg.walletDropDown.Layout)
Expand Down
3 changes: 3 additions & 0 deletions ui/page/governance/treasury_page.go
Original file line number Diff line number Diff line change
Expand Up @@ -273,6 +273,9 @@ func (pg *TreasuryPage) dropdownLayout(gtx layout.Context) layout.Dimensions {
if pg.walletDropDown == nil {
return D{}
}
if len(pg.assetWallets) < 2 {
return D{}
}
return layout.W.Layout(gtx, pg.walletDropDown.Layout)
}),
layout.Rigid(func(gtx C) D {
Expand Down

0 comments on commit 0e8d895

Please sign in to comment.