mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-01-20 09:44:40 +00:00
fix showing extra info in offer details
Some checks are pending
Some checks are pending
This commit is contained in:
parent
533527e362
commit
2f322674f8
4 changed files with 12 additions and 2 deletions
|
@ -432,6 +432,8 @@ public class Offer implements NetworkPayload, PersistablePayload {
|
||||||
return getExtraDataMap().get(OfferPayload.PAYPAL_EXTRA_INFO);
|
return getExtraDataMap().get(OfferPayload.PAYPAL_EXTRA_INFO);
|
||||||
else if (getExtraDataMap() != null && getExtraDataMap().containsKey(OfferPayload.CASHAPP_EXTRA_INFO))
|
else if (getExtraDataMap() != null && getExtraDataMap().containsKey(OfferPayload.CASHAPP_EXTRA_INFO))
|
||||||
return getExtraDataMap().get(OfferPayload.CASHAPP_EXTRA_INFO);
|
return getExtraDataMap().get(OfferPayload.CASHAPP_EXTRA_INFO);
|
||||||
|
else if (getExtraDataMap() != null && getExtraDataMap().containsKey(OfferPayload.CASH_AT_ATM_EXTRA_INFO))
|
||||||
|
return getExtraDataMap().get(OfferPayload.CASH_AT_ATM_EXTRA_INFO);
|
||||||
else
|
else
|
||||||
return "";
|
return "";
|
||||||
}
|
}
|
||||||
|
|
|
@ -102,6 +102,7 @@ public final class OfferPayload implements ProtectedStoragePayload, ExpirablePay
|
||||||
public static final String PAY_BY_MAIL_EXTRA_INFO = "payByMailExtraInfo";
|
public static final String PAY_BY_MAIL_EXTRA_INFO = "payByMailExtraInfo";
|
||||||
public static final String AUSTRALIA_PAYID_EXTRA_INFO = "australiaPayidExtraInfo";
|
public static final String AUSTRALIA_PAYID_EXTRA_INFO = "australiaPayidExtraInfo";
|
||||||
public static final String PAYPAL_EXTRA_INFO = "payPalExtraInfo";
|
public static final String PAYPAL_EXTRA_INFO = "payPalExtraInfo";
|
||||||
|
public static final String CASH_AT_ATM_EXTRA_INFO = "cashAtAtmExtraInfo";
|
||||||
|
|
||||||
// Comma separated list of ordinal of a haveno.common.app.Capability. E.g. ordinal of
|
// Comma separated list of ordinal of a haveno.common.app.Capability. E.g. ordinal of
|
||||||
// Capability.SIGNED_ACCOUNT_AGE_WITNESS is 11 and Capability.MEDIATION is 12 so if we want to signal that maker
|
// Capability.SIGNED_ACCOUNT_AGE_WITNESS is 11 and Capability.MEDIATION is 12 so if we want to signal that maker
|
||||||
|
|
|
@ -37,6 +37,7 @@ import haveno.core.monetary.Volume;
|
||||||
import static haveno.core.offer.OfferPayload.ACCOUNT_AGE_WITNESS_HASH;
|
import static haveno.core.offer.OfferPayload.ACCOUNT_AGE_WITNESS_HASH;
|
||||||
import static haveno.core.offer.OfferPayload.AUSTRALIA_PAYID_EXTRA_INFO;
|
import static haveno.core.offer.OfferPayload.AUSTRALIA_PAYID_EXTRA_INFO;
|
||||||
import static haveno.core.offer.OfferPayload.CAPABILITIES;
|
import static haveno.core.offer.OfferPayload.CAPABILITIES;
|
||||||
|
import static haveno.core.offer.OfferPayload.CASH_AT_ATM_EXTRA_INFO;
|
||||||
import static haveno.core.offer.OfferPayload.CASHAPP_EXTRA_INFO;
|
import static haveno.core.offer.OfferPayload.CASHAPP_EXTRA_INFO;
|
||||||
import static haveno.core.offer.OfferPayload.F2F_CITY;
|
import static haveno.core.offer.OfferPayload.F2F_CITY;
|
||||||
import static haveno.core.offer.OfferPayload.F2F_EXTRA_INFO;
|
import static haveno.core.offer.OfferPayload.F2F_EXTRA_INFO;
|
||||||
|
@ -48,6 +49,7 @@ import static haveno.core.offer.OfferPayload.XMR_AUTO_CONF_ENABLED_VALUE;
|
||||||
|
|
||||||
import haveno.core.payment.AustraliaPayidAccount;
|
import haveno.core.payment.AustraliaPayidAccount;
|
||||||
import haveno.core.payment.CashAppAccount;
|
import haveno.core.payment.CashAppAccount;
|
||||||
|
import haveno.core.payment.CashAtAtmAccount;
|
||||||
import haveno.core.payment.F2FAccount;
|
import haveno.core.payment.F2FAccount;
|
||||||
import haveno.core.payment.PayByMailAccount;
|
import haveno.core.payment.PayByMailAccount;
|
||||||
import haveno.core.payment.PayPalAccount;
|
import haveno.core.payment.PayPalAccount;
|
||||||
|
@ -217,6 +219,10 @@ public class OfferUtil {
|
||||||
extraDataMap.put(AUSTRALIA_PAYID_EXTRA_INFO, ((AustraliaPayidAccount) paymentAccount).getExtraInfo());
|
extraDataMap.put(AUSTRALIA_PAYID_EXTRA_INFO, ((AustraliaPayidAccount) paymentAccount).getExtraInfo());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (paymentAccount instanceof CashAtAtmAccount) {
|
||||||
|
extraDataMap.put(CASH_AT_ATM_EXTRA_INFO, ((CashAtAtmAccount) paymentAccount).getExtraInfo());
|
||||||
|
}
|
||||||
|
|
||||||
extraDataMap.put(CAPABILITIES, Capabilities.app.toStringList());
|
extraDataMap.put(CAPABILITIES, Capabilities.app.toStringList());
|
||||||
|
|
||||||
if (currencyCode.equals("XMR") && direction == OfferDirection.SELL) {
|
if (currencyCode.equals("XMR") && direction == OfferDirection.SELL) {
|
||||||
|
|
|
@ -180,8 +180,9 @@ public class OfferDetailsWindow extends Overlay<OfferDetailsWindow> {
|
||||||
boolean showExtraInfo = offer.getPaymentMethod().equals(PaymentMethod.F2F) ||
|
boolean showExtraInfo = offer.getPaymentMethod().equals(PaymentMethod.F2F) ||
|
||||||
offer.getPaymentMethod().equals(PaymentMethod.PAY_BY_MAIL) ||
|
offer.getPaymentMethod().equals(PaymentMethod.PAY_BY_MAIL) ||
|
||||||
offer.getPaymentMethod().equals(PaymentMethod.AUSTRALIA_PAYID)||
|
offer.getPaymentMethod().equals(PaymentMethod.AUSTRALIA_PAYID)||
|
||||||
offer.getPaymentMethod().equals(PaymentMethod.PAYPAL_ID)||
|
offer.getPaymentMethod().equals(PaymentMethod.PAYPAL)||
|
||||||
offer.getPaymentMethod().equals(PaymentMethod.CASH_APP_ID);
|
offer.getPaymentMethod().equals(PaymentMethod.CASH_APP) ||
|
||||||
|
offer.getPaymentMethod().equals(PaymentMethod.CASH_AT_ATM);
|
||||||
if (!takeOfferHandlerOptional.isPresent())
|
if (!takeOfferHandlerOptional.isPresent())
|
||||||
rows++;
|
rows++;
|
||||||
if (showAcceptedBanks)
|
if (showAcceptedBanks)
|
||||||
|
|
Loading…
Reference in a new issue