mirror of
https://github.com/AleziaKurdis/overte.git
synced 2025-04-07 04:53:28 +02:00
Removed QmlCommerce.cpp, Ledger.cpp changes as requested
This commit is contained in:
parent
e5f06690b5
commit
628ec8ec2b
5 changed files with 18 additions and 12 deletions
|
@ -540,8 +540,17 @@ Rectangle {
|
|||
listView: purchasesContentsList;
|
||||
getPage: function () {
|
||||
console.debug('getPage', purchasesModel.listModelName, filterBar.primaryFilter_filterName, purchasesModel.currentPageToRetrieve, purchasesModel.itemsPerPage);
|
||||
var editionFilter = "";
|
||||
var primaryFilter = "";
|
||||
|
||||
if (filterBar.primaryFilter_filterName === "proofs") {
|
||||
editionFilter = "proofs";
|
||||
} else {
|
||||
primaryFilter = filterBar.primaryFilter_filterName;
|
||||
}
|
||||
Commerce.inventory(
|
||||
filterBar.primaryFilter_filterName,
|
||||
editionFilter,
|
||||
primaryFilter,
|
||||
filterBar.text,
|
||||
purchasesModel.currentPageToRetrieve,
|
||||
purchasesModel.itemsPerPage
|
||||
|
|
|
@ -152,14 +152,10 @@ void Ledger::balance(const QStringList& keys) {
|
|||
keysQuery("balance", "balanceSuccess", "balanceFailure");
|
||||
}
|
||||
|
||||
void Ledger::inventory(const QString& typeFilter, const QString& titleFilter, const int& page, const int& perPage) {
|
||||
void Ledger::inventory(const QString& editionFilter, const QString& typeFilter, const QString& titleFilter, const int& page, const int& perPage) {
|
||||
QJsonObject params;
|
||||
if (typeFilter == "proofs") {
|
||||
params["edition_filter"] = "proofs";
|
||||
} else {
|
||||
params["type_filter"] = typeFilter;
|
||||
}
|
||||
|
||||
params["edition_filter"] = editionFilter;
|
||||
params["type_filter"] = typeFilter;
|
||||
params["title_filter"] = titleFilter;
|
||||
params["page"] = page;
|
||||
params["per_page"] = perPage;
|
||||
|
|
|
@ -29,7 +29,7 @@ public:
|
|||
bool receiveAt(const QString& hfc_key, const QString& signing_key, const QByteArray& locker);
|
||||
bool receiveAt();
|
||||
void balance(const QStringList& keys);
|
||||
void inventory(const QString& typeFilter, const QString& titleFilter, const int& page, const int& perPage);
|
||||
void inventory(const QString& editionFilter, const QString& typeFilter, const QString& titleFilter, const int& page, const int& perPage);
|
||||
void history(const QStringList& keys, const int& pageNumber, const int& itemsPerPage);
|
||||
void account();
|
||||
void updateLocation(const QString& asset_id, const QString& location, const bool& alsoUpdateSiblings = false, const bool controlledFailure = false);
|
||||
|
|
|
@ -151,7 +151,8 @@ void QmlCommerce::balance() {
|
|||
}
|
||||
}
|
||||
|
||||
void QmlCommerce::inventory(const QString& typeFilter,
|
||||
void QmlCommerce::inventory(const QString& editionFilter,
|
||||
const QString& typeFilter,
|
||||
const QString& titleFilter,
|
||||
const int& page,
|
||||
const int& perPage) {
|
||||
|
@ -159,7 +160,7 @@ void QmlCommerce::inventory(const QString& typeFilter,
|
|||
auto wallet = DependencyManager::get<Wallet>();
|
||||
QStringList cachedPublicKeys = wallet->listPublicKeys();
|
||||
if (!cachedPublicKeys.isEmpty()) {
|
||||
ledger->inventory(typeFilter, titleFilter, page, perPage);
|
||||
ledger->inventory(editionFilter, typeFilter, titleFilter, page, perPage);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -74,7 +74,7 @@ protected:
|
|||
|
||||
Q_INVOKABLE void buy(const QString& assetId, int cost, const bool controlledFailure = false);
|
||||
Q_INVOKABLE void balance();
|
||||
Q_INVOKABLE void inventory(const QString& typeFilter = QString(), const QString& titleFilter = QString(), const int& page = 1, const int& perPage = 20);
|
||||
Q_INVOKABLE void inventory(const QString& editionFilter = QString(), const QString& typeFilter = QString(), const QString& titleFilter = QString(), const int& page = 1, const int& perPage = 20);
|
||||
Q_INVOKABLE void history(const int& pageNumber, const int& itemsPerPage = 100);
|
||||
Q_INVOKABLE void generateKeyPair();
|
||||
Q_INVOKABLE void account();
|
||||
|
|
Loading…
Reference in a new issue