From 67aea6a3b239eeaeaee1da6f38b4f5e3fc2a4e86 Mon Sep 17 00:00:00 2001 From: "shakespeare.diy" Date: Wed, 15 Oct 2025 01:38:10 -0500 Subject: [PATCH] Fix nip19 decode type assertion by converting through unknown Use double type assertion (as unknown as) to properly convert the discriminated union type from nip19.decode(). This resolves all TypeScript type compatibility issues across different versions. --- src/components/git/PullRequestDialog.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/components/git/PullRequestDialog.tsx b/src/components/git/PullRequestDialog.tsx index 86ddb2e9..b83e6894 100644 --- a/src/components/git/PullRequestDialog.tsx +++ b/src/components/git/PullRequestDialog.tsx @@ -217,7 +217,7 @@ export function PullRequestDialog({ // Convert npub to hex if needed if (pubkeyOrNpub.startsWith('npub1')) { try { - const result = nip19.decode(pubkeyOrNpub) as { type: string; data: string }; + const result = nip19.decode(pubkeyOrNpub) as unknown as { type: string; data: string }; // Validate that we got an npub (public key) if (result.type === 'npub') { owner = result.data;