saveMainKeyVaultStore method
Future<Either<WalletKeyException, Unit> >
saveMainKeyVaultStore(
- VaultStore mainKeyVaultStore,
- String name
Persists the main key vault store to disk.
mainKeyVaultStore
is the VaultStore to persist.
name
is the filepath to persist the VaultStore to.
Returns nothing if successful. If persisting fails due to an underlying cause, returns a WalletKeyException.
Implementation
@override
Future<Either<WalletKeyException, Unit>> saveMainKeyVaultStore(
VaultStore mainKeyVaultStore, String name) async {
await _storage.write(
key: name, value: json.encode(mainKeyVaultStore.toJson()));
return Either.unit();
}