Fix bug with states

This commit is contained in:
Manfred Karrer 2014-11-21 01:18:55 +01:00
parent 58d81c2c51
commit ef7c2305fc
2 changed files with 3 additions and 0 deletions

View file

@ -251,6 +251,8 @@ public class PendingTradesPM extends PresentationModel<PendingTradesModel> {
log.trace("tradeState " + tradeState);
if (tradeState != null) {
switch (tradeState) {
// TODO Check why OFFERER_ACCEPTED can happen, refactor state handling
case OFFERER_ACCEPTED:
case DEPOSIT_PUBLISHED:
state.set(model.isOfferer() ? State.OFFERER_BUYER_WAIT_TX_CONF : State.TAKER_SELLER_WAIT_TX_CONF);
break;

View file

@ -161,6 +161,7 @@ class TakeOfferModel extends UIModel {
trade.stateProperty().addListener((ov, oldValue, newValue) -> {
log.debug("trade state = " + newValue);
switch (newValue) {
// TODO Check why DEPOSIT_CONFIRMED can happen, refactor state handling
case DEPOSIT_PUBLISHED:
case DEPOSIT_CONFIRMED:
transactionId.set(trade.getDepositTx().getHashAsString());