Skip to content

Commit

Permalink
Merge pull request #332 from Uniswap/v2-addr
Browse files Browse the repository at this point in the history
fix(fade-rate-v2): use filler endpoints instead of hashes
  • Loading branch information
ConjunctiveNormalForm authored Jun 5, 2024
2 parents f3e564a + f4759d3 commit 52e4173
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
6 changes: 3 additions & 3 deletions lib/cron/fade-rate-v2.ts
Original file line number Diff line number Diff line change
Expand Up @@ -65,10 +65,10 @@ async function main(metrics: MetricsLogger) {
const result = await fadesRepository.getFades();

if (result) {
const fillerHashes = webhookProvider.fillers();
const addressToFillerMap = await fillerAddressRepo.getAddressToFillerMap(fillerHashes);
const fillerEndpoints = webhookProvider.fillerEndpoints();
const addressToFillerMap = await fillerAddressRepo.getAddressToFillerMap(fillerEndpoints);
log.info({ addressToFillerMap }, 'address to filler map from dynamo');
const fillerTimestamps = await timestampDB.getFillerTimestampsMap(fillerHashes);
const fillerTimestamps = await timestampDB.getFillerTimestampsMap(fillerEndpoints);

// get fillers new fades from last checked timestamp:
// | hash | faded | postTimestamp |
Expand Down
4 changes: 4 additions & 0 deletions lib/providers/webhook/s3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ export class S3WebhookConfigurationProvider implements WebhookConfigurationProvi
return [...new Set(this.endpoints.map((endpoint) => endpoint.hash))];
}

fillerEndpoints(): string[] {
return this.endpoints.map((endpoint) => endpoint.endpoint);
}

async addressToFillerHash(): Promise<Map<string, string>> {
const map = new Map<string, string>();
if (this.endpoints.length === 0) {
Expand Down

0 comments on commit 52e4173

Please sign in to comment.