mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-01 11:16:11 -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
|
||||
private String getPaymentUri() {
|
||||
return MoneroUtils.getPaymentUri(new MoneroTxConfig()
|
||||
.setAddress(addressTextField.getAddress())
|
||||
.setAmount(HavenoUtils.coinToAtomicUnits(getAmount()))
|
||||
.setNote(paymentLabelString));
|
||||
return GUIUtil.getMoneroURI(addressTextField.getAddress(), HavenoUtils.coinToAtomicUnits(getAmount()), paymentLabelString);
|
||||
}
|
||||
|
||||
///////////////////////////////////////////////////////////////////////////////////////////
|
||||
|
|
|
@ -147,6 +147,8 @@ public class GUIUtil {
|
|||
public final static int AMOUNT_DECIMALS_WITH_ZEROS = 3;
|
||||
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;
|
||||
|
||||
public static void setPreferences(Preferences preferences) {
|
||||
|
@ -711,10 +713,10 @@ public class GUIUtil {
|
|||
}
|
||||
|
||||
public static String getMoneroURI(String address, BigInteger amount, String label) {
|
||||
return MoneroUtils.getPaymentUri(new MoneroTxConfig()
|
||||
.setAddress(address)
|
||||
.setAmount(amount)
|
||||
.setNote(label));
|
||||
MoneroTxConfig txConfig = new MoneroTxConfig().setAddress(address);
|
||||
if (amount != null) txConfig.setAmount(amount);
|
||||
if (label != null && !label.isEmpty() && !disablePaymentUriLabel) txConfig.setNote(label);
|
||||
return MoneroUtils.getPaymentUri(txConfig);
|
||||
}
|
||||
|
||||
public static boolean isBootstrappedOrShowPopup(P2PService p2PService) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue