diff --git a/iguana/iguana_wallet.c b/iguana/iguana_wallet.c index 4494e46a8..bed0129bf 100755 --- a/iguana/iguana_wallet.c +++ b/iguana/iguana_wallet.c @@ -1153,6 +1153,8 @@ TWOSTRINGS_AND_INT(bitcoinrpc,walletpassphrase,password,permanentfile,timeout) iguana_walletlock(myinfo,coin); printf("timeout.%d\n",timeout); myinfo->expiration = (uint32_t)time(NULL) + timeout; + if ( password == 0 || password[0] == 0 ) + password = ""; strcpy(myinfo->secret,password); strcpy(myinfo->password,password); if ( permanentfile != 0 ) @@ -1171,7 +1173,7 @@ THREE_STRINGS(bitcoinrpc,encryptwallet,passphrase,password,permanentfile) return(clonestr("{\"error\":\"no remote\"}")); if ( password == 0 || password[0] == 0 ) password = passphrase; - else if ( passphrase == 0 || passphrase[0] == 0 ) + if ( passphrase == 0 || passphrase[0] == 0 ) passphrase = password; strcpy(myinfo->secret,passphrase); strcpy(myinfo->password,password); @@ -1566,7 +1568,7 @@ THREE_INTS(bitcoinrpc,listreceivedbyaccount,minconf,includeempty,watchonly) item = cJSON_CreateObject(); jaddstr(item,"account",wacct->account); jaddnum(item,"amount",dstr(balance)); - jaddnum(item,"confirmations",minconf); + //jaddnum(item,"confirmations",coin->blocks.hwmchain.height - wacct->mostrecent); jaddi(array,item); } retjson = cJSON_CreateObject(); diff --git a/iguana/tests/decoderawtransaction b/iguana/tests/decoderawtransaction index 7ec699bec..b172b34ff 100755 --- a/iguana/tests/decoderawtransaction +++ b/iguana/tests/decoderawtransaction @@ -1 +1 @@ -curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"decoderawtransaction\",\"params\":[\"01000000193cbb570289f3d9a6dbc265caae9eb4c2c1176b546270fa48310da4c3593c8f764e914ec3010000006a473044022006f5fd779b3eec22bef3d204e2b4b9cd2c6de6384b90f42e882011c0dc41eafd0220181e702bc90e8e90ad5d7495f177904a78faacf36ef507f7f4b55d03e9bd55550121020ce8ffc263769bfa15579b2757873ea5690107acfafb6dc1b77cd7057ac38349ffffffff466304197095eeceb34a9b8cc57b34a9d069f37cb3c0aedcb71c5f3c0858afd5010000006a473044022002ff607e81647700daa1960850bec94c42ab11eed7a4a9088257f2358eb7012f022020da58ebcc41a704d466cf3a82494ae838b7f1b8ce6a14e8010ab16abb15ec790121020ce8ffc263769bfa15579b2757873ea5690107acfafb6dc1b77cd7057ac38349ffffffff02804a5d05000000001976a914ec3ed21928ca63954b87eefa887de6464c46d3cc88acf0b6cf01000000001976a91421e112f4211cbc612bc5f3de86acf0017b88b67d88ac00000000\", 1]}" +curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"decoderawtransaction\",\"params\":[\"010000004347bb5701466304197095eeceb34a9b8cc57b34a9d069f37cb3c0aedcb71c5f3c0858afd5010000006b483045022100dc33613d6c84495dcb89aca17296bca6fd47f30a48ee8dc32d2c7d08fda61e80022019b71b09872c70d61a1cca30460262dffc73e7a3cce343921e9077dab2b2dfb70121020ce8ffc263769bfa15579b2757873ea5690107acfafb6dc1b77cd7057ac38349ffffffff02a0860100000000001976a91472c57f6fb0e4635b6f75b118787b8d0d105aea2e88ac3045fc01000000001976a914b7128d2ee837cf03e30a2c0e3e0181f7b9669bb688ac00000000\", 1]}" diff --git a/iguana/tests/listreceivedbyaccount b/iguana/tests/listreceivedbyaccount new file mode 100755 index 000000000..3d9771fdf --- /dev/null +++ b/iguana/tests/listreceivedbyaccount @@ -0,0 +1 @@ +curl --url "http://127.0.0.1:7778" --data "{\"coin\":\"BTCD\",\"method\":\"listreceivedbyaccount\",\"params\":[1, 9999999, [\"RUXwXF37SMA63vL4bUPnytP3KUwp69PCVv\"]]}" diff --git a/iguana/tests/sendtoaddress b/iguana/tests/sendtoaddress index 63021dfda..e9e059e50 100755 --- a/iguana/tests/sendtoaddress +++ b/iguana/tests/sendtoaddress @@ -1,2 +1,2 @@ -curl --url "http://127.0.0.1:7778" --data "{\"method\":\"sendtoaddress\",\"params\":[\"RWpLoeTF17e57h2dztWjVtFiPGJN68oWwx\", 0.9, \"testcomment\", \"sendcomment\"]}" +curl --url "http://127.0.0.1:7778" --data "{\"method\":\"sendtoaddress\",\"params\":[\"RKk3hmkHr3khf2aQRZW51oxnzFVHsQe4hf\", 0.001, \"testcomment\", \"sendcomment\"]}"