|
@ -80,10 +80,10 @@ static struct command_result *param_bitcoin_address(struct command *cmd, |
|
|
const u8 **scriptpubkey) |
|
|
const u8 **scriptpubkey) |
|
|
{ |
|
|
{ |
|
|
/* Parse address. */ |
|
|
/* Parse address. */ |
|
|
switch (json_tok_address_scriptpubkey(cmd, |
|
|
switch (json_to_address_scriptpubkey(cmd, |
|
|
get_chainparams(cmd->ld), |
|
|
get_chainparams(cmd->ld), |
|
|
buffer, tok, |
|
|
buffer, tok, |
|
|
scriptpubkey)) { |
|
|
scriptpubkey)) { |
|
|
case ADDRESS_PARSE_UNRECOGNIZED: |
|
|
case ADDRESS_PARSE_UNRECOGNIZED: |
|
|
return command_fail(cmd, LIGHTNINGD, |
|
|
return command_fail(cmd, LIGHTNINGD, |
|
|
"Could not parse destination address, " |
|
|
"Could not parse destination address, " |
|
@ -345,10 +345,10 @@ static struct command_result *json_prepare_tx(struct command *cmd, |
|
|
"The output format must be " |
|
|
"The output format must be " |
|
|
"{destination: amount}"); |
|
|
"{destination: amount}"); |
|
|
|
|
|
|
|
|
res = json_tok_address_scriptpubkey(cmd, |
|
|
res = json_to_address_scriptpubkey(cmd, |
|
|
get_chainparams(cmd->ld), |
|
|
get_chainparams(cmd->ld), |
|
|
buffer, &t[1], |
|
|
buffer, &t[1], |
|
|
&destination); |
|
|
&destination); |
|
|
if (res == ADDRESS_PARSE_UNRECOGNIZED) |
|
|
if (res == ADDRESS_PARSE_UNRECOGNIZED) |
|
|
return command_fail(cmd, JSONRPC2_INVALID_PARAMS, |
|
|
return command_fail(cmd, JSONRPC2_INVALID_PARAMS, |
|
|
"Could not parse destination address"); |
|
|
"Could not parse destination address"); |
|
|