summaryrefslogtreecommitdiff
path: root/src/exchangedb/exchange_do_batch_withdraw_insert.sql
diff options
context:
space:
mode:
Diffstat (limited to 'src/exchangedb/exchange_do_batch_withdraw_insert.sql')
-rw-r--r--src/exchangedb/exchange_do_batch_withdraw_insert.sql19
1 files changed, 7 insertions, 12 deletions
diff --git a/src/exchangedb/exchange_do_batch_withdraw_insert.sql b/src/exchangedb/exchange_do_batch_withdraw_insert.sql
index 98db840f9..d36181a6b 100644
--- a/src/exchangedb/exchange_do_batch_withdraw_insert.sql
+++ b/src/exchangedb/exchange_do_batch_withdraw_insert.sql
@@ -14,14 +14,10 @@
-- TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
--
-
-
-
CREATE OR REPLACE FUNCTION exchange_do_batch_withdraw_insert(
IN cs_nonce BYTEA,
- IN amount_val INT8,
- IN amount_frac INT4,
- IN h_denom_pub BYTEA,
+ IN amount taler_amount,
+ IN h_denom_pub BYTEA, -- FIXME: denom_serials should really be a parameter to this FUNCTION.
IN ruuid INT8,
IN reserve_sig BYTEA,
IN h_coin_envelope BYTEA,
@@ -45,6 +41,8 @@ out_denom_unknown=TRUE;
out_conflict=TRUE;
out_nonce_reuse=TRUE;
+-- FIXME: denom_serials should really be a parameter to this FUNCTION.
+
SELECT denominations_serial
INTO denom_serial
FROM exchange.denominations
@@ -66,8 +64,7 @@ INSERT INTO exchange.reserves_out
,reserve_uuid
,reserve_sig
,execution_date
- ,amount_with_fee_val
- ,amount_with_fee_frac)
+ ,amount_with_fee)
VALUES
(h_coin_envelope
,denom_serial
@@ -75,8 +72,7 @@ VALUES
,ruuid
,reserve_sig
,now
- ,amount_val
- ,amount_frac)
+ ,amount)
ON CONFLICT DO NOTHING;
IF NOT FOUND
@@ -120,6 +116,5 @@ END IF;
END $$;
-COMMENT ON FUNCTION exchange_do_batch_withdraw_insert(BYTEA, INT8, INT4, BYTEA, INT8, BYTEA, BYTEA, BYTEA, INT8)
+COMMENT ON FUNCTION exchange_do_batch_withdraw_insert(BYTEA, taler_amount, BYTEA, INT8, BYTEA, BYTEA, BYTEA, INT8)
IS 'Stores information about a planchet for a batch withdraw operation. Checks if the planchet already exists, and in that case indicates a conflict';
-