@@ -35,6 +35,8 @@ import { LogsRepository, TickerLogRepository, TickerRepository } from '../reposi
3535import { QueueManager } from '../utils/queue' ;
3636import { FileCache } from '../utils/file_cache' ;
3737import { BinancePriceService } from '../utils/binance_price_service' ;
38+ import nodemailer from 'nodemailer' ;
39+ import { Telegraf } from 'telegraf' ;
3840
3941import { ExchangeCandleCombine } from './exchange/exchange_candle_combine' ;
4042import { ExchangeInstanceService } from './system/exchange_instance_service' ;
@@ -429,11 +431,9 @@ const services: Services = {
429431 } ,
430432
431433 createMailer : function ( ) : any {
432- const mail = require ( 'nodemailer' ) ;
433-
434434 const config = this . getConfig ( ) ;
435435
436- return mail . createTransport ( {
436+ return nodemailer . createTransport ( {
437437 host : config . notify ?. mail ?. server ,
438438 port : config . notify ?. mail ?. port ,
439439 secure : config . notify ?. mail ?. port == 465 ,
@@ -445,7 +445,6 @@ const services: Services = {
445445 } ,
446446
447447 createTelegram : function ( ) : any {
448- const { Telegraf } = require ( 'telegraf' ) ;
449448 const config = this . getConfig ( ) ;
450449 const { token } = config . notify ?. telegram || { } ;
451450
0 commit comments