aboutsummaryrefslogtreecommitdiff
path: root/src/bank-lib/bank_api_transfer.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-01-16 21:57:40 +0100
committerChristian Grothoff <christian@grothoff.org>2020-01-16 21:57:40 +0100
commita9ae2171b897dfc9635e9ab72a04d65379bf2208 (patch)
tree11d67216d1c5594a4048d333b56ac40b4cf0acd1 /src/bank-lib/bank_api_transfer.c
parentdd6bad739a7b7539952af6bebb74bfe3ffa0f9d7 (diff)
reuse TALER_url_join
Diffstat (limited to 'src/bank-lib/bank_api_transfer.c')
-rw-r--r--src/bank-lib/bank_api_transfer.c17
1 files changed, 12 insertions, 5 deletions
diff --git a/src/bank-lib/bank_api_transfer.c b/src/bank-lib/bank_api_transfer.c
index 96ed0071f..a23e515ff 100644
--- a/src/bank-lib/bank_api_transfer.c
+++ b/src/bank-lib/bank_api_transfer.c
@@ -288,6 +288,18 @@ TALER_BANK_execute_wire_transfer (struct GNUNET_CURL_Context *ctx,
}
TALER_amount_ntoh (&amount,
&wp->amount);
+ weh = GNUNET_new (struct TALER_BANK_WireExecuteHandle);
+ weh->cb = cc;
+ weh->cb_cls = cc_cls;
+ weh->request_url = TALER_url_join (bank_base_url,
+ "transfer",
+ NULL);
+ if (NULL == weh->request_url)
+ {
+ GNUNET_free (weh);
+ GNUNET_break (0);
+ return NULL;
+ }
transfer_obj = json_pack ("{s:o, s:o, s:s, s:o, s:s}",
"request_uid", GNUNET_JSON_from_data_auto (
&wp->request_uid),
@@ -300,11 +312,6 @@ TALER_BANK_execute_wire_transfer (struct GNUNET_CURL_Context *ctx,
GNUNET_break (0);
return NULL;
}
- weh = GNUNET_new (struct TALER_BANK_WireExecuteHandle);
- weh->cb = cc;
- weh->cb_cls = cc_cls;
- weh->request_url = TALER_BANK_path_to_url_ (bank_base_url,
- "/transfer");
weh->post_ctx.headers = curl_slist_append
(weh->post_ctx.headers,
"Content-Type: application/json");