json-rpc: Do not return a null amount_msat to listpays

Suggested-by: Rusty Russell <@rustyrussell>
Changelog-Deprecated: JSON-RPC: `listsendpays` will no longer add `null` if we don't know the `amount_msat` for a payment.
This commit is contained in:
Christian Decker 2020-08-06 10:00:57 +09:30 committed by Rusty Russell
parent 624df64330
commit 639eaaf2b4

View File

@ -97,7 +97,7 @@ void json_add_payment_fields(struct json_stream *response,
if (amount_msat_greater(t->msatoshi, AMOUNT_MSAT(0)))
json_add_amount_msat_compat(response, t->msatoshi, "msatoshi",
"amount_msat");
else
else if (deprecated_apis)
json_add_null(response, "amount_msat");