From f662313f7932818a88f0766c783b9c407a8b6c61 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 28 Dec 2022 22:42:09 +0100 Subject: add purse delete functions to libtalerexchange --- src/include/taler_exchange_service.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/include') diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h index 0e33f7770..938b74457 100644 --- a/src/include/taler_exchange_service.h +++ b/src/include/taler_exchange_service.h @@ -4983,7 +4983,7 @@ struct TALER_EXCHANGE_PurseDeleteHandle; * @param cb_cls closure for @a cb * @return the request handle; NULL upon error */ -struct TALER_EXCHANGE_PurseCreateDepositHandle * +struct TALER_EXCHANGE_PurseDeleteHandle * TALER_EXCHANGE_purse_delete ( struct TALER_EXCHANGE_Handle *exchange, const struct TALER_PurseContractPrivateKeyP *purse_priv, -- cgit v1.2.3 From 5533bcbf651eafce682212ce635bdf8ce83d4bcb Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 28 Dec 2022 22:55:48 +0100 Subject: add purse delete testing CMD --- src/include/taler_testing_lib.h | 15 +++++++++++++++ 1 file changed, 15 insertions(+) (limited to 'src/include') diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h index aa475bd33..55d36b2de 100644 --- a/src/include/taler_testing_lib.h +++ b/src/include/taler_testing_lib.h @@ -2567,6 +2567,21 @@ TALER_TESTING_cmd_purse_create_with_deposit ( ...); +/** + * Deletes a purse. + * + * @param label command label + * @param expected_http_status what HTTP status do we expect to get returned from the exchange + * @param purse_cmd command that created the purse + * @return the command + */ +struct TALER_TESTING_Command +TALER_TESTING_cmd_purse_delete ( + const char *label, + unsigned int expected_http_status, + const char *purse_cmd); + + /** * Retrieve contract (also checks that the contract matches * the upload command). -- cgit v1.2.3 From 880c14909bfdaf1199ffc5da989eccb52f6cac12 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Wed, 28 Dec 2022 23:44:17 +0100 Subject: add notification logic on purse deletion --- src/include/taler_exchangedb_plugin.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'src/include') diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h index 5a55b5c93..da28262a8 100644 --- a/src/include/taler_exchangedb_plugin.h +++ b/src/include/taler_exchangedb_plugin.h @@ -5827,6 +5827,7 @@ struct TALER_EXCHANGEDB_Plugin * @param[out] deposited set to actual amount put into the purse so far * @param[out] h_contract_terms set to hash of the contract for the purse * @param[out] merge_timestamp set to time when the purse was merged, or NEVER if not + * @param[out] purse_deleted set to true if purse was deleted * @return transaction status code */ enum GNUNET_DB_QueryStatus @@ -5838,7 +5839,8 @@ struct TALER_EXCHANGEDB_Plugin struct TALER_Amount *amount, struct TALER_Amount *deposited, struct TALER_PrivateContractHashP *h_contract_terms, - struct GNUNET_TIME_Timestamp *merge_timestamp); + struct GNUNET_TIME_Timestamp *merge_timestamp, + bool *purse_deleted); /** -- cgit v1.2.3