Skip to content

Commit

Permalink
Fetch identity shared state when needed (#44)
Browse files Browse the repository at this point in the history
  • Loading branch information
emdobrin authored Apr 8, 2021
1 parent f360043 commit af5d16a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -75,8 +75,6 @@ boolean bootupIfReady(final SharedStateCallback callback) {

// Reuse the ECID from Identity Direct (if registered) or generate new ECID on first launch
if (identityProperties.getECID() == null) {
final Map<String, Object> identityDirectSharedState = callback.getSharedState(
IdentityConstants.SharedState.IdentityDirect.NAME, null);

// Attempt to get ECID from direct Identity persistence to migrate an existing ECID
final ECID directIdentityEcid = IdentityStorageService.loadEcidFromDirectIdentityPersistence();
Expand All @@ -89,6 +87,8 @@ boolean bootupIfReady(final SharedStateCallback callback) {

// If direct Identity has no persisted ECID, check if direct Identity is registered with the SDK
else if (isIdentityDirectRegistered(callback)) {
final Map<String, Object> identityDirectSharedState = callback.getSharedState(
IdentityConstants.SharedState.IdentityDirect.NAME, null);

// If the direct Identity extension is registered, attempt to get its shared state
if (identityDirectSharedState != null) { // identity direct shared state is set
Expand Down

0 comments on commit af5d16a

Please sign in to comment.