summaryrefslogtreecommitdiff
path: root/src/exchange/taler-exchange-httpd_purses_create.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-05-08 11:37:37 +0200
committerChristian Grothoff <christian@grothoff.org>2022-05-08 11:37:37 +0200
commitd3a63881999aa1c6d763263346a0a5979ec6efac (patch)
tree92f220ad08ce79d1f18366346ffabfa93cf33d75 /src/exchange/taler-exchange-httpd_purses_create.c
parent6b8e732bf8d8bfae268e7f5a9a09af9167fd0d47 (diff)
downloadexchange-d3a63881999aa1c6d763263346a0a5979ec6efac.tar.gz
exchange-d3a63881999aa1c6d763263346a0a5979ec6efac.tar.bz2
exchange-d3a63881999aa1c6d763263346a0a5979ec6efac.zip
pass purse_fee to determine how purse creation is paid for
Diffstat (limited to 'src/exchange/taler-exchange-httpd_purses_create.c')
-rw-r--r--src/exchange/taler-exchange-httpd_purses_create.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/exchange/taler-exchange-httpd_purses_create.c b/src/exchange/taler-exchange-httpd_purses_create.c
index 4034978b9..a5702ffeb 100644
--- a/src/exchange/taler-exchange-httpd_purses_create.c
+++ b/src/exchange/taler-exchange-httpd_purses_create.c
@@ -55,7 +55,7 @@ struct Coin
struct TALER_Amount amount;
/**
- * Deposit fee applicable for this coin.
+ * Deposit fee applicable to this coin.
*/
struct TALER_Amount deposit_fee;
@@ -220,8 +220,11 @@ create_transaction (void *cls,
{
struct PurseCreateContext *pcc = cls;
enum GNUNET_DB_QueryStatus qs;
+ struct TALER_Amount purse_fee;
bool in_conflict = true;
+ TALER_amount_set_zero (pcc->amount.currency,
+ &purse_fee);
/* 1) create purse */
qs = TEH_plugin->insert_purse_request (TEH_plugin->cls,
pcc->purse_pub,
@@ -229,7 +232,9 @@ create_transaction (void *cls,
pcc->purse_expiration,
&pcc->h_contract_terms,
pcc->min_age,
+ TALER_WAMF_MODE_MERGE_FULLY_PAID_PURSE,
&pcc->amount,
+ &purse_fee,
&pcc->purse_sig,
&in_conflict);
if (qs < 0)