From aad35d41db118b0d5cb95040a8d95f924a381d2f Mon Sep 17 00:00:00 2001 From: Gigi Date: Fri, 17 Oct 2025 13:06:17 +0200 Subject: [PATCH] fix(debug): return benign object from fire-and-forget publish so timing UI remains stable --- src/App.tsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/App.tsx b/src/App.tsx index 4c60c546..e8a3c64a 100644 --- a/src/App.tsx +++ b/src/App.tsx @@ -353,7 +353,9 @@ function App() { try { (result as { subscribe: (h: { complete?: () => void; error?: (e: unknown) => void }) => unknown }).subscribe({ complete: () => {}, error: () => {} }) } catch {} } // If it's a Promise, simply ignore it (no await) so it resolves in the background. - return undefined as unknown as never + // Return a benign object so callers that probe for a "subscribe" property + // (e.g., applesauce makeRequest) won't throw on `"subscribe" in result`. + return {} as unknown as never } const originalSubscribe = (recreatedSigner as unknown as { subscriptionMethod: (relays: string[], filters: unknown[]) => unknown }).subscriptionMethod.bind(recreatedSigner) ;(recreatedSigner as unknown as { subscriptionMethod: (relays: string[], filters: unknown[]) => unknown }).subscriptionMethod = (relays: string[], filters: unknown[]) => {