| 127 | } |
| 128 | |
| 129 | static struct command_result *pay_done(struct command *cmd, |
| 130 | const char *buf, |
| 131 | const jsmntok_t *result, |
| 132 | struct inv *inv) |
| 133 | { |
| 134 | struct amount_msat msat = amount_msat(*inv->inv->amount); |
| 135 | |
| 136 | plugin_log(cmd->plugin, LOG_INFORM, |
| 137 | "Payed out %s for offer %s%s: %.*s", |
| 138 | type_to_string(tmpctx, struct amount_msat, &msat), |
| 139 | type_to_string(tmpctx, struct sha256, inv->inv->offer_id), |
| 140 | inv->offer->refund_for ? " (refund)": "", |
| 141 | json_tok_full_len(result), |
| 142 | json_tok_full(buf, result)); |
| 143 | return command_hook_success(cmd); |
| 144 | } |
| 145 | |
| 146 | static struct command_result *pay_error(struct command *cmd, |
| 147 | const char *buf, |
nothing calls this directly
no test coverage detected