mirror of
https://github.com/wownero/wowlet.git
synced 2026-10-24 10:38:33 +02:00
Calc: configure crypto/fiat symbols
This commit is contained in:
@@ -3,9 +3,9 @@
|
||||
|
||||
#include "utils/prices.h"
|
||||
|
||||
Prices::Prices(QObject *parent) : QObject(parent) {
|
||||
this->rates = QMap<QString, double>();
|
||||
this->markets = QMap<QString, marketStruct>();
|
||||
Prices::Prices(QObject *parent)
|
||||
: QObject(parent)
|
||||
{
|
||||
}
|
||||
|
||||
void Prices::cryptoPricesReceived(const QJsonArray &data) {
|
||||
@@ -30,9 +30,8 @@ void Prices::cryptoPricesReceived(const QJsonArray &data) {
|
||||
|
||||
void Prices::fiatPricesReceived(const QJsonObject &data) {
|
||||
QJsonObject ratesData = data.value("rates").toObject();
|
||||
for (const auto ¤cy : ratesData) {
|
||||
QString currencyStr = currency.toString();
|
||||
this->rates.insert(currencyStr, ratesData.value(currencyStr).toDouble());
|
||||
for (const auto ¤cy : ratesData.keys()) {
|
||||
this->rates.insert(currency, ratesData.value(currency).toDouble());
|
||||
}
|
||||
emit fiatPricesUpdated();
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user