| 1602 | } |
| 1603 | |
| 1604 | static char *amount_option(struct command *cmd, const char *arg, bool check_only, |
| 1605 | struct amount_sat *amt) |
| 1606 | { |
| 1607 | struct amount_sat v; |
| 1608 | if (!parse_amount_sat(&v, arg, strlen(arg))) |
| 1609 | return tal_fmt(tmpctx, "Unable to parse amount '%s'", arg); |
| 1610 | |
| 1611 | if (!check_only) |
| 1612 | *amt = v; |
| 1613 | return NULL; |
| 1614 | } |
| 1615 | |
| 1616 | static bool jsonfmt_amount_sat(struct command *cmd, |
| 1617 | struct json_stream *js, |
no test coverage detected