Skip to content

Commit

Permalink
Merge pull request #5771 from jmacxx/fix_repeated_failed_trade_popup
Browse files Browse the repository at this point in the history
Option to not repeat popup message of locked up funds from failed trade
  • Loading branch information
ripcurlx committed Nov 2, 2021
2 parents 0e7abed + 1dffec0 commit 6f41558
Showing 1 changed file with 13 additions and 1 deletion.
14 changes: 13 additions & 1 deletion desktop/src/main/java/bisq/desktop/main/MainViewModel.java
Expand Up @@ -77,11 +77,15 @@
import bisq.common.app.DevEnv;
import bisq.common.app.Version;
import bisq.common.config.Config;
import bisq.common.crypto.Hash;
import bisq.common.file.CorruptedStorageFileHandler;
import bisq.common.util.Hex;
import bisq.common.util.Tuple2;

import com.google.inject.Inject;

import com.google.common.base.Charsets;

import org.fxmisc.easybind.EasyBind;
import org.fxmisc.easybind.monadic.MonadicBinding;

Expand Down Expand Up @@ -340,7 +344,15 @@ private void setupHandlers() {
bisqSetup.setChainFileLockedExceptionHandler(msg -> new Popup().warning(msg)
.useShutDownButton()
.show());
bisqSetup.setLockedUpFundsHandler(msg -> new Popup().width(850).warning(msg).show());
bisqSetup.setLockedUpFundsHandler(msg -> {
// repeated popups of the same message text can be stopped by selecting the "Dont show again" checkbox
String key = Hex.encode(Hash.getSha256Ripemd160hash(msg.getBytes(Charsets.UTF_8)));
if (preferences.showAgain(key)) {
new Popup().width(850).warning(msg)
.dontShowAgainId(key)
.show();
}
});
bisqSetup.setShowFirstPopupIfResyncSPVRequestedHandler(this::showFirstPopupIfResyncSPVRequested);
bisqSetup.setRequestWalletPasswordHandler(aesKeyHandler -> walletPasswordWindow
.onAesKey(aesKeyHandler::accept)
Expand Down

0 comments on commit 6f41558

Please sign in to comment.