From a1dae0199f3bc3e9f66fc1375c652c6f99b26b2c Mon Sep 17 00:00:00 2001 From: Özgür Kesim Date: Fri, 28 Jul 2023 19:01:57 +0200 Subject: FAILING attempt to make echange.reserve use taler_amount Fails with > TALER_PREFIX=/usr/local ./test-exchangedb-postgres 2023-07-28T19:02:25.150845+0200 /home/oec/projects/taler/exchange/src/exchangedb/.libs/test-exchangedb-postgres-2559159 WARNING Could not run PSQL on file /usr/local/share/taler//sql/exchange/drop.sql: psql exit code was 3 2023-07-28T19:02:32.488085+0200 pq-2559159 ERROR Query `call_withdraw' failed with result: invalid input syntax for type bigint: "(1,1000)"/(null)/ERROR: invalid input syntax for type bigint: "(1,1000)" CONTEXT: PL/pgSQL function exchange_do_withdraw(bytea,taler_amount,bytea,bytea,bytea,bytea,bytea,bigint,bigint,boolean) line 23 at SQL statement /PGRES_FATAL_ERROR/ERROR: invalid input syntax for type bigint: "(1,1000)" CONTEXT: PL/pgSQL function exchange_do_withdraw(bytea,taler_amount,bytea,bytea,bytea,bytea,bytea,bigint,bigint,boolean) line 23 at SQL statement 2023-07-28T19:02:32.488146+0200 /home/oec/projects/taler/exchange/src/exchangedb/.libs/test-exchangedb-postgres-2559159 ERROR Assertion failed at test_exchangedb.c:1428. --- src/exchangedb/pg_select_reserve_close_info.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'src/exchangedb/pg_select_reserve_close_info.c') diff --git a/src/exchangedb/pg_select_reserve_close_info.c b/src/exchangedb/pg_select_reserve_close_info.c index 973f5fa5..06e8dda2 100644 --- a/src/exchangedb/pg_select_reserve_close_info.c +++ b/src/exchangedb/pg_select_reserve_close_info.c @@ -39,8 +39,9 @@ TEH_PG_select_reserve_close_info ( GNUNET_PQ_query_param_end }; struct GNUNET_PQ_ResultSpec rs[] = { - TALER_PQ_RESULT_SPEC_AMOUNT ("current_balance", - balance), + TALER_PQ_result_spec_amount_tuple ("current_balance", + pg->currency, + balance), GNUNET_PQ_result_spec_string ("payto_uri", payto_uri), GNUNET_PQ_result_spec_end @@ -49,8 +50,7 @@ TEH_PG_select_reserve_close_info ( PREPARE (pg, "select_reserve_close_info", "SELECT " - " r.current_balance_val" - ",r.current_balance_frac" + " r.current_balance" ",wt.payto_uri" " FROM reserves r" " LEFT JOIN reserves_in ri USING (reserve_pub)" -- cgit v1.2.3