Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix!: fix typo in HTTPGatewayRouter class name #664

Merged
merged 3 commits into from
Jan 14, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 5 additions & 5 deletions packages/routers/src/http-gateway-routing.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ export const DEFAULT_TRUSTLESS_GATEWAYS = [
'https://4everland.io'
]

export interface HTTPGatwayRouterInit {
export interface HTTPGatewayRouterInit {
gateways?: Array<URL | string>
}

Expand All @@ -33,10 +33,10 @@ function toPeerInfo (url: string | URL): PeerInfo {
}
}

class HTTPGatwayRouter implements Partial<Routing> {
class HTTPGatewayRouter implements Partial<Routing> {
private readonly gateways: PeerInfo[]

constructor (init: HTTPGatwayRouterInit = {}) {
constructor (init: HTTPGatewayRouterInit = {}) {
this.gateways = (init.gateways ?? DEFAULT_TRUSTLESS_GATEWAYS).map(url => toPeerInfo(url))
}

Expand All @@ -51,6 +51,6 @@ class HTTPGatwayRouter implements Partial<Routing> {
/**
* Returns a static list of HTTP Gateways as providers
*/
export function httpGatewayRouting (init: HTTPGatwayRouterInit = {}): Partial<Routing> {
return new HTTPGatwayRouter(init)
export function httpGatewayRouting (init: HTTPGatewayRouterInit = {}): Partial<Routing> {
return new HTTPGatewayRouter(init)
}
2 changes: 1 addition & 1 deletion packages/routers/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@
export { delegatedHTTPRouting } from './delegated-http-routing.js'
export { delegatedHTTPRoutingDefaults } from './utils/delegated-http-routing-defaults.js'
export { httpGatewayRouting } from './http-gateway-routing.js'
export type { HTTPGatwayRouterInit } from './http-gateway-routing.js'
export type { HTTPGatewayRouterInit } from './http-gateway-routing.js'
export { libp2pRouting } from './libp2p-routing.js'
Loading