diff options
author | Christian Grothoff <christian@grothoff.org> | 2022-05-23 16:15:14 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2022-05-23 16:15:14 +0200 |
commit | 6ee4558b6f3aecd1e8f4ce758e782a31b8dee78c (patch) | |
tree | 4ee7d4eaa67cc77cb4579042a0f4cc5a4e01b96f | |
parent | 2e80f51e2515da3cb4bae47ccf3bee9ddf3d4482 (diff) |
-sql fix
-rw-r--r-- | src/exchange/taler-exchange-httpd_responses.c | 4 | ||||
-rw-r--r-- | src/exchangedb/plugin_exchangedb_postgres.c | 8 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c index 0e5c217a9..afbf2476c 100644 --- a/src/exchange/taler-exchange-httpd_responses.c +++ b/src/exchange/taler-exchange-httpd_responses.c @@ -406,7 +406,9 @@ TEH_RESPONSE_compile_transaction_history ( TALER_JSON_pack_amount ("amount", &pd->amount), GNUNET_JSON_pack_string ("exchange_base_url", - pd->exchange_base_url), + NULL == pd->exchange_base_url + ? TEH_base_url + : pd->exchange_base_url), GNUNET_JSON_pack_data_auto ("purse_pub", &pd->purse_pub), GNUNET_JSON_pack_data_auto ("coin_sig", diff --git a/src/exchangedb/plugin_exchangedb_postgres.c b/src/exchangedb/plugin_exchangedb_postgres.c index 273cffa09..3ea6b97ae 100644 --- a/src/exchangedb/plugin_exchangedb_postgres.c +++ b/src/exchangedb/plugin_exchangedb_postgres.c @@ -1261,7 +1261,7 @@ prepare_statements (struct PostgresClosure *pg) GNUNET_PQ_make_prepare ( "get_purse_deposit_by_coin_pub", "SELECT" - " partner_url" + " partner_base_url" ",amount_with_fee_val" ",amount_with_fee_frac" ",denoms.fee_deposit_val" @@ -1273,12 +1273,12 @@ prepare_statements (struct PostgresClosure *pg) " LEFT JOIN partners" " USING (partner_serial_id)" " JOIN known_coins kc" - " ON (refresh_commitments.old_coin_pub = kc.coin_pub)" + " ON (pd.coin_pub = kc.coin_pub)" " JOIN denominations denoms" " USING (denominations_serial)" // FIXME: use to-be-created materialized index // on coin_pub (query crosses partitions!) - " WHERE coin_pub=$1;", + " WHERE pd.coin_pub=$1;", 1), /* Store information about the desired denominations for a refresh operation, used in #postgres_insert_refresh_reveal() */ @@ -8001,7 +8001,7 @@ add_coin_purse_deposit (void *cls, GNUNET_PQ_result_spec_uint64 ("purse_deposit_serial_id", &serial_id), GNUNET_PQ_result_spec_allow_null ( - GNUNET_PQ_result_spec_string ("partner_url", + GNUNET_PQ_result_spec_string ("partner_base_url", &deposit->exchange_base_url), NULL), GNUNET_PQ_result_spec_auto_from_type ("coin_sig", |