From c5b5085d02567f6d0ed9783964c56cea59f389a3 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 1 Nov 2024 05:05:11 +0100 Subject: working through DB --- src/exchangedb/exchange_do_reserves_in_insert.sql | 2 +- src/exchangedb/test_exchangedb.c | 13 +++++++------ 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/exchangedb/exchange_do_reserves_in_insert.sql b/src/exchangedb/exchange_do_reserves_in_insert.sql index 97f8b2277..93d4bb1d4 100644 --- a/src/exchangedb/exchange_do_reserves_in_insert.sql +++ b/src/exchangedb/exchange_do_reserves_in_insert.sql @@ -67,7 +67,7 @@ BEGIN ,payto_uri ) VALUES ( ini_wire_source_h_payto - ini_h_normalized_payto + ,ini_h_normalized_payto ,ini_payto_uri ) ON CONFLICT DO NOTHING; diff --git a/src/exchangedb/test_exchangedb.c b/src/exchangedb/test_exchangedb.c index 402943160..fc79d6ba6 100644 --- a/src/exchangedb/test_exchangedb.c +++ b/src/exchangedb/test_exchangedb.c @@ -693,7 +693,7 @@ audit_reserve_in_cb (void *cls, uint64_t rowid, const struct TALER_ReservePublicKeyP *reserve_pub, const struct TALER_Amount *credit, - const char *sender_account_details, + const struct TALER_FullPayto sender_account_details, uint64_t wire_reference, struct GNUNET_TIME_Timestamp execution_date) { @@ -1194,10 +1194,10 @@ run (void *cls) struct TALER_MerchantPublicKeyP mpub2; struct TALER_EXCHANGEDB_Refund refund; const struct TALER_FullPayto sndr = { - (char *) "payto://x-taler-bank/localhost:8080/1" + (char *) "payto://x-taler-bank/localhost:8080/1?receiver-name=1" }; const struct TALER_FullPayto rcvr = { - (char *) "payto://x-taler-bank/localhost:8080/2" + (char *) "payto://x-taler-bank/localhost:8080/2?receiver-name=1" }; const uint32_t num_partitions = 10; unsigned int matched; @@ -1223,7 +1223,7 @@ run (void *cls) memset (&bd, 0, sizeof (bd)); - bd.receiver_wire_account = (char *) rcvr; + bd.receiver_wire_account = rcvr; bd.cdis = &deposit; bd.num_cdis = 1; memset (&salt, @@ -1914,8 +1914,9 @@ run (void *cls) /* this is the amount we transferred twice*/ FAILIF (1 != bt->amount.value); FAILIF (1000 != bt->amount.fraction); - FAILIF (0 != strcmp (CURRENCY, bt->amount.currency)); - FAILIF (NULL == bt->sender_account_details); + FAILIF (0 != strcmp (CURRENCY, + bt->amount.currency)); + FAILIF (NULL == bt->sender_account_details.full_payto); break; case TALER_EXCHANGEDB_RO_WITHDRAW_COIN: withdraw = rh_head->details.withdraw; -- cgit v1.2.3