Fix block link in pool page - Click on chart slice open pool page

This commit is contained in:
nymkappa
2022-02-14 13:21:35 +09:00
parent e343b4d6da
commit 690f33843c
6 changed files with 32 additions and 14 deletions

View File

@@ -2,7 +2,6 @@ import { PoolInfo, PoolStats } from '../mempool.interfaces';
import BlocksRepository, { EmptyBlocks } from '../repositories/BlocksRepository';
import PoolsRepository from '../repositories/PoolsRepository';
import bitcoinClient from './bitcoin/bitcoin-client';
import { Common } from './common';
class Mining {
constructor() {

View File

@@ -172,7 +172,7 @@ class BlocksRepository {
startHeight: number | null = null
): Promise<object[]> {
const params: any[] = [];
let query = `SELECT height, hash, tx_count, size, weight, pool_id, UNIX_TIMESTAMP(blockTimestamp) as timestamp, 0 as reward
let query = `SELECT height, hash as id, tx_count, size, weight, pool_id, UNIX_TIMESTAMP(blockTimestamp) as timestamp, 0 as reward
FROM blocks
WHERE pool_id = ?`;
params.push(poolId);