[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-exchange] branch master updated: match updated specification, us
From: |
gnunet |
Subject: |
[taler-exchange] branch master updated: match updated specification, use CREDIT instead of DEPOSIT for transfers into a reserve |
Date: |
Mon, 30 Mar 2020 18:09:49 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository exchange.
The following commit(s) were added to refs/heads/master by this push:
new c686fac8 match updated specification, use CREDIT instead of DEPOSIT
for transfers into a reserve
c686fac8 is described below
commit c686fac84b797129d83985086121a5425d988ea4
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Mar 30 18:09:47 2020 +0200
match updated specification, use CREDIT instead of DEPOSIT for transfers
into a reserve
---
src/exchange/taler-exchange-httpd_responses.c | 36 +++++++++++++--------------
src/lib/exchange_api_common.c | 2 +-
2 files changed, 19 insertions(+), 19 deletions(-)
diff --git a/src/exchange/taler-exchange-httpd_responses.c
b/src/exchange/taler-exchange-httpd_responses.c
index b2cf23d9..c3fcd599 100644
--- a/src/exchange/taler-exchange-httpd_responses.c
+++ b/src/exchange/taler-exchange-httpd_responses.c
@@ -452,15 +452,15 @@ TEH_RESPONSE_compile_reserve_history (
const struct TALER_EXCHANGEDB_ReserveHistory *rh,
struct TALER_Amount *balance)
{
- struct TALER_Amount deposit_total;
+ struct TALER_Amount credit_total;
struct TALER_Amount withdraw_total;
json_t *json_history;
enum InitAmounts
{
/** Nothing initialized */
IA_NONE = 0,
- /** deposit_total initialized */
- IA_DEPOSIT = 1,
+ /** credit_total initialized */
+ IA_CREDIT = 1,
/** withdraw_total initialized */
IA_WITHDRAW = 2
} init = IA_NONE;
@@ -476,14 +476,14 @@ TEH_RESPONSE_compile_reserve_history (
{
const struct TALER_EXCHANGEDB_BankTransfer *bank =
pos->details.bank;
- if (0 == (IA_DEPOSIT & init))
+ if (0 == (IA_CREDIT & init))
{
- deposit_total = bank->amount;
- init |= IA_DEPOSIT;
+ credit_total = bank->amount;
+ init |= IA_CREDIT;
}
else if (GNUNET_OK !=
- TALER_amount_add (&deposit_total,
- &deposit_total,
+ TALER_amount_add (&credit_total,
+ &credit_total,
&bank->amount))
{
GNUNET_break (0);
@@ -495,7 +495,7 @@ TEH_RESPONSE_compile_reserve_history (
json_history,
json_pack ("{s:s, s:o, s:s, s:o, s:o}",
"type",
- "DEPOSIT",
+ "CREDIT",
"timestamp",
GNUNET_JSON_from_time_abs (bank->execution_date),
"sender_account_url",
@@ -567,14 +567,14 @@ TEH_RESPONSE_compile_reserve_history (
struct TALER_ExchangePublicKeyP pub;
struct TALER_ExchangeSignatureP sig;
- if (0 == (IA_DEPOSIT & init))
+ if (0 == (IA_CREDIT & init))
{
- deposit_total = recoup->value;
- init |= IA_DEPOSIT;
+ credit_total = recoup->value;
+ init |= IA_CREDIT;
}
else if (GNUNET_OK !=
- TALER_amount_add (&deposit_total,
- &deposit_total,
+ TALER_amount_add (&credit_total,
+ &credit_total,
&recoup->value))
{
GNUNET_break (0);
@@ -709,9 +709,9 @@ TEH_RESPONSE_compile_reserve_history (
}
}
- if (0 == (IA_DEPOSIT & init))
+ if (0 == (IA_CREDIT & init))
{
- /* We should not have gotten here, without deposits no reserve
+ /* We should not have gotten here, without credits no reserve
should exist! */
GNUNET_break (0);
json_decref (json_history);
@@ -721,12 +721,12 @@ TEH_RESPONSE_compile_reserve_history (
{
/* did not encounter any withdraw operations, set withdraw_total to zero */
GNUNET_assert (GNUNET_OK ==
- TALER_amount_get_zero (deposit_total.currency,
+ TALER_amount_get_zero (credit_total.currency,
&withdraw_total));
}
if (GNUNET_SYSERR ==
TALER_amount_subtract (balance,
- &deposit_total,
+ &credit_total,
&withdraw_total))
{
GNUNET_break (0);
diff --git a/src/lib/exchange_api_common.c b/src/lib/exchange_api_common.c
index 2748b8fc..661c68c6 100644
--- a/src/lib/exchange_api_common.c
+++ b/src/lib/exchange_api_common.c
@@ -91,7 +91,7 @@ TALER_EXCHANGE_parse_reserve_history (
rhistory[off].amount = amount;
if (0 == strcasecmp (type,
- "DEPOSIT"))
+ "CREDIT"))
{
const char *wire_url;
void *wire_reference;
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-exchange] branch master updated: match updated specification, use CREDIT instead of DEPOSIT for transfers into a reserve,
gnunet <=