mirror of
https://github.com/haveno-dex/haveno.git
synced 2026-01-09 19:41:01 -05:00
expose runtime exceptions over grpc api (#2088)
This commit is contained in:
parent
0e1113e82b
commit
51d4504ebf
2 changed files with 1 additions and 9 deletions
|
|
@ -101,14 +101,6 @@ class CorePriceService {
|
|||
// Offer price can be null (if price feed unavailable), thus a null-tolerant comparator is used.
|
||||
Comparator<Offer> offerPriceComparator = Comparator.comparing(Offer::getPrice, Comparator.nullsLast(Comparator.naturalOrder()));
|
||||
|
||||
// TODO: remove this!!!
|
||||
// Trading xmr-traditional is considered as buying/selling XMR, but trading xmr-crypto is
|
||||
// considered as buying/selling crypto. Because of this, when viewing a xmr-crypto pair,
|
||||
// the buy column is actually the sell column and vice versa. To maintain the expected
|
||||
// ordering, we have to reverse the price comparator.
|
||||
//boolean isCrypto = CurrencyUtil.isCryptoCurrency(currencyCode);
|
||||
//if (isCrypto) offerPriceComparator = offerPriceComparator.reversed();
|
||||
|
||||
// Offer amounts are used for the secondary sort. They are sorted from high to low.
|
||||
Comparator<Offer> offerAmountComparator = Comparator.comparing(Offer::getAmount).reversed();
|
||||
|
||||
|
|
|
|||
|
|
@ -36,7 +36,7 @@ import org.slf4j.Logger;
|
|||
class GrpcExceptionHandler {
|
||||
|
||||
private final Predicate<Throwable> isExpectedException = (t) ->
|
||||
t instanceof IllegalStateException || t instanceof IllegalArgumentException;
|
||||
t instanceof IllegalStateException || t instanceof IllegalArgumentException || t instanceof RuntimeException;
|
||||
|
||||
@Inject
|
||||
public GrpcExceptionHandler() {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue