Skip to content

Commit

Permalink
Fix review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
Siegrift committed May 13, 2024
1 parent bdc59dd commit bfe0894
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/data-fetcher-loop/signed-data-state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,8 @@ export const saveSignedData = async (signedDataBatch: SignedDataRecordEntry[]) =
if (signedDataBatch.length === 0) return;

const verifier = await getVerifier();
// We are skipping the whole batch even if there is only one invalid signed data. This is consistent with the Signed
// API approach.
const verificationResult = await verifier.verifySignedData(signedDataBatch);
if (verificationResult !== true) {
logger.error('Failed to verify signed data.', verificationResult);
Expand Down
2 changes: 1 addition & 1 deletion src/update-feeds-loops/update-feeds-loops.ts
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ export const runUpdateFeeds = async (providerName: string, chain: Chain, chainId
// Overwrite the state with the new signed API URLs instead of merging them to avoid keeping stale URLs.
updateState((draft) => {
set(draft, ['signedApiUrls', chainId, providerName], signedApiUrls);
set(draft, ['beaconIds', chainId, providerName], beaconIds);
set(draft, ['activeDataFeedBeaconIds', chainId, providerName], beaconIds);
});
});

Expand Down

0 comments on commit bfe0894

Please sign in to comment.