Skip to content

Commit

Permalink
fix: typos (#334)
Browse files Browse the repository at this point in the history
  • Loading branch information
mattn authored and cameri committed Sep 9, 2023
1 parent d1d4cb9 commit 3b5b1fc
Show file tree
Hide file tree
Showing 14 changed files with 25 additions and 25 deletions.
Expand Up @@ -3,7 +3,7 @@ import { path } from 'ramda'

import { createSettings } from '../settings-factory'
import { IPaymentsProcessor } from '../../@types/clients'
import { LNbitsPaymentsProcesor } from '../../payments-processors/lnbits-payment-processor'
import { LNbitsPaymentsProcessor } from '../../payments-processors/lnbits-payment-processor'
import { Settings } from '../../@types/settings'


Expand Down Expand Up @@ -35,5 +35,5 @@ export const createLNbitsPaymentProcessor = (settings: Settings): IPaymentsProce

const client = axios.create(config)

return new LNbitsPaymentsProcesor(client, createSettings)
return new LNbitsPaymentsProcessor(client, createSettings)
}
Expand Up @@ -3,7 +3,7 @@ import { path } from 'ramda'

import { createSettings } from '../settings-factory'
import { IPaymentsProcessor } from '../../@types/clients'
import { LnurlPaymentsProcesor } from '../../payments-processors/lnurl-payments-processor'
import { LnurlPaymentsProcessor } from '../../payments-processors/lnurl-payments-processor'
import { Settings } from '../../@types/settings'

export const createLnurlPaymentsProcessor = (settings: Settings): IPaymentsProcessor => {
Expand All @@ -14,5 +14,5 @@ export const createLnurlPaymentsProcessor = (settings: Settings): IPaymentsProce

const client = axios.create()

return new LnurlPaymentsProcesor(client, createSettings)
return new LnurlPaymentsProcessor(client, createSettings)
}
Expand Up @@ -3,7 +3,7 @@ import { path } from 'ramda'

import { createSettings } from '../settings-factory'
import { IPaymentsProcessor } from '../../@types/clients'
import { NodelessPaymentsProcesor } from '../../payments-processors/nodeless-payments-processor'
import { NodelessPaymentsProcessor } from '../../payments-processors/nodeless-payments-processor'
import { Settings } from '../../@types/settings'

const getNodelessAxiosConfig = (settings: Settings): CreateAxiosDefaults<any> => {
Expand All @@ -27,5 +27,5 @@ const getNodelessAxiosConfig = (settings: Settings): CreateAxiosDefaults<any> =>
export const createNodelessPaymentsProcessor = (settings: Settings): IPaymentsProcessor => {
const client = axios.create(getNodelessAxiosConfig(settings))

return new NodelessPaymentsProcesor(client, createSettings)
return new NodelessPaymentsProcessor(client, createSettings)
}
Expand Up @@ -3,7 +3,7 @@ import { path } from 'ramda'

import { createSettings } from '../settings-factory'
import { IPaymentsProcessor } from '../../@types/clients'
import { OpenNodePaymentsProcesor } from '../../payments-processors/opennode-payments-processor'
import { OpenNodePaymentsProcessor } from '../../payments-processors/opennode-payments-processor'
import { Settings } from '../../@types/settings'

const getOpenNodeAxiosConfig = (settings: Settings): CreateAxiosDefaults<any> => {
Expand Down Expand Up @@ -35,5 +35,5 @@ export const createOpenNodePaymentsProcessor = (settings: Settings): IPaymentsPr
const config = getOpenNodeAxiosConfig(settings)
const client = axios.create(config)

return new OpenNodePaymentsProcesor(client, createSettings)
return new OpenNodePaymentsProcessor(client, createSettings)
}
Expand Up @@ -4,7 +4,7 @@ import { path } from 'ramda'
import { createSettings } from '../settings-factory'
import { IPaymentsProcessor } from '../../@types/clients'
import { Settings } from '../../@types/settings'
import { ZebedeePaymentsProcesor } from '../../payments-processors/zebedee-payments-processor'
import { ZebedeePaymentsProcessor } from '../../payments-processors/zebedee-payments-processor'

const getZebedeeAxiosConfig = (settings: Settings): CreateAxiosDefaults<any> => {
if (!process.env.ZEBEDEE_API_KEY) {
Expand Down Expand Up @@ -46,5 +46,5 @@ export const createZebedeePaymentsProcessor = (settings: Settings): IPaymentsPro

const client = axios.create(config)

return new ZebedeePaymentsProcesor(client, createSettings)
}
return new ZebedeePaymentsProcessor(client, createSettings)
}
2 changes: 1 addition & 1 deletion src/handlers/subscribe-message-handler.ts
Expand Up @@ -90,7 +90,7 @@ export class SubscribeMessageHandler implements IMessageHandler, IAbortable {
const subscriptionLimits = this.settings().limits?.client?.subscription

if (existingSubscription?.length && equals(filters, existingSubscription)) {
return `Duplicate subscription ${subscriptionId}: Ignorning`
return `Duplicate subscription ${subscriptionId}: Ignoring`
}

const maxSubscriptions = subscriptionLimits?.maxSubscriptions ?? 0
Expand Down
2 changes: 1 addition & 1 deletion src/payments-processors/lnbits-payment-processor.ts
Expand Up @@ -39,7 +39,7 @@ export class LNbitsCreateInvoiceResponse implements CreateInvoiceResponse {
rawResponse?: string
}

export class LNbitsPaymentsProcesor implements IPaymentsProcessor {
export class LNbitsPaymentsProcessor implements IPaymentsProcessor {
public constructor(
private httpClient: AxiosInstance,
private settings: Factory<Settings>
Expand Down
2 changes: 1 addition & 1 deletion src/payments-processors/lnurl-payments-processor.ts
Expand Up @@ -9,7 +9,7 @@ import { Settings } from '../@types/settings'

const debug = createLogger('lnurl-payments-processor')

export class LnurlPaymentsProcesor implements IPaymentsProcessor {
export class LnurlPaymentsProcessor implements IPaymentsProcessor {
public constructor(
private httpClient: AxiosInstance,
private settings: Factory<Settings>
Expand Down
2 changes: 1 addition & 1 deletion src/payments-processors/nodeless-payments-processor.ts
Expand Up @@ -8,7 +8,7 @@ import { Settings } from '../@types/settings'

const debug = createLogger('nodeless-payments-processor')

export class NodelessPaymentsProcesor implements IPaymentsProcessor {
export class NodelessPaymentsProcessor implements IPaymentsProcessor {
public constructor(
private httpClient: AxiosInstance,
private settings: Factory<Settings>
Expand Down
2 changes: 1 addition & 1 deletion src/payments-processors/opennode-payments-processor.ts
Expand Up @@ -8,7 +8,7 @@ import { Settings } from '../@types/settings'

const debug = createLogger('opennode-payments-processor')

export class OpenNodePaymentsProcesor implements IPaymentsProcessor {
export class OpenNodePaymentsProcessor implements IPaymentsProcessor {
public constructor(
private httpClient: AxiosInstance,
private settings: Factory<Settings>
Expand Down
2 changes: 1 addition & 1 deletion src/payments-processors/zebedee-payments-processor.ts
Expand Up @@ -8,7 +8,7 @@ import { Settings } from '../@types/settings'

const debug = createLogger('zebedee-payments-processor')

export class ZebedeePaymentsProcesor implements IPaymentsProcessor {
export class ZebedeePaymentsProcessor implements IPaymentsProcessor {
public constructor(
private httpClient: AxiosInstance,
private settings: Factory<Settings>
Expand Down
2 changes: 1 addition & 1 deletion src/utils/transform.ts
Expand Up @@ -84,7 +84,7 @@ export const fromZebedeeInvoice = applySpec<Invoice>({
pipe(prop('createdAt'), toDate),
always(null),
),
rawRespose: toJSON,
rawResponse: toJSON,
})

export const fromNodelessInvoice = applySpec<Invoice>({
Expand Down
4 changes: 2 additions & 2 deletions test/unit/handlers/subscribe-message-handler.spec.ts
Expand Up @@ -270,7 +270,7 @@ describe('SubscribeMessageHandler', () => {
subscriptions.set(subscriptionId, filters)

expect((handler as any).canSubscribe(subscriptionId, filters))
.to.equal('Duplicate subscription subscriptionId: Ignorning')
.to.equal('Duplicate subscription subscriptionId: Ignoring')
})

it('returns reason if client subscriptions exceed limits', () => {
Expand Down Expand Up @@ -305,4 +305,4 @@ describe('SubscribeMessageHandler', () => {
expect((handler as any).canSubscribe(subscriptionId, filters)).to.equal('Too many filters: Number of filters per susbscription must be less then or equal to 1')
})
})
})
})
10 changes: 5 additions & 5 deletions test/unit/tor/onion.spec.ts
Expand Up @@ -82,7 +82,7 @@ describe('onion',()=>{
sandbox.restore()
})

it('config emty',()=>{
it('config empty',()=>{
const config = createTorConfig()
expect(config).to.include({ port: 9051 })
})
Expand All @@ -109,7 +109,7 @@ describe('onion',()=>{
}
expect(client).be.undefined
})
it('tor connect sucess',async ()=>{
it('tor connect success',async ()=>{
//mockTor(sandbox)
process.env.TOR_HOST = hostname()
process.env.TOR_CONTROL_PORT = '9051'
Expand Down Expand Up @@ -175,7 +175,7 @@ describe('onion',()=>{
console.log('domain: '+domain)
expect(domain).be.undefined
})
it('add onion sucess read fail',async ()=>{
it('add onion success read fail',async ()=>{
mock(sandbox,true)
process.env.TOR_HOST = hostname()
process.env.TOR_CONTROL_PORT = '9051'
Expand All @@ -191,7 +191,7 @@ describe('onion',()=>{
console.log('domain: '+domain)
expect(domain).be.not.undefined
})
it('add onion sucess',async ()=>{
it('add onion success',async ()=>{
mock(sandbox)
process.env.TOR_HOST = hostname()
process.env.TOR_CONTROL_PORT = '9051'
Expand All @@ -207,4 +207,4 @@ describe('onion',()=>{
console.log('domain: '+domain)
expect(domain).be.not.undefined
})
})
})

0 comments on commit 3b5b1fc

Please sign in to comment.