mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-02 19:56:23 -04:00
wip disable payment uri labels globally
This commit is contained in:
parent
655b233365
commit
23d1b8059a
2 changed files with 7 additions and 8 deletions
|
@ -368,10 +368,7 @@ public class DepositView extends ActivatableView<VBox, Void> {
|
||||||
|
|
||||||
@NotNull
|
@NotNull
|
||||||
private String getPaymentUri() {
|
private String getPaymentUri() {
|
||||||
return MoneroUtils.getPaymentUri(new MoneroTxConfig()
|
return GUIUtil.getMoneroURI(addressTextField.getAddress(), HavenoUtils.coinToAtomicUnits(getAmount()), paymentLabelString);
|
||||||
.setAddress(addressTextField.getAddress())
|
|
||||||
.setAmount(HavenoUtils.coinToAtomicUnits(getAmount()))
|
|
||||||
.setNote(paymentLabelString));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
///////////////////////////////////////////////////////////////////////////////////////////
|
///////////////////////////////////////////////////////////////////////////////////////////
|
||||||
|
|
|
@ -147,6 +147,8 @@ public class GUIUtil {
|
||||||
public final static int AMOUNT_DECIMALS_WITH_ZEROS = 3;
|
public final static int AMOUNT_DECIMALS_WITH_ZEROS = 3;
|
||||||
public final static int AMOUNT_DECIMALS = 4;
|
public final static int AMOUNT_DECIMALS = 4;
|
||||||
|
|
||||||
|
public static final boolean disablePaymentUriLabel = true; // universally disable payment uri labels, allowing bigger xmr logo overlays
|
||||||
|
|
||||||
private static Preferences preferences;
|
private static Preferences preferences;
|
||||||
|
|
||||||
public static void setPreferences(Preferences preferences) {
|
public static void setPreferences(Preferences preferences) {
|
||||||
|
@ -711,10 +713,10 @@ public class GUIUtil {
|
||||||
}
|
}
|
||||||
|
|
||||||
public static String getMoneroURI(String address, BigInteger amount, String label) {
|
public static String getMoneroURI(String address, BigInteger amount, String label) {
|
||||||
return MoneroUtils.getPaymentUri(new MoneroTxConfig()
|
MoneroTxConfig txConfig = new MoneroTxConfig().setAddress(address);
|
||||||
.setAddress(address)
|
if (amount != null) txConfig.setAmount(amount);
|
||||||
.setAmount(amount)
|
if (label != null && !label.isEmpty() && !disablePaymentUriLabel) txConfig.setNote(label);
|
||||||
.setNote(label));
|
return MoneroUtils.getPaymentUri(txConfig);
|
||||||
}
|
}
|
||||||
|
|
||||||
public static boolean isBootstrappedOrShowPopup(P2PService p2PService) {
|
public static boolean isBootstrappedOrShowPopup(P2PService p2PService) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue