Browse Source

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.
bump-pyln-proto
Christian Decker 5 years ago
committed by Rusty Russell
parent
commit
639eaaf2b4
  1. 2
      lightningd/pay.c

2
lightningd/pay.c

@ -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");

Loading…
Cancel
Save