From 29df8cf220ac5e9d2a5e701cf4021cda39675d0a Mon Sep 17 00:00:00 2001 From: swrup Date: Sat, 7 Feb 2026 01:01:05 +0100 Subject: [PATCH] + change GlobalFees --- src/http_keys.ml | 3 --- src/http_management.ml | 7 ------- src/signatures.ml | 13 +++++-------- test/offline_management.sh | 2 +- tools/offline_impl.ml | 5 ----- 5 files changed, 6 insertions(+), 24 deletions(-) diff --git a/src/http_keys.ml b/src/http_keys.ml index eaea4776..dd0c36c5 100644 --- a/src/http_keys.ml +++ b/src/http_keys.ml @@ -190,10 +190,7 @@ let mk_keys ~db_conn (module Sm : Secmod.S) ~last_issue_date = let recoup = (* TODO /recoup *) [] in let* global_fees = - (* WIP DEBUG Pg.get_global_fees db_conn ~start_date:Timestamp.zero |> unwrap_err_caqti - *) - Ok [] in let* auditors = (* TODO /auditors/$AUDITOR_PUB/$H_DENOM_PUB *) diff --git a/src/http_management.ml b/src/http_management.ml index 4b0aa352..29b08016 100644 --- a/src/http_management.ml +++ b/src/http_management.ml @@ -450,21 +450,14 @@ module Global_fees = struct purse_timeout; master_sig; } = - (* TODO KYC - what is kyc_timeout, kyc_fee ? *) - let kyc_timeout = Time.Relative.forever in - let kyc_fee = Amount.dummy_value in - (* * *) let open Signatures.GlobalFees in verify_f ~f:Sm.verify_with_master_key master_sig { start_date; end_date; purse_timeout; - kyc_timeout; history_expiration; history_fee; - kyc_fee; account_fee; purse_fee; purse_account_limit; diff --git a/src/signatures.ml b/src/signatures.ml index 06f44cee..14296846 100644 --- a/src/signatures.ml +++ b/src/signatures.ml @@ -1,3 +1,6 @@ +(* TODO debug sig + check with taler-wallet-core/src/crypto/cryptoImplementation.js + check unsigned-ints *) open Hash module Taler_signatures = Include.Taler_signatures @@ -420,15 +423,15 @@ end module GlobalFees = struct module R = struct + (* TODO debug sig + taler doc *) (* purpose.purpose = TALER_SIGNATURE_MASTER_GLOBAL_FEES *) type r = { start_date: TimestampNBO.t; end_date: TimestampNBO.t; purse_timeout: TimeRelativeNBO.t; - kyc_timeout: TimeRelativeNBO.t; history_expiration: TimeRelativeNBO.t; history_fee: AmountNBO.t; - kyc_fee: AmountNBO.t; account_fee: AmountNBO.t; purse_fee: AmountNBO.t; purse_account_limit: int32; @@ -443,10 +446,8 @@ module GlobalFees = struct start_date end_date purse_timeout - kyc_timeout history_expiration history_fee - kyc_fee account_fee purse_fee purse_account_limit @@ -455,10 +456,8 @@ module GlobalFees = struct start_date; end_date; purse_timeout; - kyc_timeout; history_expiration; history_fee; - kyc_fee; account_fee; purse_fee; purse_account_limit; @@ -467,10 +466,8 @@ module GlobalFees = struct |+ field TimestampNBO.bin (fun t -> t.start_date) |+ field TimestampNBO.bin (fun t -> t.end_date) |+ field TimeRelativeNBO.bin (fun t -> t.purse_timeout) - |+ field TimeRelativeNBO.bin (fun t -> t.kyc_timeout) |+ field TimeRelativeNBO.bin (fun t -> t.history_expiration) |+ field AmountNBO.bin (fun t -> t.history_fee) - |+ field AmountNBO.bin (fun t -> t.kyc_fee) |+ field AmountNBO.bin (fun t -> t.account_fee) |+ field AmountNBO.bin (fun t -> t.purse_fee) |+ field beint32 (fun t -> t.purse_account_limit) diff --git a/test/offline_management.sh b/test/offline_management.sh index a4999491..83d46357 100755 --- a/test/offline_management.sh +++ b/test/offline_management.sh @@ -22,7 +22,7 @@ dune exec offline -- upload --input $b --url "/management/auditors" dune exec offline -- wire-fee \ --output $b \ ---wire_method "magic" \ +--wire_method "xxx" \ --fee_start 0 \ --fee_end 99999999 \ --closing_fee $zero_euro \ diff --git a/tools/offline_impl.ml b/tools/offline_impl.ml index 3438ec66..f436fe9c 100644 --- a/tools/offline_impl.ml +++ b/tools/offline_impl.ml @@ -101,18 +101,13 @@ let global_fees ~output ~master_key ~start_date ~end_date ~history_fee in let master_sig = let open Signatures.GlobalFees in - (* TODO KYC *) - let kyc_timeout = Time.Relative.forever in - let kyc_fee = Amount.dummy_value in sign_f ~f:(EddsaSignature.sign ~key) { start_date; end_date; purse_timeout; - kyc_timeout; history_expiration; history_fee; - kyc_fee; account_fee; purse_fee; purse_account_limit;