mirror of
https://github.com/status-im/status-desktop.git
synced 2025-01-10 06:16:32 +00:00
c0024ec6b1
Good coding practices applied only, architecture and logic were not altered.
21 lines
684 B
C++
21 lines
684 B
C++
#include "wallet_accounts/wallet_account.h"
|
|
|
|
#include <QJsonArray>
|
|
#include <QJsonObject>
|
|
#include <QJsonValue>
|
|
#include <QStringList>
|
|
|
|
Wallets::WalletAccountDto Wallets::toWalletAccountDto(const QJsonValue& jsonObj)
|
|
{
|
|
auto result = Wallets::WalletAccountDto();
|
|
result.name = jsonObj["name"].toString();
|
|
result.address = jsonObj["address"].toString();
|
|
result.path = jsonObj["path"].toString();
|
|
result.color = jsonObj["color"].toString();
|
|
result.isWallet = jsonObj["wallet"].toBool();
|
|
result.isChat = jsonObj["chat"].toBool();
|
|
result.publicKey = jsonObj["public-key"].toString();
|
|
result.walletType = jsonObj["type"].toString();
|
|
return result;
|
|
}
|