mirror of
https://github.com/haveno-dex/haveno.git
synced 2024-10-01 01:35:48 -04:00
reserve correct offer amount based on buy or sell direction
This commit is contained in:
parent
c97ca852f5
commit
6ca775da1b
@ -287,10 +287,8 @@ public class Offer implements NetworkPayload, PersistablePayload {
|
||||
|
||||
// get the amount needed for the maker to reserve the offer
|
||||
public Coin getReserveAmount() {
|
||||
Coin reserveAmount = getAmount();
|
||||
reserveAmount = reserveAmount.add(getDirection() == OfferDirection.BUY ?
|
||||
getBuyerSecurityDeposit() :
|
||||
getSellerSecurityDeposit());
|
||||
Coin reserveAmount = getDirection() == OfferDirection.BUY ? getBuyerSecurityDeposit() : getSellerSecurityDeposit();
|
||||
if (getDirection() == OfferDirection.SELL) reserveAmount = reserveAmount.add(getAmount());
|
||||
return reserveAmount;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user