Update fixed it so 0 amount sales are not recorded

This commit is contained in:
Lev
2021-06-12 10:59:44 -05:00
parent 028aec9a1d
commit c42901308a

View File

@ -128,7 +128,7 @@ std::vector<OrderBookEntry> OrderBook::matchAsksToBids(std::string product, std:
thisBid.amount = thisBid.amount - thisAsk.amount;
break;
}
else if(thisBid.amount < thisAsk.amount)
else if(thisBid.amount > 0 && thisBid.amount < thisAsk.amount)
{
sale.amount = thisBid.amount;
sales.push_back(sale);