2022-02-14 15:38:41 +01:00
|
|
|
#include <QDebug>
|
|
|
|
#include <QJsonDocument>
|
|
|
|
#include <QJsonObject>
|
|
|
|
|
|
|
|
#include "backend/types.h"
|
|
|
|
#include "backend/utils.h"
|
2022-02-21 19:03:38 +01:00
|
|
|
#include "backend/wallet_accounts.h"
|
2022-02-14 15:38:41 +01:00
|
|
|
#include "libstatus.h"
|
|
|
|
|
2022-02-16 22:51:04 +01:00
|
|
|
namespace Backend::Wallet::Accounts
|
2022-02-14 15:38:41 +01:00
|
|
|
{
|
|
|
|
RpcResponse<QJsonArray> getAccounts()
|
|
|
|
{
|
|
|
|
QJsonObject inputJSON{{"jsonrpc", "2.0"}, {"method", "accounts_getAccounts"}, {"params", QJsonValue()}};
|
|
|
|
auto result = CallPrivateRPC(Utils::jsonToStr(inputJSON).toUtf8().data());
|
|
|
|
return RpcResponse<QJsonArray>(result, QJsonDocument::fromJson(result)["result"].toArray());
|
|
|
|
}
|
2022-02-16 22:51:04 +01:00
|
|
|
|
|
|
|
} // namespace Backend::Wallet::Accounts
|