Skip to content

Commit 0f7190a

Browse files
Merge pull request #1360 from smartcontractkit/bug/sc-24692
Fix WS issues with CF Benchmarks adapter
2 parents 81c2565 + 9e95e41 commit 0f7190a

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

.changeset/chilly-cycles-confess.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@chainlink/cfbenchmarks-adapter': minor
3+
---
4+
5+
Bugfix for broken adapter WS

packages/sources/cfbenchmarks/src/adapter.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ export const makeWSHandler = (config?: Config): MakeWSHandler => {
2929
}
3030
const getSubscription = (type: 'subscribe' | 'unsubscribe', id?: string) => {
3131
if (!id) return
32-
return { type, id, stream: 'value' }
32+
return { type, id, stream: 'value', cacheID: id } // Temporarily add another key named cacheID that won't be ignored when generating the subscription key in getSubsID
3333
}
3434
return () => {
3535
const defaultConfig = config || makeConfig()

packages/sources/cfbenchmarks/src/config.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ export const ENV_API_USERNAME = 'API_USERNAME'
99
export const ENV_API_PASSWORD = 'API_PASSWORD'
1010

1111
export const DEFAULT_ENDPOINT = 'values'
12-
export const DEFAULT_API_ENDPOINT = 'https://oracleprod1.cfbenchmarks.com/api'
12+
export const DEFAULT_API_ENDPOINT = 'https://www.cfbenchmarks.com/api'
1313
export const DEFAULT_WS_API_ENDPOINT = 'wss://www.cfbenchmarks.com/ws/v4'
1414

1515
export const makeConfig = (prefix?: string): Config => {

0 commit comments

Comments
 (0)