Skip to content

Commit

Permalink
add beta support
Browse files Browse the repository at this point in the history
  • Loading branch information
ConjunctiveNormalForm committed Nov 8, 2023
1 parent cb7528e commit f2f1c89
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ export const PRODUCTION_S3_KEY = 'production.json';
export const BETA_S3_KEY = 'beta.json';
export const FADE_RATE_S3_KEY = 'fade-rate.json';
export const PROD_COMPLIANCE_S3_KEY = 'production.json';
export const BETA_COMPLIANCE_S3_KEY = 'beta.json';

export const DYNAMO_TABLE_NAME = {
FADES: 'Fades',
Expand Down
4 changes: 3 additions & 1 deletion lib/handlers/quote/injector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import { APIGatewayProxyEvent, Context } from 'aws-lambda';
import { default as bunyan, default as Logger } from 'bunyan';

import {
BETA_COMPLIANCE_S3_KEY,
BETA_S3_KEY,
COMPLIANCE_CONFIG_BUCKET,
FADE_RATE_BUCKET,
Expand Down Expand Up @@ -52,10 +53,11 @@ export class QuoteInjector extends ApiInjector<ContainerInjected, RequestInjecte
FADE_RATE_S3_KEY
);

const complianceKey = stage === STAGE.BETA ? BETA_COMPLIANCE_S3_KEY : PROD_COMPLIANCE_S3_KEY;
const fillerComplianceProvider = new S3FillerComplianceConfigurationProvider(
log,
`${COMPLIANCE_CONFIG_BUCKET}-${stage}-1`,
PROD_COMPLIANCE_S3_KEY
complianceKey
);

const quoters: Quoter[] = [new WebhookQuoter(log, webhookProvider, circuitBreakerProvider, fillerComplianceProvider)];
Expand Down

0 comments on commit f2f1c89

Please sign in to comment.