arbitrator reserved trade amount = 0

This commit is contained in:
woodser 2023-10-28 10:48:48 -04:00
parent 8f8d653871
commit ed93096a4b

View file

@ -1607,12 +1607,8 @@ public abstract class Trade implements Tradable, Model {
}
public BigInteger getReservedAmount() {
if (!isDepositsPublished() || isPayoutPublished()) return BigInteger.valueOf(0);
if (isArbitrator()) {
return getAmount().add(getBuyer().getSecurityDeposit()).add(getSeller().getSecurityDeposit()); // arbitrator reserved balance is sum of amounts sent to multisig
} else {
return isBuyer() ? getBuyer().getSecurityDeposit() : getAmount().add(getSeller().getSecurityDeposit());
}
if (isArbitrator() || !isDepositsPublished() || isPayoutPublished()) return BigInteger.valueOf(0);
return isBuyer() ? getBuyer().getSecurityDeposit() : getAmount().add(getSeller().getSecurityDeposit());
}
public Price getPrice() {