From 126a747f82e7894445775eead9ef2191e99f09c1 Mon Sep 17 00:00:00 2001 From: Sree Harsha Totakura Date: Mon, 25 May 2015 22:47:00 +0200 Subject: mintdb postgres: add deposit fee to the denominations --- src/mintdb/plugin_mintdb_postgres.c | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) (limited to 'src/mintdb/plugin_mintdb_postgres.c') diff --git a/src/mintdb/plugin_mintdb_postgres.c b/src/mintdb/plugin_mintdb_postgres.c index 35861c9c..35aab98b 100644 --- a/src/mintdb/plugin_mintdb_postgres.c +++ b/src/mintdb/plugin_mintdb_postgres.c @@ -196,6 +196,9 @@ postgres_create_tables (void *cls, ",fee_withdraw_val INT8 NOT NULL" ",fee_withdraw_frac INT4 NOT NULL" ",fee_withdraw_curr VARCHAR("TALER_CURRENCY_LEN_STR") NOT NULL" + ",fee_deposit_val INT8 NOT NULL" + ",fee_deposit_frac INT4 NOT NULL" + ",fee_deposit_curr VARCHAR("TALER_CURRENCY_LEN_STR") NOT NULL" ",fee_refresh_val INT8 NOT NULL" ",fee_refresh_frac INT4 NOT NULL" ",fee_refresh_curr VARCHAR("TALER_CURRENCY_LEN_STR") NOT NULL" @@ -393,13 +396,16 @@ postgres_prepare (PGconn *db_conn) ",coin_curr" /* assuming same currency for fees */ ",fee_withdraw_val" ",fee_withdraw_frac" - ",fee_withdraw_curr" /* must match coin_currency */ + ",fee_withdraw_curr" /* must match coin_curr */ + ",fee_deposit_val" + ",fee_deposit_frac" + ",fee_deposit_curr" /* must match coin_curr */ ",fee_refresh_val" ",fee_refresh_frac" - ",fee_refresh_curr" /* must match coin_currency */ + ",fee_refresh_curr" /* must match coin_curr */ ") VALUES " "($1, $2, $3, $4, $5, $6," - "$7, $8, $9, $10, $11, $12, $13, $14);", + "$7, $8, $9, $10, $11, $12, $13, $14, $15, $16, $17);", 14, NULL); PREPARE ("get_reserve", "SELECT " @@ -845,6 +851,7 @@ postgres_insert_denomination (void *cls, TALER_PQ_query_param_auto_from_type (&issue->expire_legal.abs_value_us__), TALER_PQ_query_param_amount_nbo (&issue->value), TALER_PQ_query_param_amount_nbo (&issue->fee_withdraw), + TALER_PQ_query_param_amount_nbo (&issue->fee_deposit), TALER_PQ_query_param_amount_nbo (&issue->fee_refresh), TALER_PQ_query_param_end }; -- cgit v1.2.3