From 87aa9b4b21593870296c9a1c8b11c9123bbc5da1 Mon Sep 17 00:00:00 2001 From: Alex Potsides Date: Tue, 14 Jan 2025 10:42:15 +0100 Subject: [PATCH] fix!: fix typo in HTTPGatewayRouter class/interface name (#664) Gatway -> Gateway --- packages/routers/src/http-gateway-routing.ts | 10 +++++----- packages/routers/src/index.ts | 2 +- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/packages/routers/src/http-gateway-routing.ts b/packages/routers/src/http-gateway-routing.ts index ae2e30da..5a40c2f7 100644 --- a/packages/routers/src/http-gateway-routing.ts +++ b/packages/routers/src/http-gateway-routing.ts @@ -15,7 +15,7 @@ export const DEFAULT_TRUSTLESS_GATEWAYS = [ 'https://4everland.io' ] -export interface HTTPGatwayRouterInit { +export interface HTTPGatewayRouterInit { gateways?: Array } @@ -33,10 +33,10 @@ function toPeerInfo (url: string | URL): PeerInfo { } } -class HTTPGatwayRouter implements Partial { +class HTTPGatewayRouter implements Partial { private readonly gateways: PeerInfo[] - constructor (init: HTTPGatwayRouterInit = {}) { + constructor (init: HTTPGatewayRouterInit = {}) { this.gateways = (init.gateways ?? DEFAULT_TRUSTLESS_GATEWAYS).map(url => toPeerInfo(url)) } @@ -51,6 +51,6 @@ class HTTPGatwayRouter implements Partial { /** * Returns a static list of HTTP Gateways as providers */ -export function httpGatewayRouting (init: HTTPGatwayRouterInit = {}): Partial { - return new HTTPGatwayRouter(init) +export function httpGatewayRouting (init: HTTPGatewayRouterInit = {}): Partial { + return new HTTPGatewayRouter(init) } diff --git a/packages/routers/src/index.ts b/packages/routers/src/index.ts index c4f7b7c7..e3b51a22 100644 --- a/packages/routers/src/index.ts +++ b/packages/routers/src/index.ts @@ -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'