Skip to content

Commit

Permalink
wire up unfollow usecase
Browse files Browse the repository at this point in the history
  • Loading branch information
leo-lox committed Oct 18, 2024
1 parent d6481b6 commit 519f21a
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 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 @@ -75,8 +75,9 @@ class FollowRepositoryImpl implements FollowRepository {
}

@override
Future<void> unfollowUser(String npub) {
// TODO: implement unfollowUser
throw UnimplementedError();
Future<void> unfollowUser(String npub) async {
final newContactList =
await dartNdkSource.dartNdk.follows.broadcastRemoveContact(npub);
print(newContactList?.contacts);
}
}
2 changes: 1 addition & 1 deletion lib/domain_layer/usecases/follow.dart
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ class Follow {
}

Future<void> unfollowUser(String npub) async {
throw UnimplementedError();
return followRepository.unfollowUser(npub);
}

Future<void> setContacts(List<String> contacts) async {
Expand Down
4 changes: 2 additions & 2 deletions lib/presentation_layer/providers/event_signer_provider.dart
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@ import 'package:riverpod/riverpod.dart';
final eventSignerProvider = StateProvider<EventSigner>((ref) {
final keypair = ref.watch(keyPairProvider);
final EventSigner signer = Bip340EventSigner(
keypair.keyPair!.publicKey,
keypair.keyPair!.privateKey,
privateKey: keypair.keyPair!.privateKey,
publicKey: keypair.keyPair!.publicKey,
);

return signer;
Expand Down

0 comments on commit 519f21a

Please sign in to comment.