You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently there is an edge-case code path that results in addProject resolving before all pre-sync data syncing in both directions. I don't think this codepath is being hit very frequently in actual use, because the getProjectSettings() call at the top of the function will normally return EMPTY_PROJECT_SETTINGS on this first call. The impact is not major either, because it is unlikely that data has not synced in the other direction.
The #waitForInitialSync() method is only called from addProject(), therefore the local data will be minimal: a deviceInfo record, and a coreOwnership record. It is important as part of joining a project that these records sync to other project participants, so the "correct" thing to do is wait for them to sync.
I don't think the current code has any impact on anything, and it is unlikely to have any actual use impacts, however fixing this allows us to discount one variable when investigating bugs.
The text was updated successfully, but these errors were encountered:
Description
Currently there is an edge-case code path that results in
addProject
resolving before all pre-sync data syncing in both directions. I don't think this codepath is being hit very frequently in actual use, because thegetProjectSettings()
call at the top of the function will normally return EMPTY_PROJECT_SETTINGS on this first call. The impact is not major either, because it is unlikely that data has not synced in the other direction.The
#waitForInitialSync()
method is only called fromaddProject()
, therefore the local data will be minimal: adeviceInfo
record, and acoreOwnership
record. It is important as part of joining a project that these records sync to other project participants, so the "correct" thing to do is wait for them to sync.The change should be on lines https://github.com/digidem/comapeo-core/blob/main/src/mapeo-manager.js#L664-L670 to instead check the
syncState['auth' | 'config'].dataToSync
property.I don't think the current code has any impact on anything, and it is unlikely to have any actual use impacts, however fixing this allows us to discount one variable when investigating bugs.
The text was updated successfully, but these errors were encountered: