Update added the canFulfillOrder function

This commit is contained in:
Lev
2021-06-12 22:32:57 -05:00
parent ae736454ec
commit c0552cb3b7
4 changed files with 20 additions and 9 deletions

View File

@ -83,7 +83,16 @@ void MerkelMain::enterAsk()
tokens[0],
OrderBookType::ask
);
orderBook.insertOrder(obe);
if(wallet.canFulfillOrder(obe))
{
std::cout << "Wallet looks good. " << std::endl;
orderBook.insertOrder(obe);
}
else
{
std::cout << "Wallet has insufficient asks" << std::endl;
}
}catch (const std::exception& e)
{
std::cout << " MerkelMain::enterAsk Bad input " << std::endl;