diff --git a/backend/src/api/blocks.ts b/backend/src/api/blocks.ts index d950a9bd3..9c1c1d05b 100644 --- a/backend/src/api/blocks.ts +++ b/backend/src/api/blocks.ts @@ -783,10 +783,18 @@ class Blocks { const blocks: any[] = []; while (fromHeight <= toHeight) { - let block = await blocksRepository.$getBlockByHeight(fromHeight); + let block: any = await blocksRepository.$getBlockByHeight(fromHeight); if (!block) { block = await this.$indexBlock(fromHeight); } + + delete(block.hash); + delete(block.previous_block_hash); + delete(block.pool_name); + delete(block.pool_link); + delete(block.pool_addresses); + delete(block.pool_regexes); + blocks.push(block); fromHeight++; } diff --git a/backend/src/repositories/BlocksRepository.ts b/backend/src/repositories/BlocksRepository.ts index baaea38d9..cc6fdeb08 100644 --- a/backend/src/repositories/BlocksRepository.ts +++ b/backend/src/repositories/BlocksRepository.ts @@ -384,6 +384,7 @@ class BlocksRepository { } rows[0].fee_span = JSON.parse(rows[0].fee_span); + rows[0].fee_percentiles = JSON.parse(rows[0].fee_percentiles); return rows[0]; } catch (e) { logger.err(`Cannot get indexed block ${height}. Reason: ` + (e instanceof Error ? e.message : e));