File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -2507,6 +2507,19 @@ class _ReconnectingRelaySession extends RelaySessionNotifier {
25072507 void Function (String message)? onClosed,
25082508 }) async => () {};
25092509
2510+ // The directory now uses the status-aware SDK seam. Do not fall through
2511+ // to a real session (and its EOSE fallback) in this connection-state fake.
2512+ @override
2513+ Future <void Function ()> subscribeWithStatus (
2514+ NostrFilter filter,
2515+ void Function (NostrEvent ) onEvent, {
2516+ void Function (String message)? onClosed,
2517+ void Function (RelaySubscriptionStatus status)? onStatusChanged,
2518+ }) async {
2519+ onStatusChanged? .call (RelaySubscriptionStatus .ready);
2520+ return () {};
2521+ }
2522+
25102523 void connect () {
25112524 state = const SessionState (status: SessionStatus .connected);
25122525 }
Original file line number Diff line number Diff line change @@ -14,11 +14,12 @@ import 'package:flutter/rendering.dart';
1414import 'package:flutter/services.dart' ;
1515import 'package:flutter_test/flutter_test.dart' ;
1616import 'package:lucide_icons_flutter/lucide_icons.dart' ;
17+ import 'package:nostr/nostr.dart' as nostr;
1718
1819import '../../helpers/widget_helpers.dart' ;
1920
2021const _agent =
21- 'aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa ' ;
22+ '79be667ef9dcbbac55a06295ce870b07029bfcdb2dce28d959f2815b16f81798 ' ;
2223const _owner =
2324 'bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb' ;
2425const _peer =
@@ -69,7 +70,18 @@ void main() {
6970 findsNWidgets (2 ),
7071 );
7172 expect (find.text ('Agent' ), findsOneWidget);
72- cache.put (const UserProfile (pubkey: _agent, displayName: 'Agent' ));
73+ // Revocation is signed relay evidence, not a seed-only cache update.
74+ cache.cacheProfileEvent (
75+ NostrEvent .fromJson (
76+ nostr.Event .from (
77+ kind: 0 ,
78+ content: '{"name":"Agent"}' ,
79+ secretKey:
80+ '0000000000000000000000000000000000000000000000000000000000000001' ,
81+ createdAt: 2 ,
82+ ).toMap (),
83+ ),
84+ );
7385 await tester.pump ();
7486 expect (
7587 find.byIcon (LucideIcons .cloud),
You can’t perform that action at this time.
0 commit comments