@@ -1427,9 +1427,9 @@ std::vector<omni_detailed_balance_t> BitcoinAPI::omni_getwalletbalances(bool inc
1427
1427
omni_detailed_balance_t tmp;
1428
1428
Value val = (*it);
1429
1429
1430
- tmp.balance = val[" balance" ].asDouble ( );
1431
- tmp.reserved = val[" reserved" ].asDouble ( );
1432
- tmp.propertyid = val[" propertyid " ].asDouble ( );
1430
+ tmp.balance = stod ( val[" balance" ].asString () );
1431
+ tmp.reserved = stod ( val[" reserved" ].asString () );
1432
+ tmp.frozen = stod ( val[" frozen " ].asString () );
1433
1433
tmp.name = val[" name" ].asString ();
1434
1434
tmp.propertyid = val[" propertyid" ].asInt ();
1435
1435
@@ -1450,9 +1450,9 @@ omni_balance_t BitcoinAPI::omni_getbalance(const std::string& address, int prope
1450
1450
1451
1451
result = sendcommand (command, params);
1452
1452
1453
- ret.balance = result[" balance" ].asDouble ( );
1454
- ret.reserved = result[" reserved" ].asDouble ( );
1455
- ret.frozen = result[" frozen" ].asDouble ( );
1453
+ ret.balance = stod ( result[" balance" ].asString () );
1454
+ ret.reserved = stod ( result[" reserved" ].asString () );
1455
+ ret.frozen = stod ( result[" frozen" ].asString () );
1456
1456
1457
1457
return ret;
1458
1458
}
@@ -1478,14 +1478,16 @@ std::vector<omni_transaction_t> BitcoinAPI::omni_listtransactions(const std::str
1478
1478
tmp.referenceaddress = val[" referenceaddress" ].asString ();
1479
1479
tmp.ismine = val[" ismine" ].asBool ();
1480
1480
tmp.confirmations = val[" confirmations" ].asInt ();
1481
- tmp.fee = val[" fee" ].asDouble ();
1481
+
1482
+ tmp.fee = stod (val[" fee" ].asString ());
1482
1483
tmp.blocktime = val[" blocktime" ].asUInt ();
1483
1484
tmp.valid = val[" valid" ].asBool ();
1484
1485
tmp.positioninblock = val[" positioninblock" ].asUInt ();
1485
1486
tmp.version = val[" version" ].asInt ();
1486
1487
tmp.type_int = val[" type_int" ].asInt ();
1487
1488
tmp.type = val[" type" ].asString ();
1488
- tmp.amount = val[" amount" ].asDouble ();
1489
+
1490
+ tmp.amount = stod (val[" amount" ].asString ());
1489
1491
tmp.blockhash = val[" blockhash" ].asString ();
1490
1492
tmp.block = val[" block" ].asUInt ();
1491
1493
0 commit comments