From 7a3b1c6b88a86ccb98a9d60675f8f0c1a7e3fe45 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 24 Sep 2023 11:51:47 +0200 Subject: fix various FIXMEs --- src/bank-lib/fakebank.h | 5 ----- src/bank-lib/fakebank_bank.c | 2 +- src/bank-lib/fakebank_tbr_get_history.c | 10 +--------- src/bank-lib/fakebank_twg_history.c | 20 ++------------------ 4 files changed, 4 insertions(+), 33 deletions(-) (limited to 'src/bank-lib') diff --git a/src/bank-lib/fakebank.h b/src/bank-lib/fakebank.h index a9285ec13..6310231b9 100644 --- a/src/bank-lib/fakebank.h +++ b/src/bank-lib/fakebank.h @@ -484,11 +484,6 @@ struct HistoryContext */ struct Account *acc; - /** - * Payto URI of the account. - */ - char *payto_uri; - /** * JSON object we are building to return. */ diff --git a/src/bank-lib/fakebank_bank.c b/src/bank-lib/fakebank_bank.c index ec7862ac7..483a3228c 100644 --- a/src/bank-lib/fakebank_bank.c +++ b/src/bank-lib/fakebank_bank.c @@ -77,7 +77,7 @@ TALER_FAKEBANK_bank_main_ ( GNUNET_JSON_pack_string ("currency", h->currency), GNUNET_JSON_pack_string ("name", - "libeufin-bank" /* FIXME: spec!? */)); + "taler-corebank")); } if ( (0 == strcmp (url, diff --git a/src/bank-lib/fakebank_tbr_get_history.c b/src/bank-lib/fakebank_tbr_get_history.c index 59efd8ea4..8147d943a 100644 --- a/src/bank-lib/fakebank_tbr_get_history.c +++ b/src/bank-lib/fakebank_tbr_get_history.c @@ -44,7 +44,6 @@ history_cleanup (void *cls) { struct HistoryContext *hc = cls; - GNUNET_free (hc->payto_uri); json_decref (hc->history); GNUNET_free (hc); } @@ -95,13 +94,6 @@ TALER_FAKEBANK_tbr_get_history_incoming ( TALER_EC_BANK_UNKNOWN_ACCOUNT, account); } - /* FIXME: was simply: acc->payto_uri -- same!? */ - GNUNET_asprintf (&hc->payto_uri, - "payto://x-taler-bank/localhost/%s?receiver-name=%s", - account, - hc->acc->receiver_name); - GNUNET_assert (0 == strcmp (hc->payto_uri, - hc->acc->payto_uri)); hc->history = json_array (); if (NULL == hc->history) { @@ -297,7 +289,7 @@ finish: MHD_HTTP_OK, GNUNET_JSON_pack_string ( "credit_account", - hc->payto_uri), + hc->acc->payto_uri), GNUNET_JSON_pack_array_steal ( "incoming_transactions", h)); diff --git a/src/bank-lib/fakebank_twg_history.c b/src/bank-lib/fakebank_twg_history.c index 062285078..44bae314b 100644 --- a/src/bank-lib/fakebank_twg_history.c +++ b/src/bank-lib/fakebank_twg_history.c @@ -42,7 +42,6 @@ history_cleanup (void *cls) { struct HistoryContext *hc = cls; - GNUNET_free (hc->payto_uri); json_decref (hc->history); GNUNET_free (hc); } @@ -93,13 +92,6 @@ TALER_FAKEBANK_twg_get_debit_history_ ( TALER_EC_BANK_UNKNOWN_ACCOUNT, account); } - GNUNET_asprintf (&hc->payto_uri, - "payto://x-taler-bank/localhost/%s?receiver-name=%s", - account, - hc->acc->receiver_name); - /* New invariant: */ - GNUNET_assert (0 == strcmp (hc->payto_uri, - hc->acc->payto_uri)); hc->history = json_array (); if (NULL == hc->history) { @@ -294,7 +286,7 @@ finish: MHD_HTTP_OK, GNUNET_JSON_pack_string ( "debit_account", - hc->payto_uri), + hc->acc->payto_uri), GNUNET_JSON_pack_array_steal ( "outgoing_transactions", h)); @@ -347,14 +339,6 @@ TALER_FAKEBANK_twg_get_credit_history_ ( TALER_EC_BANK_UNKNOWN_ACCOUNT, account); } - /* FIXME: was simply: acc->payto_uri -- same!? */ - GNUNET_asprintf (&hc->payto_uri, - "payto://x-taler-bank/%s/%s?receiver-name=%s", - h->hostname, - account, - hc->acc->receiver_name); - GNUNET_assert (0 == strcmp (hc->payto_uri, - hc->acc->payto_uri)); hc->history = json_array (); if (NULL == hc->history) { @@ -529,7 +513,7 @@ finish: MHD_HTTP_OK, GNUNET_JSON_pack_string ( "credit_account", - hc->payto_uri), + hc->acc->payto_uri), GNUNET_JSON_pack_array_steal ( "incoming_transactions", h)); -- cgit v1.2.3