mirror of
https://github.com/zapstore/zapstore.git
synced 2026-10-05 12:38:24 +00:00
fix: include relay hint in naddr for app events
All encodeShareableIdentifier calls passed empty relay lists, causing other Nostr clients to fail resolving NIP-82 app events since they don't know to query relay.zapstore.dev. Adds kDefaultRelay constant with invariant comment and uses it for app naddr encoding (app_card, app_detail_screen). Stack naddr calls (user_screen, app_stack_container) keep empty relay lists since stacks live on social relays, not the app catalog relay. Closes #343 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 4.6
parent
80897692a3
commit
1675cb8a24
@@ -39,6 +39,12 @@ bool appStackEventFilter(Map<String, dynamic> event) {
|
||||
return false;
|
||||
}
|
||||
|
||||
/// Authoritative relay for NIP-82 software application events (kind 32267).
|
||||
/// Used as the relay hint in naddr encoding so other clients can resolve app events.
|
||||
/// Invariant: all Zapstore-published app events are available on this relay.
|
||||
/// Stack events (social relays) should NOT use this hint.
|
||||
const kDefaultRelay = 'wss://relay.zapstore.dev';
|
||||
|
||||
/// Amber signer package ID
|
||||
const kAmberPackageId = 'com.greenart7c3.nostrsigner';
|
||||
|
||||
|
||||
@@ -633,7 +633,7 @@ class _AppDetailContent extends HookConsumerWidget {
|
||||
identifier: app.identifier,
|
||||
author: app.pubkey,
|
||||
kind: app.event.kind,
|
||||
relays: [],
|
||||
relays: const [kDefaultRelay],
|
||||
),
|
||||
);
|
||||
return 'https://zapstore.dev/apps/$naddr';
|
||||
|
||||
@@ -66,7 +66,7 @@ class AppCard extends HookConsumerWidget {
|
||||
identifier: app!.identifier,
|
||||
author: app!.pubkey,
|
||||
kind: app!.event.kind,
|
||||
relays: const [],
|
||||
relays: const [kDefaultRelay],
|
||||
),
|
||||
);
|
||||
context.push('/$first/app/$naddr');
|
||||
|
||||
Reference in New Issue
Block a user