aboutsummaryrefslogtreecommitdiff
path: root/src/exchangedb/exchange_do_age_withdraw.sql
diff options
context:
space:
mode:
authorÖzgür Kesim <oec-taler@kesim.org>2023-07-28 12:36:28 +0200
committerÖzgür Kesim <oec-taler@kesim.org>2023-07-28 12:36:28 +0200
commit85020a9204f3fdcc1ab29fa43e18d53c31fb595a (patch)
treee6261b38cd737b3fb7a8563f5c998727369df657 /src/exchangedb/exchange_do_age_withdraw.sql
parent963e84aad2eb6fdd0de17d3176e080b5ae1b415b (diff)
parentd0835367865b5a0ae941abcec2c1c2d067f10b25 (diff)
Merge branch 'master' of ssh://git.taler.net/exchange
Diffstat (limited to 'src/exchangedb/exchange_do_age_withdraw.sql')
-rw-r--r--src/exchangedb/exchange_do_age_withdraw.sql15
1 files changed, 7 insertions, 8 deletions
diff --git a/src/exchangedb/exchange_do_age_withdraw.sql b/src/exchangedb/exchange_do_age_withdraw.sql
index e76d4ba7..ce257a8d 100644
--- a/src/exchangedb/exchange_do_age_withdraw.sql
+++ b/src/exchangedb/exchange_do_age_withdraw.sql
@@ -16,7 +16,7 @@
-- @author Özgür Kesim
CREATE OR REPLACE FUNCTION exchange_do_age_withdraw(
- IN amount_with_fee TALER_AMOUNT,
+ IN amount_with_fee taler_amount,
IN rpub BYTEA,
IN rsig BYTEA,
IN now INT8,
@@ -38,8 +38,8 @@ AS $$
DECLARE
reserve_gc INT8;
difference RECORD;
- balance TALER_AMOUNT;
- new_balance TALER_AMOUNT;
+ balance taler_amount;
+ new_balance taler_amount;
not_before date;
earliest_date date;
BEGIN
@@ -104,9 +104,9 @@ required_age=0;
-- Check reserve balance is sufficient.
SELECT *
-INTO
+INTO
difference
-FROM
+FROM
amount_left_minus_right(
balance
,amount_with_fee);
@@ -114,7 +114,7 @@ FROM
balance_ok = difference.ok;
IF NOT balance_ok
-THEN
+THEN
RETURN;
END IF;
@@ -166,6 +166,5 @@ END IF;
END $$;
-COMMENT ON FUNCTION exchange_do_age_withdraw(TALER_AMOUNT, BYTEA, BYTEA, INT8, INT8, BYTEA, INT2, INT2, BYTEA[], INT8[], BYTEA[])
+COMMENT ON FUNCTION exchange_do_age_withdraw(taler_amount, BYTEA, BYTEA, INT8, INT8, BYTEA, INT2, INT2, BYTEA[], INT8[], BYTEA[])
IS 'Checks whether the reserve has sufficient balance for an age-withdraw operation (or the request is repeated and was previously approved) and that age requirements are met. If so updates the database with the result. Includes storing the blinded planchets and denomination signatures, or signaling conflict';
-