removeAccount method

  1. @override
Future<void> removeAccount(
  1. Uint8List recoveryPrivateKey,
  2. String identifierToRemove
)
override

Remove an account from the inbox

Implementation

@override
Future<void> removeAccount(Uint8List recoveryPrivateKey, String identifierToRemove) async {
  try {
    final params = <String, dynamic>{
      'recoveryPrivateKey': recoveryPrivateKey.toList(),
      'identifierToRemove': identifierToRemove,
    }.jsify() as JSObject;

    await _promiseToFuture(
      _clientManager.removeAccount(params),
    );
  } catch (e) {
    throw Exception('Failed to remove account: $e');
  }
}