mirror of
https://github.com/mempool/mempool.git
synced 2025-01-17 18:52:34 +01:00
Market api: Fix memory leak
This commit is contained in:
parent
344413568d
commit
4d4eaecb87
@ -20,11 +20,13 @@ class BisqMarketsApi {
|
||||
this.tradesData = trades;
|
||||
|
||||
// Handle data for smarter memory caching
|
||||
this.fiatCurrenciesIndexed = {};
|
||||
this.fiatCurrencyData.forEach((currency) => {
|
||||
currency._type = 'fiat';
|
||||
this.fiatCurrenciesIndexed[currency.code] = true;
|
||||
});
|
||||
this.cryptoCurrencyData.forEach((currency) => currency._type = 'crypto');
|
||||
this.tradeDataByMarket = {};
|
||||
this.tradesData.forEach((trade) => {
|
||||
trade._market = trade.currencyPair.toLowerCase().replace('/', '_');
|
||||
if (!this.tradeDataByMarket[trade._market]) {
|
||||
|
Loading…
Reference in New Issue
Block a user