summaryrefslogtreecommitdiff
path: root/src/bank-lib
diff options
context:
space:
mode:
Diffstat (limited to 'src/bank-lib')
-rw-r--r--src/bank-lib/fakebank.c13
-rw-r--r--src/bank-lib/test_bank_api.c4
-rw-r--r--src/bank-lib/test_bank_api_with_fakebank.c6
-rw-r--r--src/bank-lib/test_bank_interpreter.c14
4 files changed, 27 insertions, 10 deletions
diff --git a/src/bank-lib/fakebank.c b/src/bank-lib/fakebank.c
index fb512168..8d16567f 100644
--- a/src/bank-lib/fakebank.c
+++ b/src/bank-lib/fakebank.c
@@ -512,8 +512,17 @@ handle_history (struct TALER_FAKEBANK_Handle *h,
continue;
}
- subject = GNUNET_STRINGS_data_to_string_alloc (&pos->wtid,
- sizeof (pos->wtid));
+ {
+ char *ws;
+
+ ws = GNUNET_STRINGS_data_to_string_alloc (&pos->wtid,
+ sizeof (pos->wtid));
+ GNUNET_asprintf (&subject,
+ "%s %s",
+ ws,
+ pos->exchange_base_url);
+ GNUNET_free (ws);
+ }
trans = json_pack ("{s:I, s:o, s:o, s:s, s:I, s:s}",
"row_id", (json_int_t) pos->serial_id,
"date", GNUNET_JSON_from_time_abs (pos->date),
diff --git a/src/bank-lib/test_bank_api.c b/src/bank-lib/test_bank_api.c
index 800dc56a..9904f371 100644
--- a/src/bank-lib/test_bank_api.c
+++ b/src/bank-lib/test_bank_api.c
@@ -53,7 +53,7 @@ run (void *cls)
.details.admin_add_incoming.expected_response_code = MHD_HTTP_OK,
.details.admin_add_incoming.credit_account_no = 1,
.details.admin_add_incoming.debit_account_no = 2, /* Ignored */
- .details.admin_add_incoming.amount = "PUDOS:5.01" },
+ .details.admin_add_incoming.amount = "KUDOS:5.01" },
/* Move money from Exchange to Bank */
{ .oc = TBI_OC_ADMIN_ADD_INCOMING,
.label = "deposit-2",
@@ -61,7 +61,7 @@ run (void *cls)
.details.admin_add_incoming.expected_response_code = MHD_HTTP_OK,
.details.admin_add_incoming.credit_account_no = 1,
.details.admin_add_incoming.debit_account_no = 2, /* Ignored */
- .details.admin_add_incoming.amount = "PUDOS:5.01" },
+ .details.admin_add_incoming.amount = "KUDOS:5.01" },
#if 0
/* Ask Exchange's incoming history */
{ .oc = TBI_OC_HISTORY,
diff --git a/src/bank-lib/test_bank_api_with_fakebank.c b/src/bank-lib/test_bank_api_with_fakebank.c
index 01ab30cd..e16c3a91 100644
--- a/src/bank-lib/test_bank_api_with_fakebank.c
+++ b/src/bank-lib/test_bank_api_with_fakebank.c
@@ -52,7 +52,7 @@ run (void *cls)
.details.admin_add_incoming.credit_account_no = 1,
.details.admin_add_incoming.debit_account_no = 2,
.details.admin_add_incoming.exchange_base_url = "https://exchange.net/",
- .details.admin_add_incoming.amount = "PUDOS:5.01" },
+ .details.admin_add_incoming.amount = "KUDOS:5.01" },
/* Add EUR:3.21 to account 3 */
{ .oc = TBI_OC_HISTORY,
.label = "history-1c",
@@ -72,14 +72,14 @@ run (void *cls)
.details.admin_add_incoming.credit_account_no = 3,
.details.admin_add_incoming.debit_account_no = 2,
.details.admin_add_incoming.exchange_base_url = "https://exchange.org/",
- .details.admin_add_incoming.amount = "PUDOS:3.21" },
+ .details.admin_add_incoming.amount = "KUDOS:3.21" },
{ .oc = TBI_OC_ADMIN_ADD_INCOMING,
.label = "credit-2",
.details.admin_add_incoming.expected_response_code = MHD_HTTP_OK,
.details.admin_add_incoming.credit_account_no = 2,
.details.admin_add_incoming.debit_account_no = 3,
.details.admin_add_incoming.exchange_base_url = "https://exchange.org/",
- .details.admin_add_incoming.amount = "PUDOS:3.22" },
+ .details.admin_add_incoming.amount = "KUDOS:3.22" },
{ .oc = TBI_OC_HISTORY,
.label = "history-2b",
.details.history.account_number = 2,
diff --git a/src/bank-lib/test_bank_interpreter.c b/src/bank-lib/test_bank_interpreter.c
index bfd744a0..94b3b0e5 100644
--- a/src/bank-lib/test_bank_interpreter.c
+++ b/src/bank-lib/test_bank_interpreter.c
@@ -323,9 +323,17 @@ build_history (struct InterpreterState *is,
/* h[total].execution_date; // unknown here */
h[total].serial_id
= pos->details.admin_add_incoming.serial_id;
- h[total].details.wire_transfer_subject
- = GNUNET_STRINGS_data_to_string_alloc (&pos->details.admin_add_incoming.wtid,
- sizeof (struct TALER_WireTransferIdentifierRawP));
+ {
+ char *ws;
+
+ ws = GNUNET_STRINGS_data_to_string_alloc (&pos->details.admin_add_incoming.wtid,
+ sizeof (struct TALER_WireTransferIdentifierRawP));
+ GNUNET_asprintf (&h[total].details.wire_transfer_subject,
+ "%s %s",
+ ws,
+ pos->details.admin_add_incoming.exchange_base_url);
+ GNUNET_free (ws);
+ }
total++;
}
}