mirror of
https://github.com/haveno-dex/haveno.git
synced 2025-01-03 17:40:10 +00:00
reserve correct offer amount based on buy or sell direction
This commit is contained in:
parent
c97ca852f5
commit
6ca775da1b
1 changed files with 2 additions and 4 deletions
|
@ -287,10 +287,8 @@ public class Offer implements NetworkPayload, PersistablePayload {
|
||||||
|
|
||||||
// get the amount needed for the maker to reserve the offer
|
// get the amount needed for the maker to reserve the offer
|
||||||
public Coin getReserveAmount() {
|
public Coin getReserveAmount() {
|
||||||
Coin reserveAmount = getAmount();
|
Coin reserveAmount = getDirection() == OfferDirection.BUY ? getBuyerSecurityDeposit() : getSellerSecurityDeposit();
|
||||||
reserveAmount = reserveAmount.add(getDirection() == OfferDirection.BUY ?
|
if (getDirection() == OfferDirection.SELL) reserveAmount = reserveAmount.add(getAmount());
|
||||||
getBuyerSecurityDeposit() :
|
|
||||||
getSellerSecurityDeposit());
|
|
||||||
return reserveAmount;
|
return reserveAmount;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue