diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-08-22 23:15:08 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-08-22 23:15:08 +0200 |
commit | c98d960d1badd1eeb834bacbc133960e2f86d304 (patch) | |
tree | fc94b246475ff387cf5aa4d8bbc3f0aa2f4b7d65 /src/backenddb/pg_increase_refund.c | |
parent | 525426db10c179fcacd19487f6c22cac837b2d40 (diff) | |
download | merchant-c98d960d1badd1eeb834bacbc133960e2f86d304.tar.gz merchant-c98d960d1badd1eeb834bacbc133960e2f86d304.tar.bz2 merchant-c98d960d1badd1eeb834bacbc133960e2f86d304.zip |
add currency to amounts in merchant DB
Diffstat (limited to 'src/backenddb/pg_increase_refund.c')
-rw-r--r-- | src/backenddb/pg_increase_refund.c | 11 |
1 files changed, 5 insertions, 6 deletions
diff --git a/src/backenddb/pg_increase_refund.c b/src/backenddb/pg_increase_refund.c index e003512e..5fd548d7 100644 --- a/src/backenddb/pg_increase_refund.c +++ b/src/backenddb/pg_increase_refund.c @@ -68,7 +68,6 @@ process_refund_cb (void *cls, unsigned int num_results) { struct FindRefundContext *ictx = cls; - struct PostgresClosure *pg = ictx->pg; for (unsigned int i = 0; i<num_results; i++) { @@ -76,8 +75,8 @@ process_refund_cb (void *cls, struct TALER_Amount acc; uint64_t rtransaction_id; struct GNUNET_PQ_ResultSpec rs[] = { - TALER_PQ_RESULT_SPEC_AMOUNT ("refund_amount", - &acc), + TALER_PQ_result_spec_amount_with_currency ("refund_amount", + &acc), GNUNET_PQ_result_spec_uint64 ("rtransaction_id", &rtransaction_id), GNUNET_PQ_result_spec_end @@ -205,8 +204,8 @@ process_deposits_for_refund_cb ( &rcd[i].coin_pub), GNUNET_PQ_result_spec_uint64 ("order_serial", &rcd[i].order_serial), - TALER_PQ_RESULT_SPEC_AMOUNT ("amount_with_fee", - &rcd[i].deposited_with_fee), + TALER_PQ_result_spec_amount_with_currency ("amount_with_fee", + &rcd[i].deposited_with_fee), GNUNET_PQ_result_spec_end }; struct FindRefundContext ictx = { @@ -364,7 +363,7 @@ process_deposits_for_refund_cb ( GNUNET_PQ_query_param_timestamp (&now), GNUNET_PQ_query_param_auto_from_type (&rcd[i].coin_pub), GNUNET_PQ_query_param_string (ctx->reason), - TALER_PQ_query_param_amount (pg->conn, + TALER_PQ_query_param_amount_with_currency (pg->conn, increment), GNUNET_PQ_query_param_end }; |