|
|
@ -414,8 +414,7 @@ cJSON *LP_validateaddress(char *symbol,char *address) |
|
|
|
jaddstr(retjson,"scriptPubKey",script); |
|
|
|
} |
|
|
|
bitcoin_address(coinaddr,coin->taddr,coin->pubtype,G.LP_myrmd160,20); |
|
|
|
if ( strcmp(address,coinaddr) == 0 ) |
|
|
|
jadd(retjson,"ismine",cJSON_CreateTrue()); |
|
|
|
jadd(retjson,"ismine",strcmp(address,coin->smartaddr) == 0 ? cJSON_CreateTrue() : cJSON_CreateFalse()); |
|
|
|
jadd(retjson,"iswatchonly",cJSON_CreateFalse()); |
|
|
|
jadd(retjson,"isscript",addrtype == coin->p2shtype ? cJSON_CreateTrue() : cJSON_CreateFalse()); |
|
|
|
return(retjson); |
|
|
@ -437,7 +436,7 @@ int32_t LP_address_ismine(char *symbol,char *address) |
|
|
|
if ( jobj(retjson,"ismine") != 0 && is_cJSON_True(jobj(retjson,"ismine")) != 0 ) |
|
|
|
{ |
|
|
|
doneflag = 1; |
|
|
|
//printf("%s already ismine\n",address);
|
|
|
|
printf("%s ismine (%s)\n",address,jprint(retjson,0)); |
|
|
|
} |
|
|
|
//printf("%s\n",jprint(retjson,0));
|
|
|
|
free_json(retjson); |
|
|
|