Browse Source

Fix portfolio balance calc

beta
jl777 7 years ago
parent
commit
145ea3ec97
  1. 12
      iguana/exchanges/LP_utxo.c

12
iguana/exchanges/LP_utxo.c

@ -33,10 +33,14 @@
uint64_t LP_value_extract(cJSON *obj,int32_t addinterest) uint64_t LP_value_extract(cJSON *obj,int32_t addinterest)
{ {
double val = 0.; uint64_t value = 0; double val = 0.; uint64_t value = 0; int32_t electrumflag;
if ( (val= jdouble(obj,"amount")) < SMALLVAL ) electrumflag = (jobj(obj,"tx_hash") != 0);
val = jdouble(obj,"value"); if ( electrumflag == 0 )
value = (val + 0.0000000049) * SATOSHIDEN; {
if ( (val= jdouble(obj,"amount")) < SMALLVAL )
val = jdouble(obj,"value");
value = (val + 0.0000000049) * SATOSHIDEN;
} else value = j64bits(obj,"value");
if ( value != 0 ) if ( value != 0 )
{ {
if ( addinterest != 0 && jobj(obj,"interest") != 0 ) if ( addinterest != 0 && jobj(obj,"interest") != 0 )

Loading…
Cancel
Save