-
Notifications
You must be signed in to change notification settings - Fork 38
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
Persistence - Wallet Addresses Storage #41
base: add_arrr
Are you sure you want to change the base?
Conversation
lib/packages/account_addresses/api/account_addresses_api_interface.dart
Outdated
Show resolved
Hide resolved
If we need to do implementation-specific initialisation, we should limit it to our specific implementation. We want the concern of Hive to be separated from the rest of the app. This makes it cleaner in the future if we want to change to a different storage medium. See the optional parameter in |
lib/packages/account_addresses/repository/account_addresses_repository.dart
Outdated
Show resolved
Hide resolved
lib/packages/account_addresses/repository/account_addresses_repository.dart
Outdated
Show resolved
Hide resolved
lib/packages/account_addresses/repository/account_addresses_repository.dart
Outdated
Show resolved
Hide resolved
lib/packages/account_addresses/api/account_addresses_api_hive.dart
Outdated
Show resolved
Hide resolved
Save wallet changes in DB class methods instead of polling for changes.
Emit a full list of wallet addresses whenever a change happens. This will be useful in blocs where we want to show a list of all the data.
The AccountAddressesApiHive class stores/retrieves a list of the user’s coin addresses. This will be used to populate the trading view (and possibly the home screen), where the user selects the trading pair.
Usage:
Currently
Hive.registerAdapter(WalletAddressAdapter());
line is inside theinitialize
function. You might want to take it outside.