Commit Graph

5 Commits

Author SHA1 Message Date
571d43cef3
[WiP] added TALER_AMOUNT type to Postgres - first in age_withdraw
- Added a type TALER_AMOUNT (val INT8, frac INT4) to Postgres.

- Added PLSQL functions/procedures
	- amount_normalize(a)
	- amount_add(a, b)
	- amount_left_minus_right(l, r, diff, ok bool)

- Added PQ-helper functions
	- TALER_PQ_query_param_amount_tuple()
	- TALER_PQ_result_spec_amount_tuple()

- In table 'age_withdraw', changed fields 'amount_with_fee_val' and '..._frac'
  into single field 'amount_with_fee' be of type TALER_AMOUNT

- Changed functions/stored procedures 'do_age_withdraw' and
  'get_age_withdraw' to use new APIs.

=> make check runs through without errors,
   age-withdraw and -reveal test passes.
2023-07-27 23:57:07 +02:00
1ce9312d02
[age-withdraw] WIP - database transaction during reveal works now
The test for age-restriction still fail, but the database transactions,
including passing arrays in/out the PQ-helpers works.
2023-07-26 04:04:02 +02:00
3e29bdfb8b
[age-withdraw] first tests pass
age-withdraw successfully tested (no reveal yet):

1. reserve filled with amount large enough to trigger kyc
2. kyc oauth2 test daemon sets birthday to 2015-00-00
3. usual withdraw fails with CONFLICT and AGE_RESTRICTION_REQUIRED
4. age-withdraw with loo large of an maximum age fails
5. age-withdraw with appropriate maximum age succeeds
2023-07-24 20:29:38 +02:00
eeece1c96d
-ruuid not needed 2023-06-26 11:46:13 +02:00
ddedf03a81
[age-withdraw] age-withdraw commit- and reveal-handlers implemented, 12/n
The handlers for the commit- and reveal-phases of the age-withdraw
HTTP-endpoints are implemented, yet not active.

Still missing:

- support for age-withdraw is missing in lib/.
- tests
2023-06-26 00:01:31 +02:00