Skip to content

Commit

Permalink
feat: sync fix by looking at timestamps instead of hashes
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelTaylor3D committed Oct 29, 2023
1 parent f64f650 commit 71e1272
Showing 1 changed file with 7 additions and 5 deletions.
12 changes: 7 additions & 5 deletions src/tasks/sync-audit-table.js
Original file line number Diff line number Diff line change
Expand Up @@ -221,11 +221,13 @@ const syncOrganizationAudit = async (organization) => {
raw: true,
});

// There was an oversight in the audit model where we named it onChainConfirmationTimeStamp but
// the RPC result calls in timestamp. This is a temporary fix to ensure that we can still sync
lastRootSaved.timestamp = Number(
lastRootSaved.onchainConfirmationTimeStamp,
);
if (lastRootSaved) {
// There was an oversight in the audit model where we named it onChainConfirmationTimeStamp but
// the RPC result calls in timestamp. This is a temporary fix to ensure that we can still sync
lastRootSaved.timestamp = Number(
lastRootSaved?.onchainConfirmationTimeStamp || 0,
);
}
}

let generation = _.get(rootHistory, '[0]');
Expand Down

0 comments on commit 71e1272

Please sign in to comment.