mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-04-20 23:56:30 -04:00
fix ui bug with not updated offer direction
This commit is contained in:
parent
91761ade14
commit
7dc08b0459
@ -59,7 +59,7 @@ public class PaymentMethod implements Serializable, Comparable {
|
||||
public static PaymentMethod BLOCK_CHAINS;
|
||||
|
||||
public static final List<PaymentMethod> ALL_VALUES = new ArrayList<>(Arrays.asList(
|
||||
OK_PAY = new PaymentMethod(OK_PAY_ID, HOUR, DAY), // tx instant so min. wait time
|
||||
OK_PAY = new PaymentMethod(OK_PAY_ID, 0, DAY), // tx instant so min. wait time
|
||||
PERFECT_MONEY = new PaymentMethod(PERFECT_MONEY_ID, 0, DAY),
|
||||
SEPA = new PaymentMethod(SEPA_ID, 0, 8 * DAY), // sepa takes 1-3 business days. We use 8 days to include safety for holidays
|
||||
SWISH = new PaymentMethod(SWISH_ID, 0, DAY),
|
||||
|
@ -43,8 +43,9 @@ public class SignPayoutTx extends TradeTask {
|
||||
Coin buyerPayoutAmount = sellerPayoutAmount.add(trade.getTradeAmount());
|
||||
|
||||
// We use the sellers LastBlockSeenHeight, which might be different to the buyers one.
|
||||
// If lock time is 0 we set lockTimeAsBlockHeight to -1 to mark it as "not set".
|
||||
// In the tradewallet we apply the locktime only if it is set, otherwise we use the default sequence number
|
||||
// If lock time is 0 we set lockTimeAsBlockHeight to 0 to mark it as "not set".
|
||||
// In the tradewallet we apply the locktime only if it is set, otherwise we use the default values for
|
||||
// transaction locktime and sequence number
|
||||
long lockTime = trade.getOffer().getPaymentMethod().getLockTime();
|
||||
long lockTimeAsBlockHeight = 0;
|
||||
if (lockTime > 0)
|
||||
|
@ -82,10 +82,6 @@ public class BitsquareApp extends Application {
|
||||
private Injector injector;
|
||||
private boolean popupOpened;
|
||||
|
||||
public static Stage getPrimaryStage() {
|
||||
return primaryStage;
|
||||
}
|
||||
|
||||
private static Stage primaryStage;
|
||||
private Scene scene;
|
||||
private final List<String> corruptedDatabaseFiles = new ArrayList<>();
|
||||
|
@ -262,6 +262,8 @@ public class PendingTradesDataModel extends ActivatableDataModel {
|
||||
}
|
||||
|
||||
public Offer.Direction getDirection(Offer offer) {
|
||||
// gets called earlier than onSelectTrade event handler
|
||||
isOfferer = tradeManager.isMyOffer(offer);
|
||||
return isOfferer ? offer.getDirection() : offer.getMirroredDirection();
|
||||
}
|
||||
|
||||
|
@ -76,11 +76,11 @@ public class PendingTradesView extends ActivatableViewAndModel<VBox, PendingTrad
|
||||
@Override
|
||||
public void initialize() {
|
||||
setTradeIdColumnCellFactory();
|
||||
setDirectionColumnCellFactory();
|
||||
setDateColumnCellFactory();
|
||||
setAmountColumnCellFactory();
|
||||
setPriceColumnCellFactory();
|
||||
setVolumeColumnCellFactory();
|
||||
setDateColumnCellFactory();
|
||||
setDirectionColumnCellFactory();
|
||||
|
||||
table.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
|
||||
table.setPlaceholder(new Label("No pending trades available"));
|
||||
|
Loading…
x
Reference in New Issue
Block a user