Skip to content

Commit

Permalink
fix: find & replace require with import
Browse files Browse the repository at this point in the history
  • Loading branch information
Mersho committed Oct 25, 2023
1 parent e346f50 commit 24068c5
Show file tree
Hide file tree
Showing 5 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion app.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { connect as mongoConnect } from './db_connect'
const { resubscribeInvoices } = require('./ln');
import { logger } from "./logger";
import { Telegraf } from "telegraf";
const { delay } = require('./util');
import { delay } from './util';

(async () => {
process.on('unhandledRejection', e => {
Expand Down
2 changes: 1 addition & 1 deletion bot/start.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import {
Dispute,
Config,
} from '../models';
const { getCurrenciesWithPrice, deleteOrderFromChannel } = require('../util');
import { getCurrenciesWithPrice, deleteOrderFromChannel } from '../util';
const {
commandArgsMiddleware,
stageMiddleware,
Expand Down
2 changes: 1 addition & 1 deletion bot/validations.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import { Types } from 'mongoose';
import * as messages from './messages';
import { Order, User, Community } from '../models';
import { isIso4217, isDisputeSolver } from '../util';
const { existLightningAddress } = require('../lnurl/lnurl-pay');
import { existLightningAddress } from '../lnurl/lnurl-pay';
import { logger } from '../logger';

// We look in database if the telegram user exists,
Expand Down
2 changes: 1 addition & 1 deletion jobs/pending_payments.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { Telegraf } from 'telegraf';
import { I18nContext } from '@grammyjs/i18n';
import { MainContext } from '../bot/start';
const { payRequest, isPendingPayment } = require('../ln');
const { getUserI18nContext } = require('../util');
import { getUserI18nContext } from '../util';

export const attemptPendingPayments = async (bot: Telegraf<MainContext>): Promise<void> => {
const pendingPayments = await PendingPayment.find({
Expand Down
2 changes: 1 addition & 1 deletion ln/subscribe_invoice.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const { payToBuyer } = require('./pay_request');
import { lnd } from "./connect";
import * as messages from '../bot/messages';
const ordersActions = require('../bot/ordersActions');
const { getUserI18nContext, getEmojiRate, decimalRound } = require('../util');
import { getUserI18nContext, getEmojiRate, decimalRound } from '../util';
import { logger } from '../logger';

const subscribeInvoice = async (bot: Telegraf<MainContext>, id: string, resub: boolean) => {
Expand Down

0 comments on commit 24068c5

Please sign in to comment.