Skip to content

Commit

Permalink
Merge branch 'main' into prototype
Browse files Browse the repository at this point in the history
  • Loading branch information
marktoda committed Feb 12, 2024
2 parents a2e085f + 94362ca commit ce42619
Show file tree
Hide file tree
Showing 5 changed files with 55 additions and 2 deletions.
28 changes: 28 additions & 0 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
name: Lint

on:
push:
branches:
- main
pull_request:

jobs:
run-linters:
name: lint
runs-on: ubuntu-latest

steps:
- name: Check out Git repository
uses: actions/checkout@v2

- name: Set up node
uses: actions/setup-node@v3
with:
node-version: 18.x
registry-url: https://registry.npmjs.org

- name: Install dependencies
run: yarn install --frozen-lockfile

- name: Run linters
run: yarn lint
2 changes: 1 addition & 1 deletion lib/handlers/quote/injector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@ import {
BETA_COMPLIANCE_S3_KEY,
BETA_S3_KEY,
COMPLIANCE_CONFIG_BUCKET,
PRODUCTION_S3_KEY,
PROD_COMPLIANCE_S3_KEY,
PRODUCTION_S3_KEY,
WEBHOOK_CONFIG_BUCKET,
} from '../../constants';
import { AWSMetricsLogger, UniswapXParamServiceMetricDimension } from '../../entities/aws-metrics-logger';
Expand Down
2 changes: 1 addition & 1 deletion lib/providers/analytics/firehose.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { FirehoseClient, PutRecordCommand } from '@aws-sdk/client-firehose';
import { default as Logger } from 'bunyan';

import { IAnalyticsLogger } from '.';
import { AnalyticsEvent } from '../../entities/analytics-events';
import { IAnalyticsLogger } from '.';

export class FirehoseLogger implements IAnalyticsLogger {
private log: Logger;
Expand Down
21 changes: 21 additions & 0 deletions test/handlers/quote/handler.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -302,10 +302,16 @@ describe('Quote handler', () => {
hash: '0xuni',
},
]);
<<<<<<< HEAD
const circuitBreakerProvider = new MockCircuitBreakerConfigurationProvider(
['0xuni', 'google'],
FILLER_TIMESTAMPS
);
=======
const circuitBreakerProvider = new MockCircuitBreakerConfigurationProvider([
{ hash: '0xuni', fadeRate: 0.02, enabled: true },
]);
>>>>>>> main
const quoters = [
new WebhookQuoter(
logger,
Expand Down Expand Up @@ -359,10 +365,16 @@ describe('Quote handler', () => {
const webhookProvider = new MockWebhookConfigurationProvider([
{ name: 'uniswap', endpoint: 'https://uniswap.org', headers: {}, hash: '0xuni' },
]);
<<<<<<< HEAD
const circuitBreakerProvider = new MockCircuitBreakerConfigurationProvider(
['0xuni', 'google'],
FILLER_TIMESTAMPS
);
=======
const circuitBreakerProvider = new MockCircuitBreakerConfigurationProvider([
{ hash: '0xuni', fadeRate: 0.02, enabled: true },
]);
>>>>>>> main
const quoters = [
new WebhookQuoter(
logger,
Expand Down Expand Up @@ -394,10 +406,16 @@ describe('Quote handler', () => {
const webhookProvider = new MockWebhookConfigurationProvider([
{ name: 'uniswap', endpoint: 'https://uniswap.org', headers: {}, hash: '0xuni' },
]);
<<<<<<< HEAD
const circuitBreakerProvider = new MockCircuitBreakerConfigurationProvider(
['0xuni', 'google'],
FILLER_TIMESTAMPS
);
=======
const circuitBreakerProvider = new MockCircuitBreakerConfigurationProvider([
{ hash: '0xuni', fadeRate: 0.02, enabled: true },
]);
>>>>>>> main
const quoters = [
new WebhookQuoter(
logger,
Expand Down Expand Up @@ -603,6 +621,7 @@ describe('Quote handler', () => {
})
);
});
<<<<<<< HEAD

it('only calls eligible fillers', async () => {
const webhookProvider = new MockWebhookConfigurationProvider([
Expand Down Expand Up @@ -640,5 +659,7 @@ describe('Quote handler', () => {
expect.anything()
);
});
=======
>>>>>>> main
});
});
4 changes: 4 additions & 0 deletions test/providers/quoters/WebhookQuoter.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -177,12 +177,16 @@ describe('WebhookQuoter tests', () => {
data: quote,
});
});
<<<<<<< HEAD

const cbProvider = new MockCircuitBreakerConfigurationProvider(
['0xuni'],
new Map([['0xuni', { lastPostTimestamp: 100, blockUntilTimestamp: NaN }]])
);

=======
const cbProvider = new MockCircuitBreakerConfigurationProvider([{ hash: '0xuni', fadeRate: 0.05, enabled: true }]);
>>>>>>> main
const quoter = new WebhookQuoter(
logger,
mockFirehoseLogger,
Expand Down

0 comments on commit ce42619

Please sign in to comment.