| 566 | } |
| 567 | |
| 568 | void json_add_amount_msat_only(struct json_stream *result, |
| 569 | const char *msatfieldname, |
| 570 | struct amount_msat msat) |
| 571 | { |
| 572 | if (!deprecated_apis) |
| 573 | assert(strends(msatfieldname, "_msat")); |
| 574 | if (deprecated_apis) |
| 575 | json_add_string(result, msatfieldname, |
| 576 | type_to_string(tmpctx, struct amount_msat, &msat)); |
| 577 | else |
| 578 | json_add_u64(result, msatfieldname, msat.millisatoshis); /* Raw: low-level helper */ |
| 579 | } |
| 580 | |
| 581 | void json_add_amount_sat_compat(struct json_stream *result, |
| 582 | struct amount_sat sat, |
no test coverage detected