Skip to content

Commit

Permalink
fix: organization creation flow
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D committed Mar 8, 2022
1 parent 9920b1d commit 6ff186f
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/datalayer/syncService.js
Original file line number Diff line number Diff line change
Expand Up @@ -242,12 +242,14 @@ const getRootDiff = (storeId, root1, root2) => {
};

const getStoreData = async (storeId, callback, onFail, retry = 0) => {
if (retry >= 10) {
console.log(retry);
if (retry <= 10) {
log('Waiting for New Organization to be confirmed');
const encodedData = await dataLayer.getStoreData(storeId);
console.log(encodedData);
if (_.isEmpty(encodedData?.keys_values)) {
await new Promise((resolve) => setTimeout(() => resolve(), 60000));
return getStoreData(storeId, callback, retry + 1);
return getStoreData(storeId, callback, onFail, retry + 1);
} else {
callback(encodedData.keys_values);
}
Expand Down

0 comments on commit 6ff186f

Please sign in to comment.