summaryrefslogtreecommitdiff
path: root/src/include
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-05-26 16:38:59 +0200
committerChristian Grothoff <christian@grothoff.org>2016-05-26 16:38:59 +0200
commitc0451f0982bdb565f431417cea3ab0238342d125 (patch)
tree4a27b418a74acd0fa5d6bb789818ced43c4832d5 /src/include
parent3f468773e71b68e9ceb5431e797941b1cc086e68 (diff)
downloadexchange-c0451f0982bdb565f431417cea3ab0238342d125.tar.gz
exchange-c0451f0982bdb565f431417cea3ab0238342d125.tar.bz2
exchange-c0451f0982bdb565f431417cea3ab0238342d125.zip
fix #4533 for exchange (breaks interaction with bank for /admin/add/incoming)
Diffstat (limited to 'src/include')
-rw-r--r--src/include/taler_exchange_service.h25
-rw-r--r--src/include/taler_exchangedb_plugin.h25
2 files changed, 35 insertions, 15 deletions
diff --git a/src/include/taler_exchange_service.h b/src/include/taler_exchange_service.h
index bcc794107..62fc64b6f 100644
--- a/src/include/taler_exchange_service.h
+++ b/src/include/taler_exchange_service.h
@@ -604,10 +604,19 @@ struct TALER_EXCHANGE_ReserveHistory
*/
union {
- /**
- * Transaction details for the incoming transaction.
- */
- json_t *wire_in_details;
+ struct {
+ /**
+ * Sender account information for the incoming transfer.
+ */
+ json_t *sender_account_details;
+
+ /**
+ * Wire transfer details for the incoming transfer.
+ */
+ json_t *transfer_details;
+
+
+ } in_details;
/**
* Signature authorizing the withdrawal for outgoing transaction.
@@ -1036,7 +1045,10 @@ typedef void
* @param reserve_pub public key of the reserve
* @param amount amount that was deposited
* @param execution_date when did we receive the amount
- * @param wire wire details
+ * @param sender_account_details account information of the sender of the money;
+ * the receiver is always the exchange.
+ * @param transfer_details details that uniquely identify the transfer;
+ * used to check for duplicate operations by the exchange
* @param res_cb the callback to call when the final result for this request is available
* @param res_cb_cls closure for the above callback
* @return NULL
@@ -1048,7 +1060,8 @@ TALER_EXCHANGE_admin_add_incoming (struct TALER_EXCHANGE_Handle *exchange,
const struct TALER_ReservePublicKeyP *reserve_pub,
const struct TALER_Amount *amount,
struct GNUNET_TIME_Absolute execution_date,
- const json_t *wire,
+ const json_t *sender_account_details,
+ const json_t *transfer_details,
TALER_EXCHANGE_AdminAddIncomingResultCallback res_cb,
void *res_cb_cls);
diff --git a/src/include/taler_exchangedb_plugin.h b/src/include/taler_exchangedb_plugin.h
index 59e33a9eb..e8d2c80e8 100644
--- a/src/include/taler_exchangedb_plugin.h
+++ b/src/include/taler_exchangedb_plugin.h
@@ -51,9 +51,15 @@ struct TALER_EXCHANGEDB_BankTransfer
struct GNUNET_TIME_Absolute execution_date;
/**
- * Detailed wire information about the transaction.
+ * Detailed wire information about the sending account.
*/
- json_t *wire;
+ json_t *sender_account_details;
+
+ /**
+ * Detailed wire transfer information that uniquely identifies the
+ * wire transfer.
+ */
+ json_t *transfer_details;
};
@@ -243,9 +249,9 @@ struct TALER_EXCHANGEDB_Deposit
struct GNUNET_HashCode h_wire;
/**
- * Detailed wire information for executing the transaction.
+ * Detailed information about the receiver for executing the transaction.
*/
- json_t *wire;
+ json_t *receiver_wire_account;
/**
* Merchant-generated transaction ID to detect duplicate
@@ -601,7 +607,7 @@ struct TALER_EXCHANGEDB_Session;
* @param h_contract hash of the contract between merchant and customer
* @param wire_deadline by which the merchant adviced that he would like the
* wire transfer to be executed
- * @param wire wire details for the merchant, NULL from iterate_matching_deposits()
+ * @param receiver_wire_account wire details for the merchant, NULL from iterate_matching_deposits()
* @return #GNUNET_OK to continue to iterate, #GNUNET_SYSERR to stop
*/
typedef int
@@ -614,7 +620,7 @@ typedef int
uint64_t transaction_id,
const struct GNUNET_HashCode *h_contract,
struct GNUNET_TIME_Absolute wire_deadline,
- const json_t *wire);
+ const json_t *receiver_wire_account);
/**
@@ -842,8 +848,8 @@ struct TALER_EXCHANGEDB_Plugin
* @param reserve_pub public key of the reserve
* @param balance the amount that has to be added to the reserve
* @param execution_time when was the amount added
- * @param details bank transaction details justifying the increment,
- * must be unique for each incoming transaction
+ * @param sender_account_details information about the sender
+ * @param transfer_details information that uniquely identifies the wire transfer
* @return #GNUNET_OK upon success; #GNUNET_NO if the given
* @a details are already known for this @a reserve_pub,
* #GNUNET_SYSERR upon failures (DB error, incompatible currency)
@@ -854,7 +860,8 @@ struct TALER_EXCHANGEDB_Plugin
const struct TALER_ReservePublicKeyP *reserve_pub,
const struct TALER_Amount *balance,
struct GNUNET_TIME_Absolute execution_time,
- const json_t *details);
+ const json_t *sender_account_details,
+ const json_t *transfer_details);
/**