gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] 260/277: fix #6236


From: gnunet
Subject: [taler-merchant] 260/277: fix #6236
Date: Sun, 05 Jul 2020 20:52:53 +0200

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

grothoff pushed a commit to branch master
in repository merchant.

commit 4b820e27ad2fdfda79e256c0b0624ad01150c5b3
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sat Jun 27 18:31:02 2020 +0200

    fix #6236
---
 src/testing/testing_api_cmd_post_transfers.c | 27 ++++++++++++++++++---------
 1 file changed, 18 insertions(+), 9 deletions(-)

diff --git a/src/testing/testing_api_cmd_post_transfers.c 
b/src/testing/testing_api_cmd_post_transfers.c
index f5087c2..ad16a86 100644
--- a/src/testing/testing_api_cmd_post_transfers.c
+++ b/src/testing/testing_api_cmd_post_transfers.c
@@ -184,6 +184,7 @@ transfers_cb (void *cls,
           const struct TALER_TESTING_Command *cmd;
           const json_t *contract_terms;
           const struct TALER_Amount *deposit_value;
+          const struct TALER_Amount *deposit_fee;
           const char *order_id;
 
           cmd = TALER_TESTING_interpreter_lookup_command (pts->is,
@@ -200,8 +201,12 @@ transfers_cb (void *cls,
                                                         &contract_terms)) ||
                (GNUNET_OK !=
                 TALER_TESTING_get_trait_amount_obj (cmd,
-                                                    0,
-                                                    &deposit_value)) )
+                                                    
TALER_TESTING_CMD_DEPOSIT_TRAIT_IDX_DEPOSIT_VALUE,
+                                                    &deposit_value)) ||
+               (GNUNET_OK !=
+                TALER_TESTING_get_trait_amount_obj (cmd,
+                                                    
TALER_TESTING_CMD_DEPOSIT_TRAIT_IDX_DEPOSIT_FEE,
+                                                    &deposit_fee)) )
           {
             GNUNET_break (0);
             TALER_TESTING_interpreter_fail (pts->is);
@@ -227,7 +232,15 @@ transfers_cb (void *cls,
             TALER_TESTING_interpreter_fail (pts->is);
             return;
           }
-          // FIXME #6236: also would want to add deposit_fees, but unavailable 
as traits right now!
+          if (0 >
+              TALER_amount_add (&fees,
+                                &fees,
+                                deposit_fee))
+          {
+            GNUNET_break (0);
+            TALER_TESTING_interpreter_fail (pts->is);
+            return;
+          }
         }
         if (0 !=
             TALER_amount_cmp (&sum,
@@ -237,10 +250,9 @@ transfers_cb (void *cls,
           TALER_TESTING_interpreter_fail (pts->is);
           return;
         }
-#if FIXME6236
         if (0 !=
             TALER_amount_cmp (&fees,
-                              tdd->deposit_fee))
+                              &tdd->deposit_fee))
         {
           GNUNET_break (0);
           TALER_TESTING_interpreter_fail (pts->is);
@@ -254,18 +266,15 @@ transfers_cb (void *cls,
                        TALER_amount_subtract (&total,
                                               &total,
                                               &tdd->deposit_fee));
-#endif
       }
-#if FIXME6236
       if (0 !=
           TALER_amount_cmp (&total,
-                            pts->credit_amount))
+                            &pts->credit_amount))
       {
         GNUNET_break (0);
         TALER_TESTING_interpreter_fail (pts->is);
         return;
       }
-#endif
       break;
     }
   default:

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

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