fix: crash when payments are disabled

Signed-off-by: Ricardo Arturo Cabral Mejía <me@ricardocabral.io>
This commit is contained in:
Ricardo Arturo Cabral Mejía 2023-01-27 16:38:46 -05:00
parent 4ec6f20cc9
commit 280e24f75c

View File

@ -51,7 +51,7 @@ const createZebedeePaymentsProcessor = (settings: Settings): IPaymentsProcessor
export const createPaymentsProcessor = (): IPaymentsProcessor => {
const settings = createSettings()
if (!settings.payments?.enabled) {
throw new Error('Unable to create payments processor: Setting payments.enabled is false')
return new NullPaymentsProcessor()
}