Move dev flags to core class

This commit is contained in:
Manfred Karrer 2016-05-25 12:58:36 +02:00
parent bb0f9ddedf
commit 0488ef4668
17 changed files with 53 additions and 41 deletions

View file

@ -0,0 +1,13 @@
package io.bitsquare.app;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
public class DevFlags {
private static final Logger log = LoggerFactory.getLogger(DevFlags.class);
public static final boolean STRESS_TEST_MODE = true;
public static final boolean DEV_MODE = STRESS_TEST_MODE || false;
public static final boolean IS_RELEASE_VERSION = !DEV_MODE && true;
}

View file

@ -75,9 +75,6 @@ import static io.bitsquare.app.BitsquareEnvironment.APP_NAME_KEY;
public class BitsquareApp extends Application { public class BitsquareApp extends Application {
private static final Logger log = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(BitsquareApp.class); private static final Logger log = (ch.qos.logback.classic.Logger) LoggerFactory.getLogger(BitsquareApp.class);
public static final boolean DEV_MODE = false;
public static final boolean IS_RELEASE_VERSION = !DEV_MODE && true;
private static Environment env; private static Environment env;
private BitsquareAppModule bitsquareAppModule; private BitsquareAppModule bitsquareAppModule;
@ -104,7 +101,7 @@ public class BitsquareApp extends Application {
log.info("Log files under: " + logPath); log.info("Log files under: " + logPath);
Version.printVersion(); Version.printVersion();
Utilities.printSysInfo(); Utilities.printSysInfo();
Log.setLevel(!IS_RELEASE_VERSION); Log.setLevel(!DevFlags.IS_RELEASE_VERSION);
UserThread.setExecutor(Platform::runLater); UserThread.setExecutor(Platform::runLater);
UserThread.setTimerClass(UITimer.class); UserThread.setTimerClass(UITimer.class);
@ -184,7 +181,7 @@ public class BitsquareApp extends Application {
showSendAlertMessagePopup(); showSendAlertMessagePopup();
} else if (new KeyCodeCombination(KeyCode.F, KeyCombination.SHORTCUT_DOWN).match(keyEvent)) } else if (new KeyCodeCombination(KeyCode.F, KeyCombination.SHORTCUT_DOWN).match(keyEvent))
showFPSWindow(); showFPSWindow();
else if (BitsquareApp.DEV_MODE) { else if (DevFlags.DEV_MODE) {
if (new KeyCodeCombination(KeyCode.D, KeyCombination.SHORTCUT_DOWN).match(keyEvent)) if (new KeyCodeCombination(KeyCode.D, KeyCombination.SHORTCUT_DOWN).match(keyEvent))
showDebugWindow(); showDebugWindow();
} }

View file

@ -21,6 +21,7 @@ import com.google.inject.Inject;
import io.bitsquare.alert.Alert; import io.bitsquare.alert.Alert;
import io.bitsquare.alert.AlertManager; import io.bitsquare.alert.AlertManager;
import io.bitsquare.app.BitsquareApp; import io.bitsquare.app.BitsquareApp;
import io.bitsquare.app.DevFlags;
import io.bitsquare.app.Log; import io.bitsquare.app.Log;
import io.bitsquare.app.Version; import io.bitsquare.app.Version;
import io.bitsquare.arbitration.ArbitratorManager; import io.bitsquare.arbitration.ArbitratorManager;
@ -502,7 +503,7 @@ public class MainViewModel implements ViewModel {
setupBtcNumPeersWatcher(); setupBtcNumPeersWatcher();
setupP2PNumPeersWatcher(); setupP2PNumPeersWatcher();
updateBalance(); updateBalance();
if (BitsquareApp.DEV_MODE) { if (DevFlags.DEV_MODE) {
preferences.setShowOwnOffersInOfferBook(true); preferences.setShowOwnOffersInOfferBook(true);
if (user.getPaymentAccounts().isEmpty()) if (user.getPaymentAccounts().isEmpty())
setupDevDummyPaymentAccounts(); setupDevDummyPaymentAccounts();

View file

@ -17,7 +17,7 @@
package io.bitsquare.gui.main.account; package io.bitsquare.gui.main.account;
import io.bitsquare.app.BitsquareApp; import io.bitsquare.app.DevFlags;
import io.bitsquare.gui.Navigation; import io.bitsquare.gui.Navigation;
import io.bitsquare.gui.common.view.*; import io.bitsquare.gui.common.view.*;
import io.bitsquare.gui.main.MainView; import io.bitsquare.gui.main.MainView;
@ -120,7 +120,7 @@ public class AccountView extends ActivatableView<TabPane, AccountViewModel> {
} }
String key = "accountPrivacyInfo"; String key = "accountPrivacyInfo";
if (!BitsquareApp.DEV_MODE) if (!DevFlags.DEV_MODE)
new Popup().backgroundInfo("In the account screen you can setup your payment accounts for national currencies " + new Popup().backgroundInfo("In the account screen you can setup your payment accounts for national currencies " +
"as well as for crypto currencies.\n\n" + "as well as for crypto currencies.\n\n" +
"Please note that this data is stored locally on your computer only. Bitsquare does not operate servers " + "Please note that this data is stored locally on your computer only. Bitsquare does not operate servers " +

View file

@ -154,7 +154,7 @@ public class AltCoinAccountsView extends ActivatableViewAndModel<GridPane, AltCo
"dispute case. The XMR sender is responsible to be able to verify the XMR transfer to the " + "dispute case. The XMR sender is responsible to be able to verify the XMR transfer to the " +
"arbitrator in case of a dispute.\n\n" + "arbitrator in case of a dispute.\n\n" +
"There is no payment ID required, just the normal public address.\n\n" + "There is no payment ID required, just the normal public address.\n\n" +
"If you are not sure about that process visit the Monero forum to find more information.") "If you are not sure about that process visit the Monero forum (https://forum.getmonero.org) to find more information.")
.closeButtonText("I understand") .closeButtonText("I understand")
.show(); .show();
} }

View file

@ -17,7 +17,7 @@
package io.bitsquare.gui.main.disputes; package io.bitsquare.gui.main.disputes;
import io.bitsquare.app.BitsquareApp; import io.bitsquare.app.DevFlags;
import io.bitsquare.arbitration.Arbitrator; import io.bitsquare.arbitration.Arbitrator;
import io.bitsquare.arbitration.ArbitratorManager; import io.bitsquare.arbitration.ArbitratorManager;
import io.bitsquare.common.crypto.KeyRing; import io.bitsquare.common.crypto.KeyRing;
@ -119,7 +119,7 @@ public class DisputesView extends ActivatableViewAndModel<TabPane, Activatable>
navigation.navigateTo(MainView.class, DisputesView.class, TraderDisputeView.class); navigation.navigateTo(MainView.class, DisputesView.class, TraderDisputeView.class);
String key = "supportInfo"; String key = "supportInfo";
if (!BitsquareApp.DEV_MODE) if (!DevFlags.DEV_MODE)
new Popup().backgroundInfo("Bitsquare is not a company and not operating any kind of customer support.\n\n" + new Popup().backgroundInfo("Bitsquare is not a company and not operating any kind of customer support.\n\n" +
"If there are disputes in the trade process (e.g. one trader does not follow the trade protocol) " + "If there are disputes in the trade process (e.g. one trader does not follow the trade protocol) " +
"the application will display a \"Open dispute\" button after the trade period is over " + "the application will display a \"Open dispute\" button after the trade period is over " +

View file

@ -18,7 +18,7 @@
package io.bitsquare.gui.main.funds.deposit; package io.bitsquare.gui.main.funds.deposit;
import de.jensd.fx.fontawesome.AwesomeIcon; import de.jensd.fx.fontawesome.AwesomeIcon;
import io.bitsquare.app.BitsquareApp; import io.bitsquare.app.DevFlags;
import io.bitsquare.btc.AddressEntry; import io.bitsquare.btc.AddressEntry;
import io.bitsquare.btc.Restrictions; import io.bitsquare.btc.Restrictions;
import io.bitsquare.btc.WalletService; import io.bitsquare.btc.WalletService;
@ -165,7 +165,7 @@ public class DepositView extends ActivatableView<VBox, Void> {
Tuple2<Label, InputTextField> amountTuple = addLabelInputTextField(gridPane, ++gridRow, "Amount in BTC (optional):"); Tuple2<Label, InputTextField> amountTuple = addLabelInputTextField(gridPane, ++gridRow, "Amount in BTC (optional):");
amountLabel = amountTuple.first; amountLabel = amountTuple.first;
amountTextField = amountTuple.second; amountTextField = amountTuple.second;
if (BitsquareApp.DEV_MODE) if (DevFlags.DEV_MODE)
amountTextField.setText("10"); amountTextField.setText("10");
titledGroupBg.setVisible(false); titledGroupBg.setVisible(false);

View file

@ -19,7 +19,7 @@ package io.bitsquare.gui.main.funds.withdrawal;
import com.google.common.util.concurrent.FutureCallback; import com.google.common.util.concurrent.FutureCallback;
import de.jensd.fx.fontawesome.AwesomeIcon; import de.jensd.fx.fontawesome.AwesomeIcon;
import io.bitsquare.app.BitsquareApp; import io.bitsquare.app.DevFlags;
import io.bitsquare.btc.AddressEntry; import io.bitsquare.btc.AddressEntry;
import io.bitsquare.btc.AddressEntryException; import io.bitsquare.btc.AddressEntryException;
import io.bitsquare.btc.WalletService; import io.bitsquare.btc.WalletService;
@ -212,7 +212,7 @@ public class WithdrawalView extends ActivatableView<VBox, Void> {
withdrawToTextField.getText(), amountOfSelectedItems); withdrawToTextField.getText(), amountOfSelectedItems);
Coin receiverAmount = senderAmountAsCoinProperty.get().subtract(requiredFee); Coin receiverAmount = senderAmountAsCoinProperty.get().subtract(requiredFee);
if (receiverAmount.isPositive()) { if (receiverAmount.isPositive()) {
if (BitsquareApp.DEV_MODE) { if (DevFlags.DEV_MODE) {
doWithdraw(receiverAmount, callback); doWithdraw(receiverAmount, callback);
} else { } else {
new Popup().headLine("Confirm withdrawal request") new Popup().headLine("Confirm withdrawal request")
@ -356,7 +356,7 @@ public class WithdrawalView extends ActivatableView<VBox, Void> {
withdrawToTextField.setText(""); withdrawToTextField.setText("");
withdrawToTextField.setPromptText("Fill in your destination address"); withdrawToTextField.setPromptText("Fill in your destination address");
if (BitsquareApp.DEV_MODE) if (DevFlags.DEV_MODE)
withdrawToTextField.setText("mjYhQYSbET2bXJDyCdNqYhqSye5QX2WHPz"); withdrawToTextField.setText("mjYhQYSbET2bXJDyCdNqYhqSye5QX2WHPz");
} }

View file

@ -19,7 +19,7 @@ package io.bitsquare.gui.main.offer.createoffer;
import de.jensd.fx.fontawesome.AwesomeDude; import de.jensd.fx.fontawesome.AwesomeDude;
import de.jensd.fx.fontawesome.AwesomeIcon; import de.jensd.fx.fontawesome.AwesomeIcon;
import io.bitsquare.app.BitsquareApp; import io.bitsquare.app.DevFlags;
import io.bitsquare.common.UserThread; import io.bitsquare.common.UserThread;
import io.bitsquare.common.util.Tuple2; import io.bitsquare.common.util.Tuple2;
import io.bitsquare.common.util.Tuple3; import io.bitsquare.common.util.Tuple3;
@ -293,7 +293,7 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
balanceTextField.setTargetAmount(model.dataModel.totalToPayAsCoin.get()); balanceTextField.setTargetAmount(model.dataModel.totalToPayAsCoin.get());
if (!BitsquareApp.DEV_MODE) { if (!DevFlags.DEV_MODE) {
String key = "securityDepositInfo"; String key = "securityDepositInfo";
new Popup().backgroundInfo("To ensure that both traders follow the trade protocol they need to pay a security deposit.\n\n" + new Popup().backgroundInfo("To ensure that both traders follow the trade protocol they need to pay a security deposit.\n\n" +
"The deposit will stay in your local trading wallet until the offer gets accepted by another trader.\n" + "The deposit will stay in your local trading wallet until the offer gets accepted by another trader.\n" +
@ -611,7 +611,7 @@ public class CreateOfferView extends ActivatableViewAndModel<AnchorPane, CreateO
}; };
placeOfferCompletedListener = (o, oldValue, newValue) -> { placeOfferCompletedListener = (o, oldValue, newValue) -> {
if (BitsquareApp.DEV_MODE) { if (DevFlags.DEV_MODE) {
close(); close();
navigation.navigateTo(MainView.class, PortfolioView.class, OpenOffersView.class); navigation.navigateTo(MainView.class, PortfolioView.class, OpenOffersView.class);
} else if (newValue) { } else if (newValue) {

View file

@ -17,7 +17,7 @@
package io.bitsquare.gui.main.offer.createoffer; package io.bitsquare.gui.main.offer.createoffer;
import io.bitsquare.app.BitsquareApp; import io.bitsquare.app.DevFlags;
import io.bitsquare.btc.pricefeed.MarketPrice; import io.bitsquare.btc.pricefeed.MarketPrice;
import io.bitsquare.btc.pricefeed.PriceFeed; import io.bitsquare.btc.pricefeed.PriceFeed;
import io.bitsquare.common.Timer; import io.bitsquare.common.Timer;
@ -149,7 +149,7 @@ class CreateOfferViewModel extends ActivatableWithDataModel<CreateOfferDataModel
@Override @Override
protected void activate() { protected void activate() {
if (BitsquareApp.DEV_MODE) { if (DevFlags.DEV_MODE) {
amount.set("0.0001"); amount.set("0.0001");
minAmount.set(amount.get()); minAmount.set(amount.get());
price.set("400"); price.set("400");

View file

@ -18,7 +18,7 @@
package io.bitsquare.gui.main.offer.takeoffer; package io.bitsquare.gui.main.offer.takeoffer;
import com.google.inject.Inject; import com.google.inject.Inject;
import io.bitsquare.app.BitsquareApp; import io.bitsquare.app.DevFlags;
import io.bitsquare.arbitration.Arbitrator; import io.bitsquare.arbitration.Arbitrator;
import io.bitsquare.btc.AddressEntry; import io.bitsquare.btc.AddressEntry;
import io.bitsquare.btc.FeePolicy; import io.bitsquare.btc.FeePolicy;
@ -170,7 +170,7 @@ class TakeOfferDataModel extends ActivatableDataModel {
amountAsCoin.set(offer.getAmount()); amountAsCoin.set(offer.getAmount());
if (BitsquareApp.DEV_MODE) if (DevFlags.DEV_MODE)
amountAsCoin.set(offer.getAmount()); amountAsCoin.set(offer.getAmount());
calculateVolume(); calculateVolume();

View file

@ -19,7 +19,7 @@ package io.bitsquare.gui.main.offer.takeoffer;
import de.jensd.fx.fontawesome.AwesomeDude; import de.jensd.fx.fontawesome.AwesomeDude;
import de.jensd.fx.fontawesome.AwesomeIcon; import de.jensd.fx.fontawesome.AwesomeIcon;
import io.bitsquare.app.BitsquareApp; import io.bitsquare.app.DevFlags;
import io.bitsquare.common.UserThread; import io.bitsquare.common.UserThread;
import io.bitsquare.common.util.Tuple2; import io.bitsquare.common.util.Tuple2;
import io.bitsquare.common.util.Tuple3; import io.bitsquare.common.util.Tuple3;
@ -303,7 +303,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
balanceTextField.setTargetAmount(model.dataModel.totalToPayAsCoin.get()); balanceTextField.setTargetAmount(model.dataModel.totalToPayAsCoin.get());
if (!BitsquareApp.DEV_MODE) { if (!DevFlags.DEV_MODE) {
String key = "securityDepositInfo"; String key = "securityDepositInfo";
new Popup().backgroundInfo("To ensure that both traders follow the trade protocol they need to pay a security deposit.\n\n" + new Popup().backgroundInfo("To ensure that both traders follow the trade protocol they need to pay a security deposit.\n\n" +
"The deposit will stay in your local trading wallet until the offer gets accepted by another trader.\n" + "The deposit will stay in your local trading wallet until the offer gets accepted by another trader.\n" +
@ -503,7 +503,7 @@ public class TakeOfferView extends ActivatableViewAndModel<AnchorPane, TakeOffer
}); });
showTransactionPublishedScreenSubscription = EasyBind.subscribe(model.showTransactionPublishedScreen, newValue -> { showTransactionPublishedScreenSubscription = EasyBind.subscribe(model.showTransactionPublishedScreen, newValue -> {
if (newValue && BitsquareApp.DEV_MODE) { if (newValue && DevFlags.DEV_MODE) {
close(); close();
navigation.navigateTo(MainView.class, PortfolioView.class, PendingTradesView.class); navigation.navigateTo(MainView.class, PortfolioView.class, PendingTradesView.class);
} else if (newValue && model.getTrade() != null && model.getTrade().errorMessageProperty().get() == null) { } else if (newValue && model.getTrade() != null && model.getTrade().errorMessageProperty().get() == null) {

View file

@ -17,7 +17,7 @@
package io.bitsquare.gui.main.overlays.windows; package io.bitsquare.gui.main.overlays.windows;
import io.bitsquare.app.BitsquareApp; import io.bitsquare.app.DevFlags;
import io.bitsquare.btc.Restrictions; import io.bitsquare.btc.Restrictions;
import io.bitsquare.btc.WalletService; import io.bitsquare.btc.WalletService;
import io.bitsquare.common.UserThread; import io.bitsquare.common.UserThread;
@ -118,7 +118,7 @@ public class EmptyWalletWindow extends Overlay<EmptyWalletWindow> {
Tuple2<Label, InputTextField> tuple = addLabelInputTextField(gridPane, ++rowIndex, "Your destination address:"); Tuple2<Label, InputTextField> tuple = addLabelInputTextField(gridPane, ++rowIndex, "Your destination address:");
addressInputTextField = tuple.second; addressInputTextField = tuple.second;
if (BitsquareApp.DEV_MODE) if (DevFlags.DEV_MODE)
addressInputTextField.setText("mjYhQYSbET2bXJDyCdNqYhqSye5QX2WHPz"); addressInputTextField.setText("mjYhQYSbET2bXJDyCdNqYhqSye5QX2WHPz");
emptyWalletButton = new Button("Empty wallet"); emptyWalletButton = new Button("Empty wallet");

View file

@ -2,6 +2,7 @@ package io.bitsquare.gui.main.overlays.windows;
import com.google.inject.Inject; import com.google.inject.Inject;
import io.bitsquare.app.BitsquareApp; import io.bitsquare.app.BitsquareApp;
import io.bitsquare.app.DevFlags;
import io.bitsquare.gui.main.overlays.Overlay; import io.bitsquare.gui.main.overlays.Overlay;
import io.bitsquare.user.Preferences; import io.bitsquare.user.Preferences;
import org.slf4j.Logger; import org.slf4j.Logger;
@ -21,7 +22,7 @@ public class TacWindow extends Overlay<TacWindow> {
} }
public void showIfNeeded() { public void showIfNeeded() {
if (!preferences.getTacAccepted() && !BitsquareApp.DEV_MODE) { if (!preferences.getTacAccepted() && !DevFlags.DEV_MODE) {
headLine("User agreement"); headLine("User agreement");
String text = "1. This software is experimental and provided \"as is\", without warranty of any kind, " + String text = "1. This software is experimental and provided \"as is\", without warranty of any kind, " +
"express or implied, including but not limited to the warranties of " + "express or implied, including but not limited to the warranties of " +

View file

@ -17,7 +17,7 @@
package io.bitsquare.gui.main.portfolio.pendingtrades.steps.buyer; package io.bitsquare.gui.main.portfolio.pendingtrades.steps.buyer;
import io.bitsquare.app.BitsquareApp; import io.bitsquare.app.DevFlags;
import io.bitsquare.common.util.Tuple3; import io.bitsquare.common.util.Tuple3;
import io.bitsquare.gui.components.TextFieldWithCopyIcon; import io.bitsquare.gui.components.TextFieldWithCopyIcon;
import io.bitsquare.gui.components.TitledGroupBg; import io.bitsquare.gui.components.TitledGroupBg;
@ -90,7 +90,7 @@ public class BuyerStep2View extends TradeStepView {
"Bitcoin, Btc or Bitsquare.\n\n" + "Bitcoin, Btc or Bitsquare.\n\n" +
"If your bank charges fees you have to cover those fees."; "If your bank charges fees you have to cover those fees.";
if (!BitsquareApp.DEV_MODE && preferences.showAgain(key)) { if (!DevFlags.DEV_MODE && preferences.showAgain(key)) {
preferences.dontShowAgain(key, true); preferences.dontShowAgain(key, true);
new Popup().headLine("Attention required for trade with ID " + trade.getShortId()) new Popup().headLine("Attention required for trade with ID " + trade.getShortId())
.attention(message) .attention(message)
@ -222,7 +222,7 @@ public class BuyerStep2View extends TradeStepView {
private void onPaymentStarted() { private void onPaymentStarted() {
if (model.p2PService.isBootstrapped()) { if (model.p2PService.isBootstrapped()) {
String key = "confirmPaymentStarted"; String key = "confirmPaymentStarted";
if (!BitsquareApp.DEV_MODE && preferences.showAgain(key)) { if (!DevFlags.DEV_MODE && preferences.showAgain(key)) {
Popup popup = new Popup(); Popup popup = new Popup();
popup.headLine("Confirm that you have started the payment") popup.headLine("Confirm that you have started the payment")
.confirmation("Did you initiate the " + CurrencyUtil.getNameByCode(trade.getOffer().getCurrencyCode()) + .confirmation("Did you initiate the " + CurrencyUtil.getNameByCode(trade.getOffer().getCurrencyCode()) +

View file

@ -17,7 +17,7 @@
package io.bitsquare.gui.main.portfolio.pendingtrades.steps.buyer; package io.bitsquare.gui.main.portfolio.pendingtrades.steps.buyer;
import io.bitsquare.app.BitsquareApp; import io.bitsquare.app.DevFlags;
import io.bitsquare.app.Log; import io.bitsquare.app.Log;
import io.bitsquare.btc.AddressEntry; import io.bitsquare.btc.AddressEntry;
import io.bitsquare.btc.AddressEntryException; import io.bitsquare.btc.AddressEntryException;
@ -149,11 +149,11 @@ public class BuyerStep5View extends TradeStepView {
}); });
withdrawToExternalWalletButton.setOnAction(e -> reviewWithdrawal()); withdrawToExternalWalletButton.setOnAction(e -> reviewWithdrawal());
if (BitsquareApp.DEV_MODE) { if (DevFlags.DEV_MODE) {
withdrawAddressTextField.setText("mjYhQYSbET2bXJDyCdNqYhqSye5QX2WHPz"); withdrawAddressTextField.setText("mjYhQYSbET2bXJDyCdNqYhqSye5QX2WHPz");
} else { } else {
String key = "tradeCompleted" + trade.getId(); String key = "tradeCompleted" + trade.getId();
if (!BitsquareApp.DEV_MODE && preferences.showAgain(key)) { if (!DevFlags.DEV_MODE && preferences.showAgain(key)) {
preferences.dontShowAgain(key, true); preferences.dontShowAgain(key, true);
new Notification().headLine("Trade completed") new Notification().headLine("Trade completed")
.notification("You can withdraw your funds now to your external Bitcoin wallet or transfer it to the Bitsquare wallet.") .notification("You can withdraw your funds now to your external Bitcoin wallet or transfer it to the Bitsquare wallet.")
@ -185,12 +185,12 @@ public class BuyerStep5View extends TradeStepView {
validateWithdrawAddress(); validateWithdrawAddress();
} else if (Restrictions.isAboveFixedTxFeeForTradesAndDust(senderAmount)) { } else if (Restrictions.isAboveFixedTxFeeForTradesAndDust(senderAmount)) {
if (BitsquareApp.DEV_MODE) { if (DevFlags.DEV_MODE) {
doWithdrawal(receiverAmount); doWithdrawal(receiverAmount);
} else { } else {
BSFormatter formatter = model.formatter; BSFormatter formatter = model.formatter;
String key = "reviewWithdrawalAtTradeComplete"; String key = "reviewWithdrawalAtTradeComplete";
if (!BitsquareApp.DEV_MODE && preferences.showAgain(key)) { if (!DevFlags.DEV_MODE && preferences.showAgain(key)) {
new Popup().headLine("Confirm withdrawal request") new Popup().headLine("Confirm withdrawal request")
.confirmation("Sending: " + formatter.formatCoinWithCode(senderAmount) + "\n" + .confirmation("Sending: " + formatter.formatCoinWithCode(senderAmount) + "\n" +
"From address: " + fromAddresses + "\n" + "From address: " + fromAddresses + "\n" +
@ -255,7 +255,7 @@ public class BuyerStep5View extends TradeStepView {
} }
private void handleTradeCompleted() { private void handleTradeCompleted() {
if (!BitsquareApp.DEV_MODE) { if (!DevFlags.DEV_MODE) {
String key = "tradeCompleteWithdrawCompletedInfo"; String key = "tradeCompleteWithdrawCompletedInfo";
new Popup().headLine("Withdrawal completed") new Popup().headLine("Withdrawal completed")
.feedback("Your completed trades are stored under \"Portfolio/History\".\n" + .feedback("Your completed trades are stored under \"Portfolio/History\".\n" +

View file

@ -17,7 +17,7 @@
package io.bitsquare.gui.main.portfolio.pendingtrades.steps.seller; package io.bitsquare.gui.main.portfolio.pendingtrades.steps.seller;
import io.bitsquare.app.BitsquareApp; import io.bitsquare.app.DevFlags;
import io.bitsquare.common.util.Tuple3; import io.bitsquare.common.util.Tuple3;
import io.bitsquare.gui.components.TextFieldWithCopyIcon; import io.bitsquare.gui.components.TextFieldWithCopyIcon;
import io.bitsquare.gui.components.TitledGroupBg; import io.bitsquare.gui.components.TitledGroupBg;
@ -84,7 +84,7 @@ public class SellerStep3View extends TradeStepView {
tradeAmountWithCode + " from the bitcoin buyer.\n\n" + tradeAmountWithCode + " from the bitcoin buyer.\n\n" +
"The trade ID (\"reason for payment\" text) of the transaction is: \"" + trade.getShortId() + "\""; "The trade ID (\"reason for payment\" text) of the transaction is: \"" + trade.getShortId() + "\"";
} }
if (!BitsquareApp.DEV_MODE && preferences.showAgain(key)) { if (!DevFlags.DEV_MODE && preferences.showAgain(key)) {
preferences.dontShowAgain(key, true); preferences.dontShowAgain(key, true);
new Popup().headLine("Attention required for trade with ID " + trade.getShortId()) new Popup().headLine("Attention required for trade with ID " + trade.getShortId())
.attention(message) .attention(message)
@ -237,7 +237,7 @@ public class SellerStep3View extends TradeStepView {
if (model.p2PService.isBootstrapped()) { if (model.p2PService.isBootstrapped()) {
Preferences preferences = model.dataModel.preferences; Preferences preferences = model.dataModel.preferences;
String key = "confirmPaymentReceived"; String key = "confirmPaymentReceived";
if (!BitsquareApp.DEV_MODE && preferences.showAgain(key)) { if (!DevFlags.DEV_MODE && preferences.showAgain(key)) {
new Popup() new Popup()
.headLine("Confirm that you have received the payment") .headLine("Confirm that you have received the payment")
.confirmation("Have you received the " + CurrencyUtil.getNameByCode(model.dataModel.getCurrencyCode()) + .confirmation("Have you received the " + CurrencyUtil.getNameByCode(model.dataModel.getCurrencyCode()) +