Skip to content

Commit

Permalink
Show close button when creating offer without required account
Browse files Browse the repository at this point in the history
Issue: When attempting to create an offer without a trading account for
the selected currency, a prompt is shown asking the user whether to still
create an offer or to create a new account. But this prompt is missing a
cancel/close button in case you don't want to do either action. And
pressing Esc on the keyboard proceeds to create the account.

Cause: The close button on the prompt was renamed and being used to
create a new account.

Fix: Use the close button as a close button and add a secondary action
button to create a new account. The popup width was increased to
accommodate the long button text without being truncated.
  • Loading branch information
devinbileck committed Mar 26, 2019
1 parent 15bf8ff commit b86da39
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -408,11 +408,12 @@ private void onCreateOffer() {
createOfferButton.setDisable(true);
offerActionHandler.onCreateOffer(model.getSelectedTradeCurrency());
})
.closeButtonText(Res.get("offerbook.setupNewAccount"))
.onClose(() -> {
.secondaryActionButtonText(Res.get("offerbook.setupNewAccount"))
.onSecondaryAction(() -> {
navigation.setReturnPath(navigation.getCurrentPath());
navigation.navigateTo(MainView.class, AccountView.class, FiatAccountsView.class);
})
.width(725)
.show();
} else if (!model.hasAcceptedArbitrators()) {
new Popup<>().warning(Res.get("popup.warning.noArbitratorsAvailable")).show();
Expand Down

0 comments on commit b86da39

Please sign in to comment.