From b9f2f5698f6c2b7be901b5c8623fb8a54b2d09df Mon Sep 17 00:00:00 2001 From: Sabine Schaller Date: Thu, 26 Oct 2023 11:26:28 +0200 Subject: [PATCH] fix: wallet address on the fly creation --- .../mock-account-servicing-entity/app/lib/webhooks.server.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/localenv/mock-account-servicing-entity/app/lib/webhooks.server.ts b/localenv/mock-account-servicing-entity/app/lib/webhooks.server.ts index 7f2a3d215f..2d436d90bc 100644 --- a/localenv/mock-account-servicing-entity/app/lib/webhooks.server.ts +++ b/localenv/mock-account-servicing-entity/app/lib/webhooks.server.ts @@ -9,7 +9,6 @@ import { addPeerLiquidity, createWalletAddress } from './requesters' -import { CONFIG } from '~/lib/parse_config.server' export enum EventType { IncomingPaymentCreated = 'incoming_payment.created', @@ -178,7 +177,7 @@ export async function handleWalletAddressNotFound(wh: WebHook) { throw new Error('No walletAddressUrl found') } - const accountPath = walletAddressUrl.split(`https://${CONFIG.publicHost}/`)[1] + const accountPath = new URL(walletAddressUrl).pathname.substring(1) const account = await mockAccounts.getByPath(accountPath)