Skip to content

Commit

Permalink
Put back ETH/ERC20 calls to portfolio. Without cache for now.
Browse files Browse the repository at this point in the history
  • Loading branch information
artemii235 committed May 29, 2018
1 parent 2eeb227 commit 5a5a620
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
9 changes: 6 additions & 3 deletions iguana/exchanges/LP_coins.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,13 @@ cJSON *LP_coinjson(struct iguana_info *coin,int32_t showwif)
}
#ifndef NOTETOMIC
else if (coin->etomic[0] != 0) {
//balance = LP_etomic_get_balance(coin, coin->smartaddr);
if (coin->inactive == 0) {
balance = LP_etomic_get_balance(coin, coin->smartaddr);
} else {
balance = 0;
}
jaddnum(item,"height",-1);
//jaddnum(item,"balance",dstr(balance));
jaddnum(item,"balance",0);
jaddnum(item,"balance",dstr(balance));
}
#endif
else
Expand Down
4 changes: 1 addition & 3 deletions iguana/exchanges/LP_portfolio.c
Original file line number Diff line number Diff line change
Expand Up @@ -95,14 +95,12 @@ uint64_t LP_balance(uint64_t *valuep,int32_t iambob,char *symbol,char *coinaddr)
cJSON *array,*item; bits256 zero; int32_t i,n; uint64_t valuesum,satoshisum,value;
valuesum = satoshisum = 0;
memset(zero.bytes,0,sizeof(zero));
/*
#ifndef NOTETOMIC
struct iguana_info *coin = LP_coinfind(symbol);
if (coin->etomic[0] != 0) {
if (coin->etomic[0] != 0 && coin->inactive == 0) {
valuesum = LP_etomic_get_balance(coin, coinaddr);
} else
#endif
*/
if ( (array= LP_listunspent(symbol,coinaddr,zero,zero)) != 0 )
{
if ( is_cJSON_Array(array) != 0 && (n= cJSON_GetArraySize(array)) > 0 )
Expand Down
3 changes: 1 addition & 2 deletions iguana/exchanges/etomicswap/etomiccurl.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,10 +35,9 @@ size_t writefunc(void *ptr, size_t size, size_t nmemb, struct string *s)

cJSON *parseEthRpcResponse(char *requestResult)
{
printf("Trying to parse ETH RPC response: %s\n", requestResult);
cJSON *json = cJSON_Parse(requestResult);
if (json == NULL) {
printf("ETH RPC response parse failed!\n");
printf("ETH RPC response parse failed: %s!\n", requestResult);
return NULL;
}
cJSON *tmp = cJSON_GetObjectItem(json, "result");
Expand Down

0 comments on commit 5a5a620

Please sign in to comment.