Skip to content

Commit

Permalink
remove commented lines and throwing exception
Browse files Browse the repository at this point in the history
  • Loading branch information
sarthak13gupta committed Jul 13, 2023
1 parent 03d6559 commit 82e5a24
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 43 deletions.
9 changes: 6 additions & 3 deletions lib/bloc/nostr/nostr_bloc.dart
Original file line number Diff line number Diff line change
Expand Up @@ -151,23 +151,26 @@ class NostrBloc with AsyncActionsHandler {
return eventObject;
}

// this method is created for future use
Future<List<String>> _fetchRelays() async {
return ['Relay1', 'Relay2', 'Relay3'];
}

// this method is created for future use
Future<String> _encryptData(String data, String publicKey) async {
// Simulating an encryption operation
return 'EncryptedData';

throw Exception("HandleNip04Encrypt not supported");
}

// this method is created for future use
Future<String> _decryptData(String encryptedData, String privateKey) async {
// Simulating a decryption operation
return 'DecryptedData';
throw Exception("HandleNip04Decrypt not supported");
}

@override
Future dispose() {
// _actionsHandler.dispose();
_publicKeyController.close();
return super.dispose();
}
Expand Down
40 changes: 0 additions & 40 deletions lib/widgets/nostr_sign_event_dialog.dart
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import 'package:breez_translations/breez_translations_locales.dart';
import 'package:flutter/material.dart';

// import 'package:nostr_tools/nostr_tools.dart';
import 'package:shared_preferences/shared_preferences.dart';

class NostrSignEventDialog extends StatefulWidget {
Expand All @@ -23,16 +22,8 @@ class NostrSignEventDialog extends StatefulWidget {
}

class _NostrSignEventDialogState extends State<NostrSignEventDialog> {
// bool _isTextVisible = false;

bool _rememberChoice = false;

// void toggleTextVisibility() {
// setState(() {
// _isTextVisible = !_isTextVisible;
// });
// }

void _handleRememberMe(bool value) async {
SharedPreferences prefs = await SharedPreferences.getInstance();
prefs.setBool('rememberSignEventChoice', value);
Expand All @@ -41,16 +32,6 @@ class _NostrSignEventDialogState extends State<NostrSignEventDialog> {
});
}

// Widget _details() {
// return Column(
// children: widget.eventData.entries.map(
// (entry) {
// return Text('${entry.key}:${entry.value}');
// },
// ).toList(),
// );
// }

@override
Widget build(BuildContext context) {
final themeData = Theme.of(context);
Expand Down Expand Up @@ -137,24 +118,3 @@ class _NostrSignEventDialogState extends State<NostrSignEventDialog> {
];
}
}

// TextButton(
// onPressed: toggleTextVisibility,
// child: Text(
// _isTextVisible == false ? 'View Details' : 'Hide Details',
// ),
// ),
// const SizedBox(
// height: 15,
// ),
// Visibility(
// visible: _isTextVisible,
// child: _details(),
// // child: Text(
// // widget.eventData['id'],
// // style: themeData.dialogTheme.contentTextStyle,
// // ),
// ),
// const SizedBox(
// height: 20,
// ),

0 comments on commit 82e5a24

Please sign in to comment.