construct deposit URL correctly

This commit is contained in:
Florian Dold 2021-08-07 17:39:50 +02:00
parent 93e9c3b6cf
commit e9da70b5b8
No known key found for this signature in database
GPG Key ID: D2E4F00F29D02A4B
2 changed files with 2 additions and 2 deletions

View File

@ -294,7 +294,7 @@ export async function trackDepositGroup(
for (const dp of depositPermissions) { for (const dp of depositPermissions) {
const url = new URL( const url = new URL(
`/deposits/${wireHash}/${depositGroup.merchantPub}/${depositGroup.contractTermsHash}/${dp.coin_pub}`, `deposits/${wireHash}/${depositGroup.merchantPub}/${depositGroup.contractTermsHash}/${dp.coin_pub}`,
dp.exchange_url, dp.exchange_url,
); );
const sig = await ws.cryptoApi.signTrackTransaction({ const sig = await ws.cryptoApi.signTrackTransaction({

View File

@ -244,7 +244,7 @@ async function checkPayment(
merchantBackend: MerchantBackendInfo, merchantBackend: MerchantBackendInfo,
orderId: string, orderId: string,
): Promise<CheckPaymentResponse> { ): Promise<CheckPaymentResponse> {
const reqUrl = new URL(`/private/orders/${orderId}`, merchantBackend.baseUrl); const reqUrl = new URL(`private/orders/${orderId}`, merchantBackend.baseUrl);
reqUrl.searchParams.set("order_id", orderId); reqUrl.searchParams.set("order_id", orderId);
const resp = await http.get(reqUrl.href, { const resp = await http.get(reqUrl.href, {
headers: getMerchantAuthHeader(merchantBackend), headers: getMerchantAuthHeader(merchantBackend),