From 5fa977cc05daca469044711ffb6a497287094c70 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 5 Mar 2022 15:13:07 +0100 Subject: work on global fee structure --- src/util/util.c | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/util/util.c') diff --git a/src/util/util.c b/src/util/util.c index 33b0a77cc..2d10fd69d 100644 --- a/src/util/util.c +++ b/src/util/util.c @@ -84,6 +84,10 @@ TALER_global_fee_set_hton (struct TALER_GlobalFeeSetNBOP *nbo, &fees->history); TALER_amount_hton (&nbo->kyc, &fees->kyc); + TALER_amount_hton (&nbo->account, + &fees->account); + TALER_amount_hton (&nbo->purse, + &fees->purse); } @@ -95,6 +99,10 @@ TALER_global_fee_set_ntoh (struct TALER_GlobalFeeSet *fees, &nbo->history); TALER_amount_ntoh (&fees->kyc, &nbo->kyc); + TALER_amount_ntoh (&fees->account, + &nbo->account); + TALER_amount_ntoh (&fees->purse, + &nbo->purse); } @@ -138,6 +146,14 @@ TALER_global_fee_set_cmp (const struct TALER_GlobalFeeSet *f1, &f2->kyc); if (0 != ret) return ret; + ret = TALER_amount_cmp (&f1->account, + &f2->account); + if (0 != ret) + return ret; + ret = TALER_amount_cmp (&f1->purse, + &f2->purse); + if (0 != ret) + return ret; return 0; } -- cgit v1.2.3