mirror of
https://github.com/boldsuck/haveno.git
synced 2025-01-03 14:49:25 +00:00
grpc offer info returns atomic units
This commit is contained in:
parent
fb1b8f8bd8
commit
a21628ad0d
1 changed files with 7 additions and 6 deletions
|
@ -21,6 +21,7 @@ import bisq.core.api.model.builder.OfferInfoBuilder;
|
||||||
import bisq.core.monetary.Price;
|
import bisq.core.monetary.Price;
|
||||||
import bisq.core.offer.Offer;
|
import bisq.core.offer.Offer;
|
||||||
import bisq.core.offer.OpenOffer;
|
import bisq.core.offer.OpenOffer;
|
||||||
|
import bisq.core.trade.HavenoUtils;
|
||||||
import bisq.common.Payload;
|
import bisq.common.Payload;
|
||||||
import bisq.common.proto.ProtoUtil;
|
import bisq.common.proto.ProtoUtil;
|
||||||
import java.util.Optional;
|
import java.util.Optional;
|
||||||
|
@ -150,15 +151,15 @@ public class OfferInfo implements Payload {
|
||||||
.withPrice(preciseOfferPrice)
|
.withPrice(preciseOfferPrice)
|
||||||
.withUseMarketBasedPrice(offer.isUseMarketBasedPrice())
|
.withUseMarketBasedPrice(offer.isUseMarketBasedPrice())
|
||||||
.withMarketPriceMarginPct(marketPriceMarginAsPctLiteral)
|
.withMarketPriceMarginPct(marketPriceMarginAsPctLiteral)
|
||||||
.withAmount(offer.getAmount().value)
|
.withAmount(HavenoUtils.centinerosToAtomicUnits(offer.getAmount().value).longValueExact())
|
||||||
.withMinAmount(offer.getMinAmount().value)
|
.withMinAmount(HavenoUtils.centinerosToAtomicUnits(offer.getMinAmount().value).longValueExact())
|
||||||
.withVolume(roundedVolume)
|
.withVolume(roundedVolume)
|
||||||
.withMinVolume(roundedMinVolume)
|
.withMinVolume(roundedMinVolume)
|
||||||
.withMakerFee(offer.getMakerFee().value)
|
.withMakerFee(HavenoUtils.centinerosToAtomicUnits(offer.getMakerFee().value).longValueExact())
|
||||||
.withTxFee(offer.getTxFee().value)
|
.withTxFee(HavenoUtils.centinerosToAtomicUnits(offer.getTxFee().value).longValueExact())
|
||||||
.withOfferFeePaymentTxId(offer.getOfferFeePaymentTxId())
|
.withOfferFeePaymentTxId(offer.getOfferFeePaymentTxId())
|
||||||
.withBuyerSecurityDeposit(offer.getBuyerSecurityDeposit().value)
|
.withBuyerSecurityDeposit(HavenoUtils.centinerosToAtomicUnits(offer.getBuyerSecurityDeposit().value).longValueExact())
|
||||||
.withSellerSecurityDeposit(offer.getSellerSecurityDeposit().value)
|
.withSellerSecurityDeposit(HavenoUtils.centinerosToAtomicUnits(offer.getSellerSecurityDeposit().value).longValueExact())
|
||||||
.withPaymentAccountId(offer.getMakerPaymentAccountId())
|
.withPaymentAccountId(offer.getMakerPaymentAccountId())
|
||||||
.withPaymentMethodId(offer.getPaymentMethod().getId())
|
.withPaymentMethodId(offer.getPaymentMethod().getId())
|
||||||
.withPaymentMethodShortName(offer.getPaymentMethod().getShortName())
|
.withPaymentMethodShortName(offer.getPaymentMethod().getShortName())
|
||||||
|
|
Loading…
Reference in a new issue