Skip to content

Commit

Permalink
Auto confirmation wording changes
Browse files Browse the repository at this point in the history
new warning about missing keys
added more info about running own API to the new settings popup
for dev mode, pre-populate tx proof keys
  • Loading branch information
jmacxx committed Aug 24, 2020
1 parent 13978e3 commit 9914600
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 7 deletions.
14 changes: 10 additions & 4 deletions core/src/main/resources/i18n/displayStrings.properties
Original file line number Diff line number Diff line change
Expand Up @@ -642,7 +642,11 @@ portfolio.pending.step2_buyer.fasterPaymentsHolderNameInfo=Some banks might veri
portfolio.pending.step2_buyer.confirmStart.headline=Confirm that you have started the payment
portfolio.pending.step2_buyer.confirmStart.msg=Did you initiate the {0} payment to your trading partner?
portfolio.pending.step2_buyer.confirmStart.yes=Yes, I have started the payment

portfolio.pending.step2_buyer.confirmStart.warningTitle=You have not provided proof of payment
portfolio.pending.step2_buyer.confirmStart.warning=You have not entered the transaction ID and the transaction key.\n\n\
In Bisq, the sender of the XMR transaction is the one responsible for \
providing this information to the mediator or arbitrator in case of a dispute.
portfolio.pending.step2_buyer.confirmStart.warningButton=Ignore and continue anyway
portfolio.pending.step2_seller.waitPayment.headline=Wait for payment
portfolio.pending.step2_seller.f2fInfo.headline=Buyer's contact information
portfolio.pending.step2_seller.waitPayment.msg=The deposit transaction has at least one blockchain confirmation.\nYou need to wait until the BTC buyer starts the {0} payment.
Expand Down Expand Up @@ -1240,9 +1244,11 @@ setting.about.shortcuts.sendFilter=Set Filter (privileged activity)
setting.about.shortcuts.sendPrivateNotification=Send private notification to peer (privileged activity)
setting.about.shortcuts.sendPrivateNotification.value=Open peer info at avatar or dispute and press: {0}

setting.info.headline=New XMR Autoconfirm feature
setting.info.msg=When selling BTC for XMR you can use the autoconfirm feature to verify that the correct amount of XMR has been deposited to your wallet and automatically confirm the trade, releasing BTC to the counterparty.\n\n\
This can make the trade process more efficient for both peers. Limits can also be set on the max amount of BTC that can be auto-confirmed. See the auto-confirm section on this page for more info and to enable the feature.
setting.info.headline=New XMR Auto confirm feature
setting.info.msg=When selling BTC for XMR you can use the auto confirm feature to verify that the correct amount of XMR has been deposited to your wallet and automatically confirm the trade, releasing BTC to the counterparty.\n\n\
This can make the trade process more efficient for both peers. Limits can also be set on the max amount of BTC that can be auto-confirmed. See the auto-confirm settings on this page for more info and to enable the feature.\n\n\
Auto confirmation relies on Bisq checking the XMR transaction on an explorer API. For maximum security it is recommended that you point Bisq to your own explorer service, but there are also services available run by Bisq (the default setting).\n\n\
For more information and details on how to setup, see the blog post here: [.....]

####################################################################
# Account
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@

import javax.annotation.Nullable;

import static bisq.common.app.DevEnv.isDevMode;
import static bisq.desktop.util.FormBuilder.addInputTextField;

public class SetXmrTxKeyWindow extends Overlay<SetXmrTxKeyWindow> {
Expand All @@ -57,6 +58,11 @@ public void show() {
regexValidator.setErrorMessage("Input must be a 32 byte hexadeximal number");
txHashInputTextField.setValidator(regexValidator);
txKeyInputTextField.setValidator(regexValidator);
if (isDevMode()) {
// pre-populate the fields with test data when in dev mode
txHashInputTextField.setText("e8dcd8160aee016d8a0d9c480355d65773dc577313a0af8237c35f9d997b01c0");
txKeyInputTextField.setText("300fa18ff99b32ff097d75c64d62732bdb486af8c225f558ee48c5f777f9b509");
}

applyStyles();
display();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -463,9 +463,14 @@ private void onPaymentStarted() {
.onAction(() -> {
String txKey = setXmrTxKeyWindow.getTxKey();
String txHash = setXmrTxKeyWindow.getTxHash();
trade.setCounterCurrencyExtraData(txKey);
trade.setCounterCurrencyTxId(txHash);
showConfirmPaymentStartedPopup();
if (txKey.length() == 64 && txHash.length() == 64) {
trade.setCounterCurrencyExtraData(txKey);
trade.setCounterCurrencyTxId(txHash);
showConfirmPaymentStartedPopup();
}
else {
showProofWarningPopup();
}
})
.closeButtonText(Res.get("shared.cancel"))
.onClose(setXmrTxKeyWindow::hide)
Expand All @@ -476,6 +481,18 @@ private void onPaymentStarted() {
}
}

private void showProofWarningPopup() {
Popup popup = new Popup();
popup.headLine(Res.get("portfolio.pending.step2_buyer.confirmStart.warningTitle"))
.confirmation(Res.get("portfolio.pending.step2_buyer.confirmStart.warning"))
.width(700)
.actionButtonText(Res.get("portfolio.pending.step2_buyer.confirmStart.warningButton"))
.onAction(this::showConfirmPaymentStartedPopup)
.closeButtonText(Res.get("shared.cancel"))
.onClose(popup::hide)
.show();
}

private void showConfirmPaymentStartedPopup() {
String key = "confirmPaymentStarted";
if (!DevEnv.isDevMode() && DontShowAgainLookup.showAgain(key)) {
Expand Down

0 comments on commit 9914600

Please sign in to comment.