add cancel_order to wallet api
This commit is contained in:
parent
09855166a2
commit
699144c173
2 changed files with 15 additions and 0 deletions
|
|
@ -847,6 +847,14 @@ class wallet_api
|
|||
signed_transaction borrow_asset(string borrower_name, string amount_to_borrow, string asset_symbol,
|
||||
string amount_of_collateral, bool broadcast = false);
|
||||
|
||||
/** Cancel an existing order
|
||||
*
|
||||
* @param order_id the id of order to be cancelled
|
||||
* @param broadcast true to broadcast the transaction on the network
|
||||
* @returns the signed transaction canceling the order
|
||||
*/
|
||||
signed_transaction cancel_order(object_id_type order_id, bool broadcast = false);
|
||||
|
||||
/** Creates a new user-issued or market-issued asset.
|
||||
*
|
||||
* Many options can be changed later using \c update_asset()
|
||||
|
|
@ -1488,6 +1496,7 @@ FC_API( graphene::wallet::wallet_api,
|
|||
(create_account_with_brain_key)
|
||||
(sell_asset)
|
||||
(borrow_asset)
|
||||
(cancel_order)
|
||||
(transfer)
|
||||
(transfer2)
|
||||
(get_transaction_id)
|
||||
|
|
|
|||
|
|
@ -3453,6 +3453,12 @@ signed_transaction wallet_api::borrow_asset(string seller_name, string amount_to
|
|||
return my->borrow_asset(seller_name, amount_to_sell, asset_symbol, amount_of_collateral, broadcast);
|
||||
}
|
||||
|
||||
signed_transaction wallet_api::cancel_order(object_id_type order_id, bool broadcast)
|
||||
{
|
||||
FC_ASSERT(!is_locked());
|
||||
return my->cancel_order(order_id, broadcast);
|
||||
}
|
||||
|
||||
string wallet_api::get_key_label( public_key_type key )const
|
||||
{
|
||||
auto key_itr = my->_wallet.labeled_keys.get<by_key>().find(key);
|
||||
|
|
|
|||
Loading…
Reference in a new issue