Open naezith opened 1 year ago
@naezith
Currently
Hive.registerAdapter(WalletAddressAdapter());
line is inside theinitialize
function. You might want to take it outside.
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 registerAdapter(...)
, which prevents an exception from being thrown if an adapter registration is repeated. Alternatively, create a boolean variable in the implementation which keeps track of if the API has been initialised. In this case, you'd check in the first line of the init()
method and return if it was already initialised.
status on this @naezith @CharlVS ? plz close if outdated / irrelevant.
status on this @naezith @CharlVS ? plz close if outdated / irrelevant.
We ended up not using this, can close I think.
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.