-
Notifications
You must be signed in to change notification settings - Fork 10
feat: clear local storage #237
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
| final _secureCleared = await _secureDataStore.clearAllData(); | ||
| final _plainCleared = await _plainDataStore.clearAllData(); | ||
| _secureCleared.fold(left, right); | ||
| return _plainCleared.fold(left, right); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Secure and plain data clearing should be in separate methods both returning Future<Either<CredentialsStorageFailure, bool>> and both of them separately being called in this clearCredentials function.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also, this should be wrapped in try catch block.
| await storageFile.delete(); | ||
| return right(true); | ||
| } catch (e) { | ||
| return right(false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this needs to be
catch(ex, stack) {
return left(CredentialsStorageFailure(
'Error while clearing data in Biometric storage',
cause: ex,
stack: stack,
))
}
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fixed
wal33d006
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Awesome!
Just a few minor comments!
andrzejchm
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
good work! just few minor comments from my side
packages/transaction_signing_gateway/lib/storage/cosmos_key_info_storage.dart
Outdated
Show resolved
Hide resolved
packages/transaction_signing_gateway/lib/storage/flutter_secure_storage_data_store.dart
Outdated
Show resolved
Hide resolved
…fo_storage.dart Co-authored-by: Andrzej Chmielewski <[email protected]>
…int/flutter into feat/clear-local-storage
|
This is finally ready to be merged @andrzejchm @wal33d006 |
|
love it! |
This creates methods to clear data from
SecureDataStore,KeyInfoStorageandPlainDataStore