mirror of
https://github.com/bisq-network/bisq.git
synced 2024-11-19 09:52:23 +01:00
Add List<Trade> getTrades() to TradeManager (w/out transitive jfx dep)
This commit is contained in:
parent
b4fa52f4e4
commit
50bbbfe6c4
@ -108,6 +108,7 @@ import org.bouncycastle.crypto.params.KeyParameter;
|
||||
import java.util.Date;
|
||||
import java.util.HashMap;
|
||||
import java.util.HashSet;
|
||||
import java.util.List;
|
||||
import java.util.Map;
|
||||
import java.util.Optional;
|
||||
import java.util.Set;
|
||||
@ -870,6 +871,12 @@ public class TradeManager implements PersistedDataHost, DecryptedDirectMessageLi
|
||||
.map(tradeModel -> (Trade) tradeModel);
|
||||
}
|
||||
|
||||
public List<Trade> getTrades() {
|
||||
return getObservableList().stream()
|
||||
.filter(t -> !t.hasFailed())
|
||||
.collect(Collectors.toList());
|
||||
}
|
||||
|
||||
private void removeTrade(Trade trade) {
|
||||
if (tradableList.remove(trade)) {
|
||||
requestPersistence();
|
||||
|
Loading…
Reference in New Issue
Block a user