summaryrefslogtreecommitdiff
path: root/src/exchangedb/pg_get_reserve_balance.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchangedb/pg_get_reserve_balance.c')
-rw-r--r--src/exchangedb/pg_get_reserve_balance.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/src/exchangedb/pg_get_reserve_balance.c b/src/exchangedb/pg_get_reserve_balance.c
index e08261fc0..140bf3b70 100644
--- a/src/exchangedb/pg_get_reserve_balance.c
+++ b/src/exchangedb/pg_get_reserve_balance.c
@@ -27,8 +27,8 @@
enum GNUNET_DB_QueryStatus
TEH_PG_get_reserve_balance (void *cls,
- const struct TALER_ReservePublicKeyP *reserve_pub,
- struct TALER_Amount *balance)
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ struct TALER_Amount *balance)
{
struct PostgresClosure *pg = cls;
struct GNUNET_PQ_QueryParam params[] = {
@@ -36,7 +36,8 @@ TEH_PG_get_reserve_balance (void *cls,
GNUNET_PQ_query_param_end
};
struct GNUNET_PQ_ResultSpec rs[] = {
- TALER_PQ_RESULT_SPEC_AMOUNT ("current_balance",
+ TALER_PQ_result_spec_amount ("current_balance",
+ pg->currency,
balance),
GNUNET_PQ_result_spec_end
};
@@ -44,8 +45,7 @@ TEH_PG_get_reserve_balance (void *cls,
PREPARE (pg,
"get_reserve_balance",
"SELECT"
- " current_balance_val"
- ",current_balance_frac"
+ " current_balance"
" FROM reserves"
" WHERE reserve_pub=$1;");
return GNUNET_PQ_eval_prepared_singleton_select (pg->conn,