| 1643 | } |
| 1644 | |
| 1645 | static char *amount_option(struct command *cmd, const char *arg, bool check_only, |
| 1646 | struct amount_sat *amt) |
| 1647 | { |
| 1648 | struct amount_sat v; |
| 1649 | if (!parse_amount_sat(&v, arg, strlen(arg))) |
| 1650 | return tal_fmt(tmpctx, "Unable to parse amount '%s'", arg); |
| 1651 | |
| 1652 | if (!check_only) |
| 1653 | *amt = v; |
| 1654 | return NULL; |
| 1655 | } |
| 1656 | |
| 1657 | static bool jsonfmt_amount_sat(struct command *cmd, |
| 1658 | struct json_stream *js, |
no test coverage detected