mirror of
https://gitlab.com/soapbox-pub/shakespeare.git
synced 2026-12-05 08:23:34 +00:00
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.
This commit is contained in:
1 parent
70fa01a640
commit
67aea6a3b2
1 file changed
+1
-1
@@ -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;
|
||||
|
||||
Reference in new issue
Block a user