Made Price feed update configurable (#751)

This commit is contained in:
Priyansh
2021-08-30 01:00:11 +05:30
committed by GitHub
parent b2ec27f54f
commit 0bb52df1e8
3 changed files with 6 additions and 2 deletions

View File

@@ -1,6 +1,7 @@
import logger from '../logger';
import axios from 'axios';
import { IConversionRates } from '../mempool.interfaces';
import config from '../config';
class FiatConversion {
private conversionRates: IConversionRates = {
@@ -16,7 +17,7 @@ class FiatConversion {
public startService() {
logger.info('Starting currency rates service');
setInterval(this.updateCurrency.bind(this), 1000 * 60);
setInterval(this.updateCurrency.bind(this), 1000 * config.MEMPOOL.PRICE_FEED_UPDATE_INTERVAL);
this.updateCurrency();
}