haveno-app/lib/haveno_service_clients/account_service_client.dart

21 lines
532 B
Dart
Raw Permalink Normal View History

2024-09-20 17:16:54 +00:00
import 'package:haveno/proto/compiled/grpc.pbgrpc.dart';
import 'package:haveno/services/haveno_service.dart';
2024-07-14 15:34:24 +00:00
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;
}
}
}