deleteMainKeyVaultStore method

  1. @override
Future<Either<WalletKeyException, Unit>> deleteMainKeyVaultStore(
  1. String name
)

Deletes the main key vault store.

name is the filepath of the VaultStore to delete.

Returns nothing if successful. Throws an exception if the VaultStore does not exist.

Implementation

@override
Future<Either<WalletKeyException, Unit>> deleteMainKeyVaultStore(
    String name) async {
  if (await _storage.containsKey(key: name)) {
    await _storage.delete(key: name);
    return Either.unit();
  } else {
    return Either.left(_vaultStoreDoesNotExist(name));
  }
}