Skip to content

Commit

Permalink
use signer provider
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-lox committed Oct 18, 2024
1 parent 580b19a commit d6481b6
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
7 changes: 4 additions & 3 deletions lib/data_layer/repositories/follow_repository_impl.dart
Original file line number Diff line number Diff line change
Expand Up @@ -68,9 +68,10 @@ class FollowRepositoryImpl implements FollowRepository {
}

@override
Future<void> followUser(String npub) {
dartNdkSource.dartNdk.follows.broadcastAddContact(npub, [], eventSigner);
throw UnimplementedError();
Future<void> followUser(String npub) async {
final newContactList =
await dartNdkSource.dartNdk.follows.broadcastAddContact(npub);
print(newContactList.contacts);
}

@override
Expand Down
4 changes: 3 additions & 1 deletion lib/presentation_layer/providers/ndk_provider.dart
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
import 'package:ndk/ndk.dart';
import 'package:riverpod/riverpod.dart';

import 'event_signer_provider.dart';

final ndkProvider = Provider<Ndk>((ref) {
final EventSigner eventSigner = Bip340EventSigner("privateKey", "publicKey");
final eventSigner = ref.watch(eventSignerProvider);
final EventVerifier eventVerifier = RustEventVerifier();

final CacheManager cache = MemCacheManager();
Expand Down

0 comments on commit d6481b6

Please sign in to comment.