gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-exchange] branch master updated: allow skipping of denom fees che


From: gnunet
Subject: [taler-exchange] branch master updated: allow skipping of denom fees check
Date: Sat, 18 Jan 2020 13:52:22 +0100

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository exchange.

The following commit(s) were added to refs/heads/master by this push:
     new 4993863c allow skipping of denom fees check
4993863c is described below

commit 4993863c4cc7e7758f8532ea90253cc60c3358fa
Author: Florian Dold <address@hidden>
AuthorDate: Sat Jan 18 13:52:10 2020 +0100

    allow skipping of denom fees check
---
 src/bank-lib/bank_api_parse.c |  2 +-
 src/lib/exchange_api_common.c | 73 ++++++++++++++++++++++++-------------------
 2 files changed, 42 insertions(+), 33 deletions(-)

diff --git a/src/bank-lib/bank_api_parse.c b/src/bank-lib/bank_api_parse.c
index 33ba6022..8a50f5af 100644
--- a/src/bank-lib/bank_api_parse.c
+++ b/src/bank-lib/bank_api_parse.c
@@ -149,7 +149,7 @@ TALER_BANK_auth_free (struct TALER_BANK_AuthenticationData 
*auth)
     break;
   }
   GNUNET_free (auth->wire_gateway_url);
-  auth->wire_gateway_rul = NULL;
+  auth->wire_gateway_url = NULL;
 }
 
 
diff --git a/src/lib/exchange_api_common.c b/src/lib/exchange_api_common.c
index 02ff7360..792477af 100644
--- a/src/lib/exchange_api_common.c
+++ b/src/lib/exchange_api_common.c
@@ -136,18 +136,21 @@ TALER_EXCHANGE_verify_coin_history (const struct
         GNUNET_break_op (0);
         return GNUNET_SYSERR;
       }
-      /* check that deposit fee matches our expectations from /keys! */
-      TALER_amount_ntoh (&fee,
-                         &dr.deposit_fee);
-      if ( (GNUNET_YES !=
-            TALER_amount_cmp_currency (&fee,
-                                       &dk->fee_deposit)) ||
-           (0 !=
-            TALER_amount_cmp (&fee,
-                              &dk->fee_deposit)) )
+      if (NULL != dk)
       {
-        GNUNET_break_op (0);
-        return GNUNET_SYSERR;
+        /* check that deposit fee matches our expectations from /keys! */
+        TALER_amount_ntoh (&fee,
+                           &dr.deposit_fee);
+        if ( (GNUNET_YES !=
+              TALER_amount_cmp_currency (&fee,
+                                         &dk->fee_deposit)) ||
+             (0 !=
+              TALER_amount_cmp (&fee,
+                                &dk->fee_deposit)) )
+        {
+          GNUNET_break_op (0);
+          return GNUNET_SYSERR;
+        }
       }
       add = GNUNET_YES;
     }
@@ -188,18 +191,21 @@ TALER_EXCHANGE_verify_coin_history (const struct
         GNUNET_break_op (0);
         return GNUNET_SYSERR;
       }
-      /* check that melt fee matches our expectations from /keys! */
-      TALER_amount_ntoh (&fee,
-                         &rm.melt_fee);
-      if ( (GNUNET_YES !=
-            TALER_amount_cmp_currency (&fee,
-                                       &dk->fee_refresh)) ||
-           (0 !=
-            TALER_amount_cmp (&fee,
-                              &dk->fee_refresh)) )
+      if (NULL != dk)
       {
-        GNUNET_break_op (0);
-        return GNUNET_SYSERR;
+        /* check that melt fee matches our expectations from /keys! */
+        TALER_amount_ntoh (&fee,
+                           &rm.melt_fee);
+        if ( (GNUNET_YES !=
+              TALER_amount_cmp_currency (&fee,
+                                         &dk->fee_refresh)) ||
+             (0 !=
+              TALER_amount_cmp (&fee,
+                                &dk->fee_refresh)) )
+        {
+          GNUNET_break_op (0);
+          return GNUNET_SYSERR;
+        }
       }
       add = GNUNET_YES;
     }
@@ -253,17 +259,20 @@ TALER_EXCHANGE_verify_coin_history (const struct
          well-formendess check). *///
 
       /* check that refund fee matches our expectations from /keys! */
-      TALER_amount_ntoh (&fee,
-                         &rr.refund_fee);
-      if ( (GNUNET_YES !=
-            TALER_amount_cmp_currency (&fee,
-                                       &dk->fee_refund)) ||
-           (0 !=
-            TALER_amount_cmp (&fee,
-                              &dk->fee_refund)) )
+      if (NULL != dk)
       {
-        GNUNET_break_op (0);
-        return GNUNET_SYSERR;
+        TALER_amount_ntoh (&fee,
+                           &rr.refund_fee);
+        if ( (GNUNET_YES !=
+              TALER_amount_cmp_currency (&fee,
+                                         &dk->fee_refund)) ||
+             (0 !=
+              TALER_amount_cmp (&fee,
+                                &dk->fee_refund)) )
+        {
+          GNUNET_break_op (0);
+          return GNUNET_SYSERR;
+        }
       }
       add = GNUNET_NO;
     }

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]