Skip to content

Commit

Permalink
Fix code style issues with Prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
lint-action committed Jun 4, 2022
1 parent d5a8ef4 commit 353ef73
Show file tree
Hide file tree
Showing 5 changed files with 14 additions and 14 deletions.
14 changes: 7 additions & 7 deletions bin/app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ export class RoutingAPIStage extends Stage {
scope: Construct,
id: string,
props: StageProps & {
jsonRpcProviders: {[chainName: string]:string}
jsonRpcProviders: { [chainName: string]: string }
provisionedConcurrency: number
ethGasStationInfoUrl: string
chatbotSNSArn?: string
Expand Down Expand Up @@ -96,7 +96,8 @@ export class RoutingAPIPipeline extends Stack {
// have been granted permissions to access secrets via resource policies.

const jsonRpcProvidersSecret = sm.Secret.fromSecretAttributes(this, 'RPCProviderUrls', {
secretCompleteArn: 'arn:aws:secretsmanager:us-east-2:644039819003:secret:routing-api-rpc-urls-json-primary-ixS8mw',
secretCompleteArn:
'arn:aws:secretsmanager:us-east-2:644039819003:secret:routing-api-rpc-urls-json-primary-ixS8mw',
//backup Arn: arn:aws:secretsmanager:us-east-2:644039819003:secret:routing-api-rpc-urls-json-backup-D2sWoe
})

Expand All @@ -120,11 +121,10 @@ export class RoutingAPIPipeline extends Stack {
})

// Parse AWS Secret
let jsonRpcProviders = {} as {[chainId:string]:string}
SUPPORTED_CHAINS
.forEach((chainId:ChainId)=>{
const key = `WEB3_RPC_${chainId}`
jsonRpcProviders[key] = jsonRpcProvidersSecret.secretValueFromJson(key) as unknown as string
let jsonRpcProviders = {} as { [chainId: string]: string }
SUPPORTED_CHAINS.forEach((chainId: ChainId) => {
const key = `WEB3_RPC_${chainId}`
jsonRpcProviders[key] = jsonRpcProvidersSecret.secretValueFromJson(key) as unknown as string
})

// Beta us-east-2
Expand Down
2 changes: 1 addition & 1 deletion bin/stacks/routing-api-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export class RoutingAPIStack extends cdk.Stack {
parent: Construct,
name: string,
props: cdk.StackProps & {
jsonRpcProviders: {[chainName: string]:string}
jsonRpcProviders: { [chainName: string]: string }
provisionedConcurrency: number
throttlingOverride?: string
ethGasStationInfoUrl: string
Expand Down
4 changes: 2 additions & 2 deletions bin/stacks/routing-lambda-stack.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export interface RoutingLambdaStackProps extends cdk.NestedStackProps {
poolCacheBucket: aws_s3.Bucket
poolCacheBucket2: aws_s3.Bucket
poolCacheKey: string
jsonRpcProviders: {[chainName: string]:string}
jsonRpcProviders: { [chainName: string]: string }
tokenListCacheBucket: aws_s3.Bucket
provisionedConcurrency: number
ethGasStationInfoUrl: string
Expand Down Expand Up @@ -73,7 +73,7 @@ export class RoutingLambdaStack extends cdk.NestedStack {
POOL_CACHE_KEY: poolCacheKey,
TOKEN_LIST_CACHE_BUCKET: tokenListCacheBucket.bucketName,
ETH_GAS_STATION_INFO_URL: ethGasStationInfoUrl,
...jsonRpcProviders
...jsonRpcProviders,
},
layers: [
aws_lambda.LayerVersion.fromLayerVersionArn(
Expand Down
6 changes: 3 additions & 3 deletions lib/handlers/injector-sor.ts
Original file line number Diff line number Diff line change
Expand Up @@ -107,10 +107,10 @@ export abstract class InjectorSOR<Router, QueryParams> extends Injector<
const dependenciesByChainArray = await Promise.all(
_.map(SUPPORTED_CHAINS, async (chainId: ChainId) => {
const url = process.env[`WEB3_RPC_${chainId.toString()}`]!
log.info({url:url}, `GENERATED URL`)
log.info({ url: url }, `GENERATED URL`)

if(typeof(url)==undefined||url=="") {
log.fatal({'chainId':chainId}, `Fatal: No Web3 RPC endpoint set for chain`)
if (typeof url == undefined || url == '') {
log.fatal({ chainId: chainId }, `Fatal: No Web3 RPC endpoint set for chain`)
}

let timeout: number
Expand Down
2 changes: 1 addition & 1 deletion test/integ/quote-to-ratio.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -798,7 +798,7 @@ describe('quote-to-ratio', async function () {
expect(status).to.equal(200)
} catch (err) {
console.log(err)
console.log("#".repeat(100))
console.log('#'.repeat(100))
fail(JSON.stringify(err.response.data))
}
})
Expand Down

0 comments on commit 353ef73

Please sign in to comment.