Prevent security deposit popup displaying more then once

This commit is contained in:
Manfred Karrer 2014-10-17 17:53:09 +02:00
parent 9bb60e23ad
commit cd5d4ad8ac
5 changed files with 15 additions and 12 deletions

View File

@ -201,18 +201,9 @@ public class CreateOfferViewCB extends CachedViewCB<CreateOfferPM> {
"\nIt will be refunded to you after the trade has successfully completed.",
actions);
/*
Popups.openInfo("To ensure that both traders are behaving fair you need to put in a security deposit to an " +
"offer. That will be refunded to you after the trade has successful completed. In case of a " +
"dispute and the arbitrator will take the security deposit from the dishonest trader as his payment " +
"for the dispute resolution. The security deposit will be included in the deposit transaction at the " +
"moment when a trader accept your offer. As long as your offer is not taken by another trader, " +
"the security deposit will not leave your trading wallet, and will be refunded when you cancel your " +
"offer.");
*/
presentationModel.securityDepositInfoDisplayed();
}
presentationModel.securityDepositInfoDisplayed();
priceAmountPane.setInactive();

View File

@ -238,6 +238,11 @@ class TakeOfferModel extends UIModel {
return true;
}
void securityDepositInfoDisplayed() {
persistence.write("displaySecurityDepositInfo", false);
}
///////////////////////////////////////////////////////////////////////////////////////////
// Setter
///////////////////////////////////////////////////////////////////////////////////////////

View File

@ -192,7 +192,11 @@ class TakeOfferPM extends PresentationModel<TakeOfferModel> {
model.takeOffer();
}
void securityDepositInfoDisplayed() {
model.securityDepositInfoDisplayed();
}
///////////////////////////////////////////////////////////////////////////////////////////
// UI events
///////////////////////////////////////////////////////////////////////////////////////////

View File

@ -216,8 +216,10 @@ public class TakeOfferViewCB extends CachedViewCB<TakeOfferPM> {
"another trader. " +
"\nIt will be refunded to you after the trade has successfully completed.",
actions);
presentationModel.securityDepositInfoDisplayed();
}
priceAmountPane.setInactive();
showPaymentInfoScreenButton.setVisible(false);

View File

@ -414,7 +414,8 @@ public class TradeManager {
// Routes the incoming messages to the responsible protocol
private void onIncomingTradeMessage(TradeMessage tradeMessage, PeerAddress sender) {
// log.trace("processTradingMessage TradeId " + tradeMessage.getTradeId());
log.trace("processTradingMessage instance " + tradeMessage.getClass().getSimpleName());
log.trace("onIncomingTradeMessage instance " + tradeMessage.getClass().getSimpleName());
log.trace("onIncomingTradeMessage sender " + sender);
String tradeId = tradeMessage.getTradeId();