|
|
@ -1432,7 +1432,7 @@ TWOSTRINGS_AND_INT(bitcoinrpc,walletpassphrase,password,permanentfile,timeout) |
|
|
|
|
|
|
|
THREE_STRINGS(bitcoinrpc,encryptwallet,passphrase,password,permanentfile) |
|
|
|
{ |
|
|
|
char *retstr,buf[128],wifstr[128]; cJSON *retjson; int32_t need_HUSH = 0,need_KMD = 0,need_BTC = 0,need_GAME = 0; |
|
|
|
char *retstr,buf[128],wifstr[128]; cJSON *retjson; int32_t need_HUSH = 0,need_KMD = 0,need_BTC = 0,need_GAME = 0,need_EMC2 = 0; |
|
|
|
if ( remoteaddr != 0 || coin == 0 ) |
|
|
|
return(clonestr("{\"error\":\"no remote encrypt or no coin\"}")); |
|
|
|
iguana_walletlock(myinfo,coin); |
|
|
@ -1473,6 +1473,8 @@ THREE_STRINGS(bitcoinrpc,encryptwallet,passphrase,password,permanentfile) |
|
|
|
need_GAME = 1; |
|
|
|
if ( strcmp(coin->symbol,"HUSH") != 0 ) |
|
|
|
need_HUSH = 1; |
|
|
|
if ( strcmp(coin->symbol,"EMC2") != 0 ) |
|
|
|
need_EMC2 = 1; |
|
|
|
if ( need_KMD != 0 && (coin= iguana_coinfind("KMD")) != 0 ) |
|
|
|
{ |
|
|
|
bitcoin_priv2wif(wifstr,waddr.privkey,coin->chain->wiftype); |
|
|
@ -1500,6 +1502,11 @@ THREE_STRINGS(bitcoinrpc,encryptwallet,passphrase,password,permanentfile) |
|
|
|
bitcoin_priv2wif(wifstr,waddr.privkey,coin->chain->wiftype); |
|
|
|
jaddstr(retjson,"GAMEwif",wifstr); |
|
|
|
} |
|
|
|
if ( need_EMC2 != 0 && (coin= iguana_coinfind("EMC2")) != 0 ) |
|
|
|
{ |
|
|
|
bitcoin_priv2wif(wifstr,waddr.privkey,coin->chain->wiftype); |
|
|
|
jaddstr(retjson,"EMC2wif",wifstr); |
|
|
|
} |
|
|
|
/*if ( (dexstr= _dex_importaddress(myinfo,coin->symbol,waddr.coinaddr)) != 0 )
|
|
|
|
{ |
|
|
|
if ( (dexjson= cJSON_Parse(dexstr)) != 0 ) |
|
|
|