feat(useragent): bootstrap / unseal flow implementattion
This commit is contained in:
23
useragent/lib/providers/evm.dart
Normal file
23
useragent/lib/providers/evm.dart
Normal file
@@ -0,0 +1,23 @@
|
||||
import 'package:arbiter/proto/evm.pb.dart';
|
||||
import 'package:arbiter/proto/user_agent.pb.dart';
|
||||
import 'package:arbiter/providers/connection/connection_manager.dart';
|
||||
import 'package:protobuf/well_known_types/google/protobuf/empty.pb.dart';
|
||||
import 'package:riverpod_annotation/riverpod_annotation.dart';
|
||||
|
||||
part 'evm.g.dart';
|
||||
|
||||
@riverpod
|
||||
class Evm extends _$Evm {
|
||||
Future<List<WalletEntry>?> build() async {
|
||||
final connection = await ref.watch(connectionManagerProvider.future);
|
||||
if (connection == null) {
|
||||
return null;
|
||||
}
|
||||
|
||||
await connection.send(UserAgentRequest(
|
||||
evmWalletList: Empty()
|
||||
));
|
||||
|
||||
final response = await connection.receive();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user