Merge legacy and mining /blocks components and APIs

This commit is contained in:
nymkappa committed 2022-05-23 09:08:40 +02:00
1 parent b4beb29f31
commit 37b7ea6702
12 files changed
+63 -309

No files matched your search

+1 -4
View File
@@ -426,10 +426,7 @@ class Blocks {
return blockExtended;
}
public async $getBlocksExtras(fromHeight?: number, limit: number = 15): Promise<BlockExtended[]> {
// Note - This API is breaking if indexing is not available. For now it is okay because we only
// use it for the mining pages, and mining pages should not be available if indexing is turned off.
// I'll need to fix it before we refactor the block(s) related pages
public async $getBlocks(fromHeight?: number, limit: number = 15): Promise<BlockExtended[]> {
try {
let currentHeight = fromHeight !== undefined ? fromHeight : this.getCurrentBlockHeight();
const returnBlocks: BlockExtended[] = [];