diff --git a/core/src/main/java/io/bitsquare/btc/WalletService.java b/core/src/main/java/io/bitsquare/btc/WalletService.java
index 96dabb6b8c..0ea3dadf80 100644
--- a/core/src/main/java/io/bitsquare/btc/WalletService.java
+++ b/core/src/main/java/io/bitsquare/btc/WalletService.java
@@ -217,7 +217,7 @@ public class WalletService {
// reduce for mainnet testing
// TODO revert later when tested enough
FeePolicy.setSecurityDeposit(Coin.parseCoin("0.01")); // 4 EUR @ 400 EUR/BTC
- Restrictions.setMaxTradeAmount(Coin.parseCoin("0.01")); // 4 EUR @ 400 EUR/BTC
+ Restrictions.setMaxTradeAmount(Coin.parseCoin("0.1")); // 40 EUR @ 400 EUR/BTC
// Checkpoints are block headers that ship inside our app: for a new user, we pick the last header
// in the checkpoints file and then download the rest from the network. It makes things much faster.
diff --git a/core/src/main/java/io/bitsquare/user/PopupId.java b/core/src/main/java/io/bitsquare/user/PopupId.java
deleted file mode 100644
index 82543d7190..0000000000
--- a/core/src/main/java/io/bitsquare/user/PopupId.java
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * This file is part of Bitsquare.
- *
- * Bitsquare is free software: you can redistribute it and/or modify it
- * under the terms of the GNU Affero General Public License as published by
- * the Free Software Foundation, either version 3 of the License, or (at
- * your option) any later version.
- *
- * Bitsquare is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public
- * License for more details.
- *
- * You should have received a copy of the GNU Affero General Public License
- * along with Bitsquare. If not, see .
- */
-
-package io.bitsquare.user;
-
-public class PopupId {
-
- // We don't use an enum because it would break updates if we add a new item in a new version
-
- public static final String TRADE_WALLET = "tradeWallet";
- public static final String SEND_PAYMENT_INFO = "sendPaymentInfo";
- public static final String PAYMENT_SENT = "paymentSent";
- public static final String PAYMENT_RECEIVED = "paymentReceived";
-
-}
diff --git a/core/src/main/java/io/bitsquare/user/Preferences.java b/core/src/main/java/io/bitsquare/user/Preferences.java
index e00308f401..ced3c706a7 100644
--- a/core/src/main/java/io/bitsquare/user/Preferences.java
+++ b/core/src/main/java/io/bitsquare/user/Preferences.java
@@ -96,8 +96,6 @@ public final class Preferences implements Persistable {
private final ArrayList cryptoCurrencies;
private BlockChainExplorer blockChainExplorerMainNet;
private BlockChainExplorer blockChainExplorerTestNet;
- private boolean showNotifications = true;
- private boolean showInstructions = true;
private String backupDirectory;
private boolean autoSelectArbitrators = true;
private final Map showAgainMap;
@@ -146,8 +144,6 @@ public final class Preferences implements Persistable {
if (blockChainExplorerMainNet == null)
setBlockChainExplorerTestNet(blockChainExplorersMainNet.get(0));
- showNotifications = persisted.getShowNotifications();
- showInstructions = persisted.getShowInstructions();
backupDirectory = persisted.getBackupDirectory();
autoSelectArbitrators = persisted.getAutoSelectArbitrators();
showAgainMap = persisted.getShowAgainMap();
@@ -175,11 +171,6 @@ public final class Preferences implements Persistable {
setBlockChainExplorerMainNet(blockChainExplorersMainNet.get(0));
showAgainMap = new HashMap<>();
- showAgainMap.put(PopupId.TRADE_WALLET, true);
- showAgainMap.put(PopupId.SEND_PAYMENT_INFO, true);
- showAgainMap.put(PopupId.PAYMENT_SENT, true);
- showAgainMap.put(PopupId.PAYMENT_RECEIVED, true);
-
preferredLocale = getDefaultLocale();
preferredTradeCurrency = getDefaultTradeCurrency();
@@ -219,8 +210,22 @@ public final class Preferences implements Persistable {
tradeCurrenciesAsObservable.addAll(cryptoCurrencies);
}
- public void dontShowAgain(String id) {
- showAgainMap.put(id, false);
+ public void dontShowAgain(String key) {
+ showAgainMap.put(key, false);
+ storage.queueUpForSave(2000);
+ }
+
+ public void resetDontShowAgainForType() {
+ showAgainMap.clear();
+ storage.queueUpForSave(2000);
+ }
+
+ public void removeDontShowAgainForType(String type) {
+ showAgainMap.keySet().stream().forEach(key -> {
+ if (key.startsWith(type + "_"))
+ showAgainMap.put(key, true);
+ });
+
storage.queueUpForSave(2000);
}
@@ -317,16 +322,6 @@ public final class Preferences implements Persistable {
setBlockChainExplorerTestNet(blockChainExplorer);
}
- public void setShowNotifications(boolean showNotifications) {
- this.showNotifications = showNotifications;
- storage.queueUpForSave(2000);
- }
-
- public void setShowInstructions(boolean showInstructions) {
- this.showInstructions = showInstructions;
- storage.queueUpForSave(2000);
- }
-
public void setTacAccepted(boolean tacAccepted) {
this.tacAccepted = tacAccepted;
storage.queueUpForSave();
@@ -430,14 +425,6 @@ public final class Preferences implements Persistable {
return blockChainExplorersTestNet;
}
- public boolean getShowNotifications() {
- return showNotifications;
- }
-
- public boolean getShowInstructions() {
- return showInstructions;
- }
-
public String getBackupDirectory() {
return backupDirectory;
}
diff --git a/gui/src/main/java/io/bitsquare/gui/bitsquare.css b/gui/src/main/java/io/bitsquare/gui/bitsquare.css
index e90921af67..6a5abe16a7 100644
--- a/gui/src/main/java/io/bitsquare/gui/bitsquare.css
+++ b/gui/src/main/java/io/bitsquare/gui/bitsquare.css
@@ -973,5 +973,12 @@ textfield */
-fx-background-radius: 5 5 5 5;
-fx-background-insets: 5 5 20 20;
-fx-effect: dropshadow(gaussian, #000000, 15, 0, 2, 2);
-
}
+
+.popup-icon-information {
+ -fx-text-fill: #ddd;
+}
+
+.popup-icon-warning {
+ -fx-text-fill: #dd6900;
+}
\ No newline at end of file
diff --git a/gui/src/main/java/io/bitsquare/gui/main/account/arbitratorregistration/ArbitratorRegistrationView.java b/gui/src/main/java/io/bitsquare/gui/main/account/arbitratorregistration/ArbitratorRegistrationView.java
index 7fc167baad..f781d27944 100644
--- a/gui/src/main/java/io/bitsquare/gui/main/account/arbitratorregistration/ArbitratorRegistrationView.java
+++ b/gui/src/main/java/io/bitsquare/gui/main/account/arbitratorregistration/ArbitratorRegistrationView.java
@@ -225,7 +225,7 @@ public class ArbitratorRegistrationView extends ActivatableViewAndModel new Popup().information("You have successfully removed your arbitrator from the P2P network.").show(),
+ () -> new Popup().feedback("You have successfully removed your arbitrator from the P2P network.").show(),
(errorMessage) -> new Popup().error("Could not remove arbitrator.\nError message: " + errorMessage).show());
} else {
new Popup().warning("You need to wait until your client is bootstrapped in the network.\n" +
@@ -236,7 +236,7 @@ public class ArbitratorRegistrationView extends ActivatableViewAndModel new Popup().information("You have successfully registered your arbitrator to the P2P network.").show(),
+ () -> new Popup().feedback("You have successfully registered your arbitrator to the P2P network.").show(),
(errorMessage) -> new Popup().error("Could not register arbitrator.\nError message: " + errorMessage).show());
} else {
new Popup().warning("You need to wait until your client is bootstrapped in the network.\n" +
diff --git a/gui/src/main/java/io/bitsquare/gui/main/account/content/altcoinaccounts/AltCoinAccountsView.java b/gui/src/main/java/io/bitsquare/gui/main/account/content/altcoinaccounts/AltCoinAccountsView.java
index 146e8937ed..3291e03849 100644
--- a/gui/src/main/java/io/bitsquare/gui/main/account/content/altcoinaccounts/AltCoinAccountsView.java
+++ b/gui/src/main/java/io/bitsquare/gui/main/account/content/altcoinaccounts/AltCoinAccountsView.java
@@ -126,7 +126,8 @@ public class AltCoinAccountsView extends ActivatableViewAndModel {
model.onDeleteAccount(paymentAccount);
removeSelectAccountForm();
diff --git a/gui/src/main/java/io/bitsquare/gui/main/account/content/backup/BackupView.java b/gui/src/main/java/io/bitsquare/gui/main/account/content/backup/BackupView.java
index dbbe7b6b17..e336511478 100644
--- a/gui/src/main/java/io/bitsquare/gui/main/account/content/backup/BackupView.java
+++ b/gui/src/main/java/io/bitsquare/gui/main/account/content/backup/BackupView.java
@@ -104,7 +104,7 @@ public class BackupView extends ActivatableView {
String destination = Paths.get(backupDirectory, "bitsquare_backup_" + dateString).toString();
FileUtils.copyDirectory(new File(environment.getProperty(BitsquareEnvironment.APP_DATA_DIR_KEY)),
new File(destination));
- new Popup().information("Backup successfully saved at:\n" + destination).show();
+ new Popup().feedback("Backup successfully saved at:\n" + destination).show();
} catch (IOException e1) {
e1.printStackTrace();
log.error(e1.getMessage());
diff --git a/gui/src/main/java/io/bitsquare/gui/main/account/content/fiataccounts/FiatAccountsView.java b/gui/src/main/java/io/bitsquare/gui/main/account/content/fiataccounts/FiatAccountsView.java
index 138a7b4098..a833b98e25 100644
--- a/gui/src/main/java/io/bitsquare/gui/main/account/content/fiataccounts/FiatAccountsView.java
+++ b/gui/src/main/java/io/bitsquare/gui/main/account/content/fiataccounts/FiatAccountsView.java
@@ -128,7 +128,8 @@ public class FiatAccountsView extends ActivatableViewAndModel {
model.onDeleteAccount(paymentAccount);
removeSelectAccountForm();
diff --git a/gui/src/main/java/io/bitsquare/gui/main/account/content/password/PasswordView.java b/gui/src/main/java/io/bitsquare/gui/main/account/content/password/PasswordView.java
index 75068a1b0c..06c71accd1 100644
--- a/gui/src/main/java/io/bitsquare/gui/main/account/content/password/PasswordView.java
+++ b/gui/src/main/java/io/bitsquare/gui/main/account/content/password/PasswordView.java
@@ -113,14 +113,14 @@ public class PasswordView extends ActivatableView {
wallet.decrypt(aesKey);
tradeWalletService.setAesKey(null);
new Popup()
- .information("Wallet successfully decrypted and password protection removed.")
+ .feedback("Wallet successfully decrypted and password protection removed.")
.show();
passwordField.setText("");
repeatedPasswordField.setText("");
} else {
new Popup()
- .headLine("Wrong password")
- .message("Please try entering your password again, carefully checking for typos or spelling errors.")
+ .warning("You entered the wrong password.\n\n" +
+ "Please try entering your password again, carefully checking for typos or spelling errors.")
.show();
}
} else {
@@ -128,7 +128,7 @@ public class PasswordView extends ActivatableView {
// we save the key for the trade wallet as we don't require passwords here
tradeWalletService.setAesKey(aesKey);
new Popup()
- .information("Wallet successfully encrypted and password protection enabled.")
+ .feedback("Wallet successfully encrypted and password protection enabled.")
.show();
passwordField.setText("");
repeatedPasswordField.setText("");
diff --git a/gui/src/main/java/io/bitsquare/gui/main/account/content/seedwords/SeedWordsView.java b/gui/src/main/java/io/bitsquare/gui/main/account/content/seedwords/SeedWordsView.java
index 89845b029c..74a172c70a 100644
--- a/gui/src/main/java/io/bitsquare/gui/main/account/content/seedwords/SeedWordsView.java
+++ b/gui/src/main/java/io/bitsquare/gui/main/account/content/seedwords/SeedWordsView.java
@@ -198,17 +198,17 @@ public class SeedWordsView extends ActivatableView {
Wallet wallet = walletService.getWallet();
if (wallet.getBalance(Wallet.BalanceType.AVAILABLE).value > 0) {
new Popup()
- .headLine("Wallet is not empty")
- .warning("You must empty this wallet out before attempting to restore an older one, as mixing wallets " +
+ .warning("Your bitcoin wallet is not empty.\n\n" +
+ "You must empty this wallet before attempting to restore an older one, as mixing wallets " +
"together can lead to invalidated backups.\n\n" +
"Please finalize your trades, close all your open offers and go to the Funds section to withdraw your bitcoin.\n" +
"In case you cannot access your bitcoin you can use the emergency tool to empty the wallet.\n" +
- "To open that emergency tool press cmd + e.")
+ "To open that emergency tool press \"cmd + e\".")
.show();
} else if (wallet.isEncrypted()) {
new Popup()
- .headLine("Wallet is encrypted")
- .information("After restore, the wallet will no longer be encrypted and you must set a new password.")
+ .warning("Your bitcoin wallet is encrypted.\n\n" +
+ "After restore, the wallet will no longer be encrypted and you must set a new password.")
.closeButtonText("I understand")
.onClose(() -> doRestore()).show();
} else {
@@ -225,7 +225,7 @@ public class SeedWordsView extends ActivatableView {
log.debug("Wallet restored with seed words");
new Popup()
- .information("Wallet restored successfully with the new seed words.\n\n" +
+ .feedback("Wallet restored successfully with the new seed words.\n\n" +
"You need to shut down and restart the application.")
.closeButtonText("Shut down")
.onClose(() -> BitsquareApp.shutDownHandler.run()).show();
@@ -239,8 +239,8 @@ public class SeedWordsView extends ActivatableView {
throwable -> UserThread.execute(() -> {
log.error(throwable.getMessage());
new Popup()
- .headLine("Wrong password")
- .warning("Please try entering your password again, carefully checking for typos or spelling errors.")
+ .warning("You entered the wrong password.\n\n" +
+ "Please try entering your password again, carefully checking for typos or spelling errors.")
.show();
new Popup()
diff --git a/gui/src/main/java/io/bitsquare/gui/main/disputes/trader/TraderDisputeView.java b/gui/src/main/java/io/bitsquare/gui/main/disputes/trader/TraderDisputeView.java
index 1b589927ce..99919de7c3 100644
--- a/gui/src/main/java/io/bitsquare/gui/main/disputes/trader/TraderDisputeView.java
+++ b/gui/src/main/java/io/bitsquare/gui/main/disputes/trader/TraderDisputeView.java
@@ -289,7 +289,7 @@ public class TraderDisputeView extends ActivatableView {
}
}
} else {
- new Popup().error("You cannot send more then 3 attachments in one message.").show();
+ new Popup().warning("You cannot send more then 3 attachments in one message.").show();
}
}
diff --git a/gui/src/main/java/io/bitsquare/gui/main/funds/FundsView.java b/gui/src/main/java/io/bitsquare/gui/main/funds/FundsView.java
index 887dbf1708..2a04a3a510 100644
--- a/gui/src/main/java/io/bitsquare/gui/main/funds/FundsView.java
+++ b/gui/src/main/java/io/bitsquare/gui/main/funds/FundsView.java
@@ -18,6 +18,7 @@
package io.bitsquare.gui.main.funds;
import io.bitsquare.app.BitsquareApp;
+import io.bitsquare.common.util.Utilities;
import io.bitsquare.gui.Navigation;
import io.bitsquare.gui.common.model.Activatable;
import io.bitsquare.gui.common.view.*;
@@ -26,7 +27,6 @@ import io.bitsquare.gui.main.funds.reserved.ReservedView;
import io.bitsquare.gui.main.funds.transactions.TransactionsView;
import io.bitsquare.gui.main.funds.withdrawal.WithdrawalView;
import io.bitsquare.gui.main.popups.Popup;
-import io.bitsquare.user.PopupId;
import io.bitsquare.user.Preferences;
import javafx.beans.value.ChangeListener;
import javafx.fxml.FXML;
@@ -85,15 +85,20 @@ public class FundsView extends ActivatableViewAndModel {
else if (root.getSelectionModel().getSelectedItem() == transactionsTab)
navigation.navigateTo(MainView.class, FundsView.class, TransactionsView.class);
- String key = PopupId.TRADE_WALLET;
- String text = "Bitsquare does not use a single application wallet, but dedicated wallets for every trade.\n" +
- "Funding of the wallet will be done when needed, for instance when you create or take an offer.\n" +
- "Withdrawing funds can be done after a trade is completed.\n" +
- "Dedicated wallets help protect user privacy and prevent leaking information of previous trades to other" +
- "traders.\n\n" +
- "For more background information please see the Bitsquare FAQ on our web page.";
+ String key = "tradeWalletInfoAtFunds";
if (preferences.showAgain(key) && !BitsquareApp.DEV_MODE)
- new Popup().information(text).dontShowAgainId(key, preferences).show();
+ new Popup().backgroundInfo("Bitsquare does not use a single application wallet, but dedicated wallets for every trade.\n\n" +
+ "Funding of the wallet will be done when needed, for instance when you create or take an offer.\n" +
+ "Withdrawing funds can be done after a trade is completed.\n\n" +
+ "Dedicated wallets help protect user privacy and prevent leaking information of previous trades to other" +
+ "traders.")
+ .closeButtonText("I want to learn more")
+ .onClose(() -> Utilities.openWebPage("https://bitsquare.io/faq"))
+ .actionButtonText("I understand")
+ .onAction(() -> {
+ })
+ .dontShowAgainId(key, preferences)
+ .show();
}
@Override
diff --git a/gui/src/main/java/io/bitsquare/gui/main/funds/withdrawal/WithdrawalView.java b/gui/src/main/java/io/bitsquare/gui/main/funds/withdrawal/WithdrawalView.java
index 2d0726648e..f2ac7970f2 100644
--- a/gui/src/main/java/io/bitsquare/gui/main/funds/withdrawal/WithdrawalView.java
+++ b/gui/src/main/java/io/bitsquare/gui/main/funds/withdrawal/WithdrawalView.java
@@ -188,14 +188,16 @@ public class WithdrawalView extends ActivatableView {
if (BitsquareApp.DEV_MODE) {
doWithdraw(receiverAmount, callback);
} else {
- new Popup().headLine("Confirm your withdrawal request")
- .message("Sending: " + formatter.formatCoinWithCode(senderAmount) + "\n" +
+ new Popup().headLine("Confirm withdrawal request")
+ .confirmation("Sending: " + formatter.formatCoinWithCode(senderAmount) + "\n" +
"From address: " + withdrawFromTextField.getText() + "\n" +
"To receiving address: " + withdrawToTextField.getText() + ".\n" +
"Required transaction fee is: " + formatter.formatCoinWithCode(requiredFee) + "\n\n" +
"The recipient will receive: " + formatter.formatCoinWithCode(receiverAmount) + "\n\n" +
"Are you sure you want to withdraw that amount?")
+ .actionButtonText("Yes")
.onAction(() -> doWithdraw(receiverAmount, callback))
+ .closeButtonText("Cancel")
.show();
}
@@ -323,10 +325,10 @@ public class WithdrawalView extends ActivatableView {
reset();
updateList();
} catch (AddressFormatException e) {
- new Popup().error("The address is not correct. Please check the address format.").show();
+ new Popup().warning("The address is not correct. Please check the address format.").show();
} catch (InsufficientMoneyException e) {
log.warn(e.getMessage());
- new Popup().error("You don't have enough fund in your wallet.").show();
+ new Popup().warning("You don't have enough fund in your wallet.").show();
}
}
diff --git a/gui/src/main/java/io/bitsquare/gui/main/help/Help.java b/gui/src/main/java/io/bitsquare/gui/main/help/Help.java
index d7ac8c23c6..e8ba0a27cb 100644
--- a/gui/src/main/java/io/bitsquare/gui/main/help/Help.java
+++ b/gui/src/main/java/io/bitsquare/gui/main/help/Help.java
@@ -33,7 +33,9 @@ public class Help {
public static void openWindow(HelpId id) {
try {
- Utilities.openWebPage("https://github.com/bitsquare/bitsquare/wiki/User-Guide");
+ // TODO create user guide
+ Utilities.openWebPage("http://bitsquare.io/faq");
+ // Utilities.openWebPage("https://github.com/bitsquare/bitsquare/wiki/User-Guide");
} catch (Exception e) {
log.error(e.getMessage());
new Popup().warning("Opening browser failed. Please check your internet " +
diff --git a/gui/src/main/java/io/bitsquare/gui/main/help/HelpId.java b/gui/src/main/java/io/bitsquare/gui/main/help/HelpId.java
index bf820abca5..a29f4ddfde 100644
--- a/gui/src/main/java/io/bitsquare/gui/main/help/HelpId.java
+++ b/gui/src/main/java/io/bitsquare/gui/main/help/HelpId.java
@@ -37,6 +37,4 @@ public enum HelpId {
SETUP_FIAT_ACCOUNT,
MANAGE_FIAT_ACCOUNT,
PAY_ACCOUNT_FEE
-
-
}
diff --git a/gui/src/main/java/io/bitsquare/gui/main/notifications/Notification.java b/gui/src/main/java/io/bitsquare/gui/main/notifications/Notification.java
index f67b6428b4..9a432491d2 100644
--- a/gui/src/main/java/io/bitsquare/gui/main/notifications/Notification.java
+++ b/gui/src/main/java/io/bitsquare/gui/main/notifications/Notification.java
@@ -1,5 +1,7 @@
package io.bitsquare.gui.main.notifications;
+import io.bitsquare.common.Timer;
+import io.bitsquare.common.UserThread;
import io.bitsquare.gui.main.popups.Popup;
import javafx.animation.Interpolator;
import javafx.animation.KeyFrame;
@@ -19,6 +21,8 @@ import org.slf4j.LoggerFactory;
public class Notification extends Popup {
private static final Logger log = LoggerFactory.getLogger(Notification.class);
private boolean hasBeenDisplayed;
+ private boolean autoClose;
+ private Timer autoCloseTimer;
public Notification() {
width = 345; // 320 visible bg because of insets
@@ -33,6 +37,10 @@ public class Notification extends Popup {
return headLine("Notification for trade with ID " + tradeId);
}
+ public Notification notification(String message) {
+ return (Notification) super.notification(message);
+ }
+
public Notification disputeHeadLine(String tradeId) {
return headLine("Support ticket for trade with ID " + tradeId);
}
@@ -52,13 +60,26 @@ public class Notification extends Popup {
hasBeenDisplayed = true;
}
+ public Notification autoClose() {
+ autoClose = true;
+ return this;
+ }
+
@Override
public void display() {
super.display();
+
+ if (autoClose && autoCloseTimer == null)
+ autoCloseTimer = UserThread.runAfter(this::hide, 5);
}
@Override
protected void animateHide(Runnable onFinishedHandler) {
+ if (autoCloseTimer != null) {
+ autoCloseTimer.stop();
+ autoCloseTimer = null;
+ }
+
if (NotificationCenter.useAnimations) {
double duration = 400;
Interpolator interpolator = Interpolator.SPLINE(0.25, 0.1, 0.25, 1);
diff --git a/gui/src/main/java/io/bitsquare/gui/main/notifications/NotificationCenter.java b/gui/src/main/java/io/bitsquare/gui/main/notifications/NotificationCenter.java
index 0cabf64cee..d617629297 100644
--- a/gui/src/main/java/io/bitsquare/gui/main/notifications/NotificationCenter.java
+++ b/gui/src/main/java/io/bitsquare/gui/main/notifications/NotificationCenter.java
@@ -50,7 +50,6 @@ public class NotificationCenter {
private final TradeManager tradeManager;
private final DisputeManager disputeManager;
- private final Preferences preferences;
private final Navigation navigation;
private final Map disputeStateSubscriptionsMap = new HashMap<>();
@@ -67,7 +66,6 @@ public class NotificationCenter {
public NotificationCenter(TradeManager tradeManager, DisputeManager disputeManager, Preferences preferences, Navigation navigation) {
this.tradeManager = tradeManager;
this.disputeManager = disputeManager;
- this.preferences = preferences;
this.navigation = navigation;
EasyBind.subscribe(preferences.useAnimationsProperty(), useAnimations -> NotificationCenter.useAnimations = useAnimations);
diff --git a/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferDataModel.java b/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferDataModel.java
index ef7a5ce1bc..26851366f0 100644
--- a/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferDataModel.java
+++ b/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferDataModel.java
@@ -29,6 +29,7 @@ import io.bitsquare.btc.pricefeed.PriceFeed;
import io.bitsquare.common.UserThread;
import io.bitsquare.common.crypto.KeyRing;
import io.bitsquare.gui.common.model.ActivatableDataModel;
+import io.bitsquare.gui.main.notifications.Notification;
import io.bitsquare.gui.main.popups.Popup;
import io.bitsquare.gui.main.popups.WalletPasswordPopup;
import io.bitsquare.gui.util.BSFormatter;
@@ -381,8 +382,15 @@ class CreateOfferDataModel extends ActivatableDataModel {
private void updateBalance(Coin balance) {
isWalletFunded.set(totalToPayAsCoin.get() != null && balance.compareTo(totalToPayAsCoin.get()) >= 0);
- if (isWalletFunded.get())
+ if (isWalletFunded.get()) {
walletService.removeBalanceListener(balanceListener);
+ new Notification()
+ .headLine("Trading wallet update")
+ .notification("Your trading wallet is sufficiently funded.\n" +
+ "Amount: " + formatter.formatCoinWithCode(totalToPayAsCoin.get()))
+ .autoClose()
+ .show();
+ }
}
public Coin getOfferFeeAsCoin() {
diff --git a/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferView.java b/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferView.java
index 5400db274c..ce4c3d4b2f 100644
--- a/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferView.java
+++ b/gui/src/main/java/io/bitsquare/gui/main/offer/createoffer/CreateOfferView.java
@@ -23,6 +23,7 @@ import io.bitsquare.app.BitsquareApp;
import io.bitsquare.btc.FeePolicy;
import io.bitsquare.common.util.Tuple2;
import io.bitsquare.common.util.Tuple3;
+import io.bitsquare.common.util.Utilities;
import io.bitsquare.gui.Navigation;
import io.bitsquare.gui.common.view.ActivatableViewAndModel;
import io.bitsquare.gui.common.view.FxmlView;
@@ -111,6 +112,7 @@ public class CreateOfferView extends ActivatableViewAndModel currencyComboBoxSelectionHandler;
private int gridRow = 0;
private final Preferences preferences;
+ private ChangeListener tradeCurrencyCodeListener;
///////////////////////////////////////////////////////////////////////////////////////////
@@ -171,6 +173,8 @@ public class CreateOfferView extends ActivatableViewAndModel