Various small cleanups...

This commit is contained in:
chimp1984 2020-08-30 16:44:45 -05:00
parent 67723fa1a7
commit 595c968f2d
No known key found for this signature in database
GPG key ID: 9801B4EC591F90E3
8 changed files with 33 additions and 27 deletions

View file

@ -32,7 +32,7 @@ import lombok.extern.slf4j.Slf4j;
import javax.annotation.Nullable;
/**
* Manages the XMR transfers proof requests for multiple trades.
* Manages the XMR transfers proof requests for multiple trades and multiple services.
*/
@Slf4j
class XmrTransferProofService {

View file

@ -43,6 +43,11 @@ public final class AutoConfirmSettings implements PersistablePayload {
this.currencyCode = currencyCode;
}
///////////////////////////////////////////////////////////////////////////////////////////
// PROTO BUFFER
///////////////////////////////////////////////////////////////////////////////////////////
@Override
public Message toProtoMessage() {
return protobuf.AutoConfirmSettings.newBuilder()

View file

@ -128,9 +128,9 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
// list of XMR proof providers : this list will be used if no preference has been set
public static final List<String> getDefaultXmrProofProviders() {
if (DevEnv.isDevMode()) {
return new ArrayList<>(Arrays.asList(
"78.47.61.90:8081"));
return new ArrayList<>(Arrays.asList("78.47.61.90:8081"));
} else {
// TODO we need at least 2 for relase
return new ArrayList<>(Arrays.asList(
"monero3bec7m26vx6si6qo7q7imlaoz45ot5m2b5z2ppgoooo6jx2rqd.onion"));
}
@ -410,7 +410,7 @@ public final class Preferences implements PersistedDataHost, BridgeAddressProvid
persist();
}
// AutoConfirmSettings is currently only used for one coin: XMR. Although it could
// AutoConfirmSettings is currently only used for XMR. Although it could
// potentially in the future be used for others too. In the interest of flexibility
// we store it as a list in the proto definition, but in practical terms the
// application is not coded to handle more than one entry. For now this API

View file

@ -127,7 +127,7 @@ public final class PreferencesPayload implements UserThreadMappedPersistableEnve
private int blockNotifyPort;
private boolean tacAcceptedV120;
// Added after 1.3.7
// Added at 1.3.8
private List<AutoConfirmSettings> autoConfirmSettingsList = new ArrayList<>();

View file

@ -572,7 +572,7 @@ portfolio.pending.step3_seller.autoConfirmStatus=Auto-confirm status
portfolio.pending.autoConfirmTxNotFound=Transaction not found
portfolio.pending.autoConfirmPending=Pending
portfolio.pending.autoConfirmDisabled=Disabled
portfolio.pending.autoConfirmSuccess=Auto-Confirmed
portfolio.pending.autoConfirmSuccess=Auto-confirmed
portfolio.pending.step5.completed=Completed
portfolio.pending.step1.info=Deposit transaction has been published.\n{0} need to wait for at least one blockchain confirmation before starting the payment.
@ -643,8 +643,9 @@ portfolio.pending.step2_buyer.confirmStart.msg=Did you initiate the {0} payment
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\
By not providing this data the peer cannot use the auto confirm feature to release the BTC as soon the XMR has been received.\n\
Beside that, Bisq requires that the sender of the XMR transaction is able to provide this information to the mediator or arbitrator in case of a dispute.
By not providing this data the peer cannot use the auto-confirm feature to release the BTC as soon the XMR has been received.\n\
Beside that, Bisq requires that the sender of the XMR transaction is able to provide this information to the mediator or arbitrator in case of a dispute.\n\
See more details on the Bisq wiki: https://bisq.wiki/Trading_Monero#Auto-confirming_trades
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
@ -1069,7 +1070,7 @@ setting.preferences.avoidStandbyMode=Avoid standby mode
setting.preferences.autoConfirmXMR=XMR auto-confirm
setting.preferences.autoConfirmEnabled=Enabled
setting.preferences.autoConfirmRequiredConfirmations=Required confirmations
setting.preferences.autoConfirmMaxTradeSize=Max trade size (BTC)
setting.preferences.autoConfirmMaxTradeSize=Max. trade amount (BTC)
setting.preferences.autoConfirmServiceAddresses=Service addresses
setting.preferences.deviationToLarge=Values higher than {0}% are not allowed.
setting.preferences.txFee=Withdrawal transaction fee (satoshis/byte)
@ -1349,7 +1350,7 @@ https://bisq.wiki/Trading_Monero#Proving_payments\n\n\
Failure to provide the required transaction data will result in losing disputes.\n\n\
Also note that Bisq now offers automatic confirming for XMR transactions to make trades quicker, \
but you need to enable it in Settings.\n\n\
See the wiki for more about the auto-confirm feature:\n\
See the wiki for more information about the auto-confirm feature:\n\
https://bisq.wiki/Trading_Monero#Auto-confirming_trades
# suppress inspection "TrailingSpacesInProperty"
account.altcoin.popup.msr.msg=Trading MSR on Bisq requires that you understand and fulfill \
@ -2450,7 +2451,7 @@ filterWindow.priceRelayNode=Filtered price relay nodes (comma sep. onion address
filterWindow.btcNode=Filtered Bitcoin nodes (comma sep. addresses + port)
filterWindow.preventPublicBtcNetwork=Prevent usage of public Bitcoin network
filterWindow.disableDao=Disable DAO
filterWindow.disableAutoConf=Disable auto-confirmation (altcoins)
filterWindow.disableAutoConf=Disable auto-confirm
filterWindow.disableDaoBelowVersion=Min. version required for DAO
filterWindow.disableTradeBelowVersion=Min. version required for trading
filterWindow.add=Add filter

View file

@ -158,11 +158,11 @@ public class TradeDetailsWindow extends Overlay<TradeDetailsWindow> {
DisplayUtils.formatVolumeWithCode(trade.getTradeVolume()));
addConfirmationLabelLabel(gridPane, ++rowIndex, Res.get("shared.tradePrice"),
FormattingUtils.formatPrice(trade.getTradePrice()));
String methodText = Res.get(offer.getPaymentMethod().getId());
String paymentMethodText = Res.get(offer.getPaymentMethod().getId());
if (trade.getAutoConfirmResult().isSuccessState()) {
methodText += " (" + trade.getAutoConfirmResult().getTextStatus() + ")";
paymentMethodText += " (" + trade.getAutoConfirmResult().getTextStatus() + ")";
}
addConfirmationLabelLabel(gridPane, ++rowIndex, Res.get("shared.paymentMethod"), methodText);
addConfirmationLabelLabel(gridPane, ++rowIndex, Res.get("shared.paymentMethod"), paymentMethodText);
// second group
rows = 6;

View file

@ -225,7 +225,7 @@ public class SellerStep3View extends TradeStepView {
GridPane.setRowSpan(titledGroupBg, 4);
}
if (isBlockChain && trade.getOffer().getCurrencyCode().equalsIgnoreCase("XMR")) {
if (isBlockChain && trade.getOffer().getCurrencyCode().equals("XMR")) {
autoConfirmStatusField = addTopLabelTextFieldWithCopyIcon(gridPane, gridRow, 1,
Res.get("portfolio.pending.step3_seller.autoConfirmStatus"),
"", Layout.COMPACT_FIRST_ROW_AND_GROUP_DISTANCE).second;

View file

@ -1396,10 +1396,6 @@ message Trade {
AutoConfirmResult auto_confirm_result = 38;
}
message AutoConfirmResult {
string stateName = 1;
}
message BuyerAsMakerTrade {
Trade trade = 1;
}
@ -1561,6 +1557,14 @@ message PreferencesPayload {
repeated AutoConfirmSettings auto_confirm_settings = 56;
}
message AutoConfirmSettings {
bool enabled = 1;
int32 required_confirmations = 2;
int64 trade_limit = 3;
repeated string service_addresses = 4;
string currency_code = 5;
}
///////////////////////////////////////////////////////////////////////////////////////////
// UserPayload
///////////////////////////////////////////////////////////////////////////////////////////
@ -1583,6 +1587,10 @@ message UserPayload {
RefundAgent registered_refund_agent = 15;
}
message AutoConfirmResult {
string stateName = 1;
}
///////////////////////////////////////////////////////////////////////////////////////////
// DAO
///////////////////////////////////////////////////////////////////////////////////////////
@ -2042,14 +2050,6 @@ message TradeCurrency {
}
}
message AutoConfirmSettings {
bool enabled = 1;
int32 required_confirmations = 2;
int64 trade_limit = 3;
repeated string service_addresses = 4;
string currency_code = 5;
}
message CryptoCurrency {
bool is_asset = 1;
}