@@ -8,6 +8,7 @@ import { SubscriptionTransport } from '@chainlink/external-adapter-framework/tra
88import { AdapterResponse , makeLogger , sleep } from '@chainlink/external-adapter-framework/util'
99import { Requester } from '@chainlink/external-adapter-framework/util/requester'
1010import { AdapterInputError } from '@chainlink/external-adapter-framework/validation/error'
11+ import { getApiKeys } from './creds'
1112import { clampStartByBusinessDays , parseDateString , toDateString } from './date-utils'
1213
1314const logger = makeLogger ( 'NavTransport' )
@@ -66,11 +67,14 @@ export class NavTransport extends SubscriptionTransport<BaseEndpointTypes> {
6667 ) : Promise < AdapterResponse < BaseEndpointTypes [ 'Response' ] > > {
6768 const providerDataRequestedUnixMs = Date . now ( )
6869 logger . debug ( `Handling request for globalFundID: ${ param . globalFundID } ` )
70+
71+ const [ apiKey , secret ] = getApiKeys ( param . globalFundID )
72+
6973 const { FromDate : earliestPossibleFromStr , ToDate : latestPossibleToStr } = await getFundDates ( {
7074 globalFundID : param . globalFundID ,
7175 baseURL : this . config . API_ENDPOINT ,
72- apiKey : this . config . API_KEY ,
73- secret : this . config . SECRET_KEY ,
76+ apiKey,
77+ secret,
7478 requester : this . requester ,
7579 } )
7680
@@ -92,8 +96,8 @@ export class NavTransport extends SubscriptionTransport<BaseEndpointTypes> {
9296 fromDate : toDateString ( preferredFrom ) ,
9397 toDate : toDateString ( latestPossibleTo ) ,
9498 baseURL : this . config . API_ENDPOINT ,
95- apiKey : this . config . API_KEY ,
96- secret : this . config . SECRET_KEY ,
99+ apiKey,
100+ secret,
97101 requester : this . requester ,
98102 } )
99103
0 commit comments