Skip to content

Commit

Permalink
Show only active roles in "Bonded Roles" table
Browse files Browse the repository at this point in the history
Fix bisq-network#3271.
Filter the bonded roles list to contain only active bonds in the RolesView table.
  • Loading branch information
ben-kaufman committed Sep 24, 2019
1 parent 490eaab commit 6e5d78b
Showing 1 changed file with 2 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@
import bisq.desktop.util.GUIUtil;

import bisq.core.dao.DaoFacade;
import bisq.core.dao.governance.bond.Bond;
import bisq.core.dao.governance.bond.BondState;
import bisq.core.dao.governance.bond.role.BondedRole;
import bisq.core.dao.state.model.governance.BondedRoleType;
Expand Down Expand Up @@ -122,6 +123,7 @@ protected void deactivate() {

private void updateList() {
observableList.setAll(daoFacade.getBondedRoles().stream()
.filter(Bond::isActive)
.map(bond -> new RolesListItem(bond, daoFacade))
.sorted(Comparator.comparing(RolesListItem::getLockupDate).reversed())
.collect(Collectors.toList()));
Expand Down

0 comments on commit 6e5d78b

Please sign in to comment.