mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
common/json_stream.c: provide explicit json_add_primitive_fmt and json_add_str_fmt routines.
Rather than a generic "add member", provide two routines: one which doesn't quote, and one which does. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
committed by
neil saitug
parent
36a29fbfbc
commit
dbae5ae569
@@ -634,7 +634,7 @@ static struct command_result *convert_currency(struct command *cmd,
|
||||
json_add_stringn(req->js, "currency",
|
||||
(const char *)ir->offer->currency,
|
||||
tal_bytelen(ir->offer->currency));
|
||||
json_add_member(req->js, "amount", false, "%f", double_amount);
|
||||
json_add_primitive_fmt(req->js, "amount", "%f", double_amount);
|
||||
return send_outreq(cmd->plugin, req);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user