summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_proposal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/taler-merchant-httpd_proposal.c')
-rw-r--r--src/backend/taler-merchant-httpd_proposal.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/src/backend/taler-merchant-httpd_proposal.c b/src/backend/taler-merchant-httpd_proposal.c
index bc7dd0e2..bb9ccbb0 100644
--- a/src/backend/taler-merchant-httpd_proposal.c
+++ b/src/backend/taler-merchant-httpd_proposal.c
@@ -202,11 +202,13 @@ make_merchant_base_url (struct MHD_Connection *connection, const
* of a MHD connection.
*
* @param connection connection to write the result or error to
+ * @param root root of the request
* @param order[in] order to process (can be modified)
* @return MHD result code
*/
static int
proposal_put (struct MHD_Connection *connection,
+ json_t *root,
json_t *order,
const struct MerchantInstance *mi)
{
@@ -316,6 +318,18 @@ proposal_put (struct MHD_Connection *connection,
}
if (NULL == json_object_get (order,
+ "wire_transfer_deadline"))
+ {
+ struct GNUNET_TIME_Absolute t;
+
+ t = GNUNET_TIME_relative_to_absolute (default_wire_transfer_delay);
+ (void) GNUNET_TIME_round_abs (&t);
+ json_object_set_new (order,
+ "wire_transfer_deadline",
+ GNUNET_JSON_from_time_abs (t));
+ }
+
+ if (NULL == json_object_get (order,
"max_wire_fee"))
{
json_object_set_new (order,
@@ -656,7 +670,7 @@ MH_handler_proposal_put (struct TMH_RequestHandler *rh,
"order");
}
else
- res = proposal_put (connection, order, mi);
+ res = proposal_put (connection, root, order, mi);
json_decref (root);
return res;
}