Skip to content

Commit

Permalink
fix!: fix typo in HTTPGatewayRouter class/interface name (#664)
Browse files Browse the repository at this point in the history
Gatway -> Gateway
  • Loading branch information
achingbrain authored Jan 14, 2025
1 parent 1c8583c commit 87aa9b4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
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'

0 comments on commit 87aa9b4

Please sign in to comment.