aboutsummaryrefslogtreecommitdiff
path: root/src/auditor/taler-helper-auditor-coins.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-10-16 16:38:21 +0200
committerChristian Grothoff <christian@grothoff.org>2022-10-16 16:38:21 +0200
commit35e505f6bf983a5bffa4fd5d5ef4344c7da75a9f (patch)
tree79ac421cac8cd56b39cce2d6a5b17ab1220d0619 /src/auditor/taler-helper-auditor-coins.c
parent745981c680868eeebc303d8241267c5d0b1167c1 (diff)
downloadexchange-35e505f6bf983a5bffa4fd5d5ef4344c7da75a9f.tar.xz
add support for coin open-deposit and coin purse refunds to auditor logic
Diffstat (limited to 'src/auditor/taler-helper-auditor-coins.c')
-rw-r--r--src/auditor/taler-helper-auditor-coins.c18
1 files changed, 16 insertions, 2 deletions
diff --git a/src/auditor/taler-helper-auditor-coins.c b/src/auditor/taler-helper-auditor-coins.c
index aa3e34b76..23d543dcb 100644
--- a/src/auditor/taler-helper-auditor-coins.c
+++ b/src/auditor/taler-helper-auditor-coins.c
@@ -539,8 +539,22 @@ check_coin_history (const struct TALER_CoinSpendPublicKeyP *coin_pub,
&spent,
&pos->details.purse_deposit->amount);
break;
- }
- }
+ case TALER_EXCHANGEDB_TT_PURSE_REFUND:
+ TALER_ARL_amount_add (&refunded,
+ &refunded,
+ &tl->details.purse_refund->refund_amount);
+ TALER_ARL_amount_add (&spent,
+ &spent,
+ &pos->details.purse_refund->refund_fee);
+ have_refund = true;
+ break;
+ case TALER_EXCHANGEDB_TT_RESERVE_OPEN:
+ TALER_ARL_amount_add (&spent,
+ &spent,
+ &tl->details.reserve_open->coin_contribution);
+ break;
+ } /* switch (pos->type) */
+ } /* for (...) */
if (have_refund)
{