mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-12-22 19:49:32 +00:00
hide reserved subaddresses in deposit view
This commit is contained in:
parent
84c08e4c36
commit
f5d82df477
2 changed files with 11 additions and 4 deletions
|
@ -37,12 +37,17 @@ import java.util.Optional;
|
|||
@EqualsAndHashCode
|
||||
@Slf4j
|
||||
public final class XmrAddressEntry implements PersistablePayload {
|
||||
|
||||
public enum Context {
|
||||
ARBITRATOR,
|
||||
BASE_ADDRESS,
|
||||
AVAILABLE,
|
||||
OFFER_FUNDING,
|
||||
TRADE_PAYOUT
|
||||
TRADE_PAYOUT;
|
||||
|
||||
public boolean isReserved() {
|
||||
return this == Context.OFFER_FUNDING || this == Context.TRADE_PAYOUT;
|
||||
}
|
||||
}
|
||||
|
||||
// keyPair can be null in case the object is created from deserialization as it is transient.
|
||||
|
|
|
@ -320,9 +320,11 @@ public class DepositView extends ActivatableView<VBox, Void> {
|
|||
observableList.forEach(DepositListItem::cleanup);
|
||||
observableList.clear();
|
||||
|
||||
// add address entries
|
||||
xmrWalletService.getAddressEntries()
|
||||
.forEach(e -> observableList.add(new DepositListItem(e, xmrWalletService, formatter, txsWithIncomingOutputs)));
|
||||
// add non-reserved address entries
|
||||
for (XmrAddressEntry addressEntry : xmrWalletService.getAddressEntries()) {
|
||||
if (addressEntry.getContext().isReserved()) continue;
|
||||
observableList.add(new DepositListItem(addressEntry, xmrWalletService, formatter, txsWithIncomingOutputs));
|
||||
}
|
||||
}
|
||||
|
||||
private Coin getAmount() {
|
||||
|
|
Loading…
Reference in a new issue