Skip to content

Commit

Permalink
Fix blockchain_market_price_history print_result issue (incorrect ass…
Browse files Browse the repository at this point in the history
…et names in CLI).
  • Loading branch information
abitmore committed Apr 23, 2015
1 parent 7971cdf commit e589dc2
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions libraries/cli/print_result.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1031,6 +1031,16 @@ namespace bts { namespace cli {
return;
}

const string& quote_symbol = arguments[ 0 ].as_string();
const oasset_record quote_asset_record = client->get_chain()->get_asset_record( quote_symbol );
FC_ASSERT( quote_asset_record.valid() );
const asset_id_type quote_id = quote_asset_record->id;

const string& base_symbol = arguments[ 1 ].as_string();
const oasset_record base_asset_record = client->get_chain()->get_asset_record( base_symbol );
FC_ASSERT( base_asset_record.valid() );
const asset_id_type base_id = base_asset_record->id;

out << std::setw(20) << "TIME"
<< std::setw(20) << "HIGHEST BID"
<< std::setw(20) << "LOWEST ASK"
Expand All @@ -1047,8 +1057,8 @@ namespace bts { namespace cli {
<< std::setw(20) << point.lowest_ask
<< std::setw(20) << point.opening_price
<< std::setw(20) << point.closing_price
<< std::setw(20) << client->get_chain()->to_pretty_asset(asset(point.base_volume))
<< std::setw(20) << client->get_chain()->to_pretty_asset(asset(point.quote_volume));
<< std::setw(20) << client->get_chain()->to_pretty_asset(asset(point.base_volume, base_id))
<< std::setw(20) << client->get_chain()->to_pretty_asset(asset(point.quote_volume, quote_id));
out << "\n";
}
}
Expand Down

0 comments on commit e589dc2

Please sign in to comment.