diff options
Diffstat (limited to 'src/backenddb')
-rw-r--r-- | src/backenddb/plugin_merchantdb_postgres.c | 8 | ||||
-rw-r--r-- | src/backenddb/test_merchantdb.c | 8 |
2 files changed, 13 insertions, 3 deletions
diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c index 52d7b995..dd8f00de 100644 --- a/src/backenddb/plugin_merchantdb_postgres.c +++ b/src/backenddb/plugin_merchantdb_postgres.c @@ -3053,6 +3053,7 @@ lookup_refunds_detailed_cb (void *cls, struct TALER_Amount refund_amount; char *reason; char *exchange_url; + uint8_t pending8; struct GNUNET_PQ_ResultSpec rs[] = { GNUNET_PQ_result_spec_uint64 ("refund_serial", &refund_serial), @@ -3068,6 +3069,8 @@ lookup_refunds_detailed_cb (void *cls, &reason), TALER_PQ_RESULT_SPEC_AMOUNT ("refund_amount", &refund_amount), + GNUNET_PQ_result_spec_auto_from_type ("pending", + &pending8), GNUNET_PQ_result_spec_end }; @@ -3088,7 +3091,8 @@ lookup_refunds_detailed_cb (void *cls, exchange_url, rtransaction_id, reason, - &refund_amount); + &refund_amount, + 0 != pending8); GNUNET_PQ_cleanup_result (rs); } } @@ -7473,8 +7477,10 @@ libtaler_plugin_merchantdb_postgres_init (void *cls) ",reason" ",refund_amount_val" ",refund_amount_frac" + ",merchant_refund_proofs.exchange_sig IS NULL AS pending" " FROM merchant_refunds" " JOIN merchant_deposits USING (order_serial, coin_pub)" + " LEFT JOIN merchant_refund_proofs USING (refund_serial)" " WHERE order_serial=" " (SELECT order_serial" " FROM merchant_contract_terms" diff --git a/src/backenddb/test_merchantdb.c b/src/backenddb/test_merchantdb.c index f8627260..c3e8d71a 100644 --- a/src/backenddb/test_merchantdb.c +++ b/src/backenddb/test_merchantdb.c @@ -5795,6 +5795,7 @@ struct TestLookupRefundsDetailed_Closure * @param rtransaction_id identificator of the refund * @param reason human-readable explanation of the refund * @param refund_amount refund amount which is being taken from @a coin_pub + * @param pending true if this refund has not been processed by the wallet/exchange */ static void lookup_refunds_detailed_cb (void *cls, @@ -5804,7 +5805,8 @@ lookup_refunds_detailed_cb (void *cls, const char *exchange_url, uint64_t rtransaction_id, const char *reason, - const struct TALER_Amount *refund_amount) + const struct TALER_Amount *refund_amount, + bool pending) { struct TestLookupRefundsDetailed_Closure *cmp = cls; if (NULL == cmp) @@ -5911,6 +5913,7 @@ struct LookupRefundSerial_Closure * @param rtransaction_id identificator of the refund * @param reason human-readable explanation of the refund * @param refund_amount refund amount which is being taken from @a coin_pub + * @param pending true if this refund has not been processed by the wallet/exchange */ static void get_refund_serial_cb (void *cls, @@ -5920,7 +5923,8 @@ get_refund_serial_cb (void *cls, const char *exchange_url, uint64_t rtransaction_id, const char *reason, - const struct TALER_Amount *refund_amount) + const struct TALER_Amount *refund_amount, + bool pending) { struct LookupRefundSerial_Closure *lookup_cls = cls; if (NULL == lookup_cls) |