Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove buy and sell (with doubles) from CLI. #544 #595

Merged
merged 1 commit into from
Jan 23, 2018
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 0 additions & 47 deletions libraries/wallet/include/graphene/wallet/wallet.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -948,51 +948,6 @@ class wallet_api
uint32_t timeout_sec = 0,
bool fill_or_kill = false,
bool broadcast = false);

/** Place a limit order attempting to sell one asset for another.
*
* This API call abstracts away some of the details of the sell_asset call to be more
* user friendly. All orders placed with sell never timeout and will not be killed if they
* cannot be filled immediately. If you wish for one of these parameters to be different,
* then sell_asset should be used instead.
*
* @param seller_account the account providing the asset being sold, and which will
* receive the processed of the sale.
* @param base The name or id of the asset to sell.
* @param quote The name or id of the asset to recieve.
* @param rate The rate in base:quote at which you want to sell.
* @param amount The amount of base you want to sell.
* @param broadcast true to broadcast the transaction on the network.
* @returns The signed transaction selling the funds.
*/
signed_transaction sell( string seller_account,
string base,
string quote,
double rate,
double amount,
bool broadcast );

/** Place a limit order attempting to buy one asset with another.
*
* This API call abstracts away some of the details of the sell_asset call to be more
* user friendly. All orders placed with buy never timeout and will not be killed if they
* cannot be filled immediately. If you wish for one of these parameters to be different,
* then sell_asset should be used instead.
*
* @param buyer_account The account buying the asset for another asset.
* @param base The name or id of the asset to buy.
* @param quote The name or id of the assest being offered as payment.
* @param rate The rate in base:quote at which you want to buy.
* @param amount the amount of base you want to buy.
* @param broadcast true to broadcast the transaction on the network.
* @param The signed transaction selling the funds.
*/
signed_transaction buy( string buyer_account,
string base,
string quote,
double rate,
double amount,
bool broadcast );

/** Borrow an asset or update the debt/collateral ratio for the loan.
*
Expand Down Expand Up @@ -1694,8 +1649,6 @@ FC_API( graphene::wallet::wallet_api,
(upgrade_account)
(create_account_with_brain_key)
(sell_asset)
(sell)
(buy)
(borrow_asset)
(cancel_order)
(transfer)
Expand Down
22 changes: 0 additions & 22 deletions libraries/wallet/wallet.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3861,28 +3861,6 @@ signed_transaction wallet_api::sell_asset(string seller_account,
symbol_to_receive, expiration, fill_or_kill, broadcast);
}

signed_transaction wallet_api::sell( string seller_account,
string base,
string quote,
double rate,
double amount,
bool broadcast )
{
return my->sell_asset( seller_account, std::to_string( amount ), base,
std::to_string( rate * amount ), quote, 0, false, broadcast );
}

signed_transaction wallet_api::buy( string buyer_account,
string base,
string quote,
double rate,
double amount,
bool broadcast )
{
return my->sell_asset( buyer_account, std::to_string( rate * amount ), quote,
std::to_string( amount ), base, 0, false, broadcast );
}

signed_transaction wallet_api::borrow_asset(string seller_name, string amount_to_sell,
string asset_symbol, string amount_of_collateral, bool broadcast)
{
Expand Down