diff --git a/src/api/Api.js b/src/api/Api.js index 57211606..87c4d58d 100644 --- a/src/api/Api.js +++ b/src/api/Api.js @@ -139,12 +139,13 @@ class Api extends DataCollector { const stats = await Stats.run('getLatest') if (!stats) return - /* const ExtendedStats = this.getModule('ExtendedStats') - if (ExtendedStats) { - const blockNumber = parseInt(stats.blockNumber) - const extendedStats = await ExtendedStats.getExtendedStats(blockNumber) - Object.assign(stats, extendedStats) - } */ + const ExtendedStats = this.getModule('ExtendedStats') + if (ExtendedStats) { + const blockNumber = parseInt(stats.blockNumber) + const extendedStats = await ExtendedStats.getExtendedStats(blockNumber) + Object.assign(stats, extendedStats) + } + let circulatingSupply = stats.circulatingSupply || await this.getCirculatingSupplyFromDb() this.circulatingSupply = circulatingSupply this.stats = Object.assign({}, stats) diff --git a/src/api/modules/index.js b/src/api/modules/index.js index 752d6be0..92a94658 100644 --- a/src/api/modules/index.js +++ b/src/api/modules/index.js @@ -6,11 +6,11 @@ import { Token } from './Token' import { TxPending } from './TxPending' import { Stats } from './Stats' import { Summary } from './Summary' -// import { ExtendedStats } from './ExtendedStats' +import { ExtendedStats } from './ExtendedStats' import { ContractVerification } from './ContractVerification' import { getModulesNames, getEnabledModules } from '../lib/apiTools' -const apiModules = { Block, Tx, Address, Event, Token, TxPending, Stats, Summary, ContractVerification } +const apiModules = { ExtendedStats, Block, Tx, Address, Event, Token, TxPending, Stats, Summary, ContractVerification } export const getEnabledApiModules = modules => { const enabled = getModulesNames(getEnabledModules(modules))