Skip to content

Commit

Permalink
chore: use namespaced c1 network api
Browse files Browse the repository at this point in the history
  • Loading branch information
dav1do committed Jul 25, 2024
1 parent c92fbf5 commit ed87709
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions packages/core/src/recon.ts
Original file line number Diff line number Diff line change
Expand Up @@ -131,7 +131,7 @@ export class ReconApi extends Observable<ReconEventFeedResponse> implements IRec
private async verifyNetwork(): Promise<void> {
let response
try {
response = await this.#sendRequest(this.#url + '/ceramic/network', {
response = await this.#sendRequest(this.#url + '/ceramic/config/network', {
method: 'GET',
})
} catch (err) {
Expand All @@ -146,10 +146,8 @@ export class ReconApi extends Observable<ReconEventFeedResponse> implements IRec
// in the network, or don't use it at all and just rely on c1, we're okay ignoring that piece
if (!response.name.includes(this.#config.network)) {
throw new Error(
`Recon: failed to verify network as js-ceramic is using ${
this.#config.network
} but ceramic-one is on ${
response.name
`Recon: failed to verify network as js-ceramic is using ${this.#config.network
} but ceramic-one is on ${response.name
}. Pass --network to the js-ceramic or ceramic-one daemon to make them match.`
)
}
Expand Down Expand Up @@ -270,8 +268,7 @@ export class ReconApi extends Observable<ReconEventFeedResponse> implements IRec
retry({
delay: (err) => {
this.#logger.warn(
`Recon: event feed failed, due to error ${err}; attempting to retry in ${
this.#pollInterval
`Recon: event feed failed, due to error ${err}; attempting to retry in ${this.#pollInterval
}ms`
)
return timer(this.#pollInterval)
Expand Down

0 comments on commit ed87709

Please sign in to comment.