Skip to content

Commit

Permalink
Improve BSQ swap error messaging.
Browse files Browse the repository at this point in the history
Re-enable popup warning indicating when DAO needs to be resynced.
  • Loading branch information
jmacxx authored and ripcurlx committed Feb 21, 2022
1 parent 5e0ebf1 commit 99be324
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
3 changes: 2 additions & 1 deletion core/src/main/java/bisq/core/trade/TradeManager.java
Original file line number Diff line number Diff line change
Expand Up @@ -364,7 +364,8 @@ private void handleBsqSwapRequest(NodeAddress peer, BsqSwapRequest request) {
peer,
errorMessage -> {
if (takeOfferRequestErrorMessageHandler != null)
takeOfferRequestErrorMessageHandler.handleErrorMessage(errorMessage);
takeOfferRequestErrorMessageHandler.handleErrorMessage(
errorMessage + Res.get("notification.bsqSwap.errorHelp"));
});

requestPersistence();
Expand Down
9 changes: 9 additions & 0 deletions core/src/main/resources/i18n/displayStrings.properties
Original file line number Diff line number Diff line change
Expand Up @@ -3164,6 +3164,15 @@ notification.bsqSwap.maker.headline=BSQ swap completed
notification.bsqSwap.maker.tradeCompleted=Your offer with ID ''{0}'' has been taken.
notification.bsqSwap.confirmed.headline=BSQ swap transaction confirmed
notification.bsqSwap.confirmed.text=The BSQ swap transaction for trade with ID ''{0}'' is confirmed.
notification.bsqSwap.errorHelp=\n\n\
Trade failures with BSQ swaps are rare, in cases like this it is worthwhile checking if:\n\
● your DAO state is synced without error.\n\
● your SPV wallet is functioning well.\n\n\
DAO state can be checked by navigating to DAO -> Network Monitor -> DAO State. It can be resynced by \
pressing the button "Rebuild DAO State From Resources" under Settings -> Preferences.\n\n\
SPV status is harder to determine, usually a resync is necessary whenever you experience problems transacting \
on the blockchain. More info at [HYPERLINK:https://bisq.wiki/Resyncing_SPV_file]


####################################################################
# System Tray
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -378,8 +378,8 @@ protected void addSubscriptions() {
if (newValue == null) {
return;
}
new Popup().error(Res.get("takeOffer.error.message", model.errorMessage.get()) + "\n\n" +
Res.get("popup.error.tryRestart"))
new Popup().warning(Res.get("takeOffer.error.message", model.errorMessage.get()) +
Res.get("notification.bsqSwap.errorHelp"))
.onClose(() -> {
model.resetErrorMessage();
model.dataModel.removeOffer();
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package bisq.desktop.main.presentation;

import bisq.desktop.Navigation;
import bisq.desktop.util.GUIUtil;

import bisq.core.btc.wallet.BsqWalletService;
import bisq.core.btc.wallet.BtcWalletService;
Expand Down Expand Up @@ -98,9 +99,7 @@ private void onUpdateAnyChainHeight() {
bsqInfo.set("");
if (daoFacade.isInConflictWithSeedNode() && !daoConflictWarningShown) {
daoConflictWarningShown = true; // only warn max 1 time per session so as not to annoy
// TODO: only temporarily removed for v1.8.2 to prevent showing false positives and will be
// re-enabled with the next release
// GUIUtil.showDaoNeedsResyncPopup(navigation);
GUIUtil.showDaoNeedsResyncPopup(navigation);
}
} else {
bsqInfo.set(Res.get("mainView.footer.bsqInfo.synchronizing"));
Expand Down

0 comments on commit 99be324

Please sign in to comment.