Remove code duplication...

This commit is contained in:
Zach Fox 2018-01-09 14:14:54 -08:00
parent d31dec7acb
commit edf25c3e4e

View file

@ -80,11 +80,8 @@ void Ledger::keysQuery(const QString& endpoint, const QString& success, const QS
} }
void Ledger::keysQuery(const QString& endpoint, const QString& success, const QString& fail) { void Ledger::keysQuery(const QString& endpoint, const QString& success, const QString& fail) {
auto wallet = DependencyManager::get<Wallet>();
QJsonObject requestParams; QJsonObject requestParams;
requestParams["public_keys"] = QJsonArray::fromStringList(wallet->listPublicKeys()); keysQuery(endpoint, success, fail, requestParams);
send(endpoint, success, fail, QNetworkAccessManager::PostOperation, AccountManagerAuth::Required, requestParams);
} }
void Ledger::buy(const QString& hfc_key, int cost, const QString& asset_id, const QString& inventory_key, const bool controlled_failure) { void Ledger::buy(const QString& hfc_key, int cost, const QString& asset_id, const QString& inventory_key, const bool controlled_failure) {