From 3417dd872868540d21c3fc8502fd89c7c6f4b476 Mon Sep 17 00:00:00 2001 From: Cursor Agent Date: Sat, 7 Nov 2026 16:48:21 +0000 Subject: [PATCH] fix: return started-sync without awaiting address history sync Awaiting syncAndSubscribeAddresses held the HTTP request open for the full Chronik/DB sync. Fire it in the background, matching the paybutton routes, so the client gets STARTED_SYNC immediately. Co-authored-by: David --- pages/api/address/transactions/[address].ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pages/api/address/transactions/[address].ts b/pages/api/address/transactions/[address].ts index dfdcf1e7..c4b901ae 100644 --- a/pages/api/address/transactions/[address].ts +++ b/pages/api/address/transactions/[address].ts @@ -45,7 +45,7 @@ export default async (req: NextApiRequest, res: NextApiResponse): Promise case NO_ADDRESS_FOUND_404.message: { if (serverOnly) throw new Error(NO_ADDRESS_FOUND_404.message) const addressObject = await upsertAddress(address) - await multiBlockchainClient.syncAndSubscribeAddresses([addressObject]) + void multiBlockchainClient.syncAndSubscribeAddresses([addressObject]) res.status(STARTED_SYNC_200.statusCode).json(STARTED_SYNC_200) break }