mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-09 15:12:26 -04:00
Cleanups, improve loggings
This commit is contained in:
parent
bee9d2c610
commit
406bcd31ef
34 changed files with 290 additions and 283 deletions
|
@ -28,6 +28,7 @@ import io.bitsquare.payment.PaymentAccount;
|
|||
import io.bitsquare.payment.PaymentAccountContractData;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -73,7 +74,7 @@ public class AliPayForm extends PaymentMethodForm {
|
|||
protected void autoFillNameTextField() {
|
||||
if (autoFillCheckBox != null && autoFillCheckBox.isSelected()) {
|
||||
String accountNr = accountNrInputTextField.getText();
|
||||
accountNr = accountNr.substring(0, Math.min(5, accountNr.length())) + "...";
|
||||
accountNr = StringUtils.abbreviate(accountNr, 5);
|
||||
String method = BSResources.get(paymentAccount.getPaymentMethod().getId());
|
||||
accountNameTextField.setText(method.concat(", ").concat(accountNr));
|
||||
}
|
||||
|
|
|
@ -33,6 +33,7 @@ import javafx.scene.control.ComboBox;
|
|||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import javafx.util.StringConverter;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -88,7 +89,7 @@ public class BlockChainForm extends PaymentMethodForm {
|
|||
if (autoFillCheckBox != null && autoFillCheckBox.isSelected()) {
|
||||
String method = BSResources.get(paymentAccount.getPaymentMethod().getId());
|
||||
String address = addressInputTextField.getText();
|
||||
address = address.substring(0, Math.min(9, address.length())) + "...";
|
||||
address = StringUtils.abbreviate(address, 9);
|
||||
String currency = paymentAccount.getSingleTradeCurrency() != null ? paymentAccount.getSingleTradeCurrency().getCode() : "?";
|
||||
accountNameTextField.setText(method.concat(", ").concat(currency).concat(", ").concat(address));
|
||||
}
|
||||
|
|
|
@ -35,6 +35,7 @@ import javafx.scene.control.TextField;
|
|||
import javafx.scene.control.Tooltip;
|
||||
import javafx.scene.layout.FlowPane;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -117,7 +118,7 @@ public class OKPayForm extends PaymentMethodForm {
|
|||
protected void autoFillNameTextField() {
|
||||
if (autoFillCheckBox != null && autoFillCheckBox.isSelected()) {
|
||||
String accountNr = accountNrInputTextField.getText();
|
||||
accountNr = accountNr.substring(0, Math.min(5, accountNr.length())) + "...";
|
||||
accountNr = StringUtils.abbreviate(accountNr, 5);
|
||||
String method = BSResources.get(paymentAccount.getPaymentMethod().getId());
|
||||
accountNameTextField.setText(method.concat(", ").concat(accountNr));
|
||||
}
|
||||
|
|
|
@ -28,6 +28,7 @@ import io.bitsquare.payment.PerfectMoneyAccount;
|
|||
import io.bitsquare.payment.PerfectMoneyAccountContractData;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -75,7 +76,7 @@ public class PerfectMoneyForm extends PaymentMethodForm {
|
|||
protected void autoFillNameTextField() {
|
||||
if (autoFillCheckBox != null && autoFillCheckBox.isSelected()) {
|
||||
String accountNr = accountNrInputTextField.getText();
|
||||
accountNr = accountNr.substring(0, Math.min(5, accountNr.length())) + "...";
|
||||
accountNr = StringUtils.abbreviate(accountNr, 5);
|
||||
String method = BSResources.get(paymentAccount.getPaymentMethod().getId());
|
||||
accountNameTextField.setText(method.concat(", ").concat(accountNr));
|
||||
}
|
||||
|
|
|
@ -36,6 +36,7 @@ import javafx.scene.layout.FlowPane;
|
|||
import javafx.scene.layout.GridPane;
|
||||
import javafx.scene.text.TextAlignment;
|
||||
import javafx.util.StringConverter;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -220,7 +221,7 @@ public class SepaForm extends PaymentMethodForm {
|
|||
if (autoFillCheckBox != null && autoFillCheckBox.isSelected()) {
|
||||
String iban = ibanInputTextField.getText();
|
||||
if (iban.length() > 5)
|
||||
iban = "..." + iban.substring(iban.length() - 5, iban.length());
|
||||
iban = StringUtils.abbreviate(iban, 5);
|
||||
String method = BSResources.get(paymentAccount.getPaymentMethod().getId());
|
||||
String country = paymentAccount.getCountry() != null ? paymentAccount.getCountry().code : "?";
|
||||
String currency = paymentAccount.getSingleTradeCurrency() != null ? paymentAccount.getSingleTradeCurrency().getCode() : "?";
|
||||
|
|
|
@ -28,6 +28,7 @@ import io.bitsquare.payment.SwishAccount;
|
|||
import io.bitsquare.payment.SwishAccountContractData;
|
||||
import javafx.scene.control.TextField;
|
||||
import javafx.scene.layout.GridPane;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
||||
|
@ -82,7 +83,7 @@ public class SwishForm extends PaymentMethodForm {
|
|||
protected void autoFillNameTextField() {
|
||||
if (autoFillCheckBox != null && autoFillCheckBox.isSelected()) {
|
||||
String mobileNr = mobileNrInputTextField.getText();
|
||||
mobileNr = mobileNr.substring(0, Math.min(5, mobileNr.length())) + "...";
|
||||
mobileNr = StringUtils.abbreviate(mobileNr, 5);
|
||||
String method = BSResources.get(paymentAccount.getPaymentMethod().getId());
|
||||
accountNameTextField.setText(method.concat(", ").concat(mobileNr));
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ import javafx.stage.Modality;
|
|||
import javafx.stage.Stage;
|
||||
import javafx.stage.StageStyle;
|
||||
import javafx.stage.Window;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.reactfx.util.FxTimer;
|
||||
import org.slf4j.Logger;
|
||||
import org.slf4j.LoggerFactory;
|
||||
|
@ -362,7 +363,7 @@ public class Popup {
|
|||
|
||||
protected void setTruncatedMessage() {
|
||||
if (message != null && message.length() > 800)
|
||||
truncatedMessage = message.substring(0, 800) + "...";
|
||||
truncatedMessage = StringUtils.abbreviate(message, 800);
|
||||
else
|
||||
truncatedMessage = message;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue