haveno-app/lib/haveno_service_clients/account_service_client.dart
2024-09-20 18:16:54 +01:00

20 lines
532 B
Dart

import 'package:haveno/proto/compiled/grpc.pbgrpc.dart';
import 'package:haveno/services/haveno_service.dart';
class AccountServiceClient {
final AccountClient _accountClient;
AccountServiceClient(HavenoService service)
: _accountClient = service.accountClient;
Future<bool> accountExists() async {
try {
final response =
await _accountClient.accountExists(AccountExistsRequest());
return response.accountExists;
} catch (e) {
print('Caught error: $e');
rethrow;
}
}
}