mirror of
https://github.com/boldsuck/haveno.git
synced 2024-12-23 04:29:22 +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
|
||||
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 a new issue