JSON-API: fundchannel_start uses amount fieldname to replace satoshi

This commit is contained in:
trueptolemy
2019-09-20 02:50:58 +08:00
committed by neil saitug
parent 25583ffe37
commit d149ba2f3a
3 changed files with 69 additions and 19 deletions

View File

@@ -312,7 +312,11 @@ static struct command_result *fundchannel_start(struct command *cmd,
json_out_start(ret, NULL, '{');
json_out_addstr(ret, "id", node_id_to_hexstr(tmpctx, fr->id));
json_out_addstr(ret, "satoshi", fr->funding_str);
if (deprecated_apis)
json_out_addstr(ret, "satoshi", fr->funding_str);
else
json_out_addstr(ret, "amount", fr->funding_str);
if (fr->feerate_str)
json_out_addstr(ret, "feerate", fr->feerate_str);