Fix search by block hash

This commit is contained in:
Willian Mitsuda 2022-02-18 02:32:39 -03:00
parent 82b003f29b
commit 288f6c92cd
2 changed files with 2 additions and 4 deletions

View File

@ -1,3 +1,3 @@
export const MIN_API_LEVEL = 6;
export const MIN_API_LEVEL = 7;
export const PAGE_SIZE = 25;

View File

@ -39,10 +39,8 @@ export const readBlock = async (
) => {
let blockPromise: Promise<any>;
if (isHexString(blockNumberOrHash, 32)) {
// TODO: fix
blockPromise = provider.send("eth_getBlockByHash", [
blockPromise = provider.send("ots_getBlockDetailsByHash", [
blockNumberOrHash,
false,
]);
} else {
blockPromise = provider.send("ots_getBlockDetails", [blockNumberOrHash]);