mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-07-26 00:15:18 -04:00
fix ui bug with not updated offer direction
This commit is contained in:
parent
91761ade14
commit
7dc08b0459
5 changed files with 8 additions and 9 deletions
|
@ -59,7 +59,7 @@ public class PaymentMethod implements Serializable, Comparable {
|
||||||
public static PaymentMethod BLOCK_CHAINS;
|
public static PaymentMethod BLOCK_CHAINS;
|
||||||
|
|
||||||
public static final List<PaymentMethod> ALL_VALUES = new ArrayList<>(Arrays.asList(
|
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),
|
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
|
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),
|
SWISH = new PaymentMethod(SWISH_ID, 0, DAY),
|
||||||
|
|
|
@ -43,8 +43,9 @@ public class SignPayoutTx extends TradeTask {
|
||||||
Coin buyerPayoutAmount = sellerPayoutAmount.add(trade.getTradeAmount());
|
Coin buyerPayoutAmount = sellerPayoutAmount.add(trade.getTradeAmount());
|
||||||
|
|
||||||
// We use the sellers LastBlockSeenHeight, which might be different to the buyers one.
|
// 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".
|
// 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 sequence number
|
// 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 lockTime = trade.getOffer().getPaymentMethod().getLockTime();
|
||||||
long lockTimeAsBlockHeight = 0;
|
long lockTimeAsBlockHeight = 0;
|
||||||
if (lockTime > 0)
|
if (lockTime > 0)
|
||||||
|
|
|
@ -82,10 +82,6 @@ public class BitsquareApp extends Application {
|
||||||
private Injector injector;
|
private Injector injector;
|
||||||
private boolean popupOpened;
|
private boolean popupOpened;
|
||||||
|
|
||||||
public static Stage getPrimaryStage() {
|
|
||||||
return primaryStage;
|
|
||||||
}
|
|
||||||
|
|
||||||
private static Stage primaryStage;
|
private static Stage primaryStage;
|
||||||
private Scene scene;
|
private Scene scene;
|
||||||
private final List<String> corruptedDatabaseFiles = new ArrayList<>();
|
private final List<String> corruptedDatabaseFiles = new ArrayList<>();
|
||||||
|
|
|
@ -262,6 +262,8 @@ public class PendingTradesDataModel extends ActivatableDataModel {
|
||||||
}
|
}
|
||||||
|
|
||||||
public Offer.Direction getDirection(Offer offer) {
|
public Offer.Direction getDirection(Offer offer) {
|
||||||
|
// gets called earlier than onSelectTrade event handler
|
||||||
|
isOfferer = tradeManager.isMyOffer(offer);
|
||||||
return isOfferer ? offer.getDirection() : offer.getMirroredDirection();
|
return isOfferer ? offer.getDirection() : offer.getMirroredDirection();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -76,11 +76,11 @@ public class PendingTradesView extends ActivatableViewAndModel<VBox, PendingTrad
|
||||||
@Override
|
@Override
|
||||||
public void initialize() {
|
public void initialize() {
|
||||||
setTradeIdColumnCellFactory();
|
setTradeIdColumnCellFactory();
|
||||||
setDirectionColumnCellFactory();
|
setDateColumnCellFactory();
|
||||||
setAmountColumnCellFactory();
|
setAmountColumnCellFactory();
|
||||||
setPriceColumnCellFactory();
|
setPriceColumnCellFactory();
|
||||||
setVolumeColumnCellFactory();
|
setVolumeColumnCellFactory();
|
||||||
setDateColumnCellFactory();
|
setDirectionColumnCellFactory();
|
||||||
|
|
||||||
table.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
|
table.setColumnResizePolicy(TableView.CONSTRAINED_RESIZE_POLICY);
|
||||||
table.setPlaceholder(new Label("No pending trades available"));
|
table.setPlaceholder(new Label("No pending trades available"));
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue