mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-08-02 03:36:24 -04:00
show reserved amount in maker's offer details
This commit is contained in:
parent
e63141279c
commit
94ab3c1f9b
6 changed files with 51 additions and 22 deletions
|
@ -212,14 +212,14 @@ public class OfferDetailsWindow extends Overlay<OfferDetailsWindow> {
|
|||
addConfirmationLabelLabel(gridPane, rowIndex, offerTypeLabel,
|
||||
DisplayUtils.getDirectionBothSides(direction), firstRowDistance);
|
||||
}
|
||||
String btcAmount = Res.get("shared.xmrAmount");
|
||||
String amount = Res.get("shared.xmrAmount");
|
||||
if (takeOfferHandlerOptional.isPresent()) {
|
||||
addConfirmationLabelLabel(gridPane, ++rowIndex, btcAmount + xmrDirectionInfo,
|
||||
addConfirmationLabelLabel(gridPane, ++rowIndex, amount + xmrDirectionInfo,
|
||||
HavenoUtils.formatXmr(tradeAmount, true));
|
||||
addConfirmationLabelLabel(gridPane, ++rowIndex, VolumeUtil.formatVolumeLabel(currencyCode) + counterCurrencyDirectionInfo,
|
||||
VolumeUtil.formatVolumeWithCode(offer.getVolumeByAmount(tradeAmount)));
|
||||
} else {
|
||||
addConfirmationLabelLabel(gridPane, ++rowIndex, btcAmount + xmrDirectionInfo,
|
||||
addConfirmationLabelLabel(gridPane, ++rowIndex, amount + xmrDirectionInfo,
|
||||
HavenoUtils.formatXmr(offer.getAmount(), true));
|
||||
addConfirmationLabelLabel(gridPane, ++rowIndex, Res.get("offerDetailsWindow.minXmrAmount"),
|
||||
HavenoUtils.formatXmr(offer.getMinAmount(), true));
|
||||
|
@ -257,7 +257,8 @@ public class OfferDetailsWindow extends Overlay<OfferDetailsWindow> {
|
|||
final String makerPaymentAccountId = offer.getMakerPaymentAccountId();
|
||||
final PaymentAccount myPaymentAccount = user.getPaymentAccount(makerPaymentAccountId);
|
||||
String countryCode = offer.getCountryCode();
|
||||
if (offer.isMyOffer(keyRing) && makerPaymentAccountId != null && myPaymentAccount != null) {
|
||||
boolean isMyOffer = offer.isMyOffer(keyRing);
|
||||
if (isMyOffer && makerPaymentAccountId != null && myPaymentAccount != null) {
|
||||
addConfirmationLabelLabel(gridPane, ++rowIndex, Res.get("offerDetailsWindow.myTradingAccount"), myPaymentAccount.getAccountName());
|
||||
} else {
|
||||
final String method = Res.get(paymentMethod.getId());
|
||||
|
@ -316,11 +317,16 @@ public class OfferDetailsWindow extends Overlay<OfferDetailsWindow> {
|
|||
textArea.setEditable(false);
|
||||
}
|
||||
|
||||
// get amount reserved for the offer
|
||||
BigInteger reservedAmount = isMyOffer ? offer.getReservedAmount() : null;
|
||||
|
||||
rows = 3;
|
||||
if (countryCode != null)
|
||||
rows++;
|
||||
if (!isF2F)
|
||||
rows++;
|
||||
if (reservedAmount != null)
|
||||
rows++;
|
||||
|
||||
addTitledGroupBg(gridPane, ++rowIndex, rows, Res.get("shared.details"), Layout.GROUP_DISTANCE);
|
||||
addConfirmationLabelTextFieldWithCopyIcon(gridPane, rowIndex, Res.get("shared.offerId"), offer.getId(),
|
||||
|
@ -337,6 +343,9 @@ public class OfferDetailsWindow extends Overlay<OfferDetailsWindow> {
|
|||
" " +
|
||||
HavenoUtils.formatXmr(offer.getOfferPayload().getMaxSellerSecurityDeposit(), true);
|
||||
addConfirmationLabelLabel(gridPane, ++rowIndex, Res.get("shared.securityDeposit"), value);
|
||||
if (reservedAmount != null) {
|
||||
addConfirmationLabelLabel(gridPane, ++rowIndex, Res.get("shared.reservedAmount"), HavenoUtils.formatXmr(reservedAmount, true));
|
||||
}
|
||||
|
||||
if (countryCode != null && !isF2F)
|
||||
addConfirmationLabelLabel(gridPane, ++rowIndex, Res.get("offerDetailsWindow.countryBank"),
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue