aboutsummaryrefslogtreecommitdiff
path: root/src/util/util.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/util/util.c')
-rw-r--r--src/util/util.c48
1 files changed, 48 insertions, 0 deletions
diff --git a/src/util/util.c b/src/util/util.c
index 5b7181a13..6dfd65574 100644
--- a/src/util/util.c
+++ b/src/util/util.c
@@ -76,6 +76,54 @@ TALER_denom_fee_set_ntoh (struct TALER_DenomFeeSet *fees,
}
+void
+TALER_global_fee_set_hton (struct TALER_GlobalFeeSetNBOP *nbo,
+ const struct TALER_GlobalFeeSet *fees)
+{
+ TALER_amount_hton (&nbo->history,
+ &fees->history);
+ TALER_amount_hton (&nbo->kyc,
+ &fees->kyc);
+}
+
+
+void
+TALER_global_fee_set_ntoh (struct TALER_GlobalFeeSet *fees,
+ const struct TALER_GlobalFeeSetNBOP *nbo)
+{
+ TALER_amount_ntoh (&fees->history,
+ &nbo->history);
+ TALER_amount_ntoh (&fees->kyc,
+ &nbo->kyc);
+}
+
+
+void
+TALER_wire_fee_set_hton (struct TALER_WireFeeSetNBOP *nbo,
+ const struct TALER_WireFeeSet *fees)
+{
+ TALER_amount_hton (&nbo->wire,
+ &fees->wire);
+ TALER_amount_hton (&nbo->closing,
+ &fees->closing);
+ TALER_amount_hton (&nbo->wad,
+ &fees->wad);
+}
+
+
+void
+TALER_wire_fee_set_ntoh (struct TALER_WireFeeSet *fees,
+ const struct TALER_WireFeeSetNBOP *nbo)
+{
+ TALER_amount_ntoh (&fees->wire,
+ &nbo->wire);
+ TALER_amount_ntoh (&fees->closing,
+ &nbo->closing);
+ TALER_amount_ntoh (&fees->wad,
+ &nbo->wad);
+}
+
+
enum GNUNET_GenericReturnValue
TALER_denom_fee_check_currency (
const char *currency,