From 1d331e35c0fffd17f738d6c2234e0c643f077a95 Mon Sep 17 00:00:00 2001 From: William Chong <6198816+williamchong@users.noreply.github.com> Date: Mon, 21 Feb 2022 01:03:47 +0800 Subject: [PATCH] fix block API cumulative_diff type might be number (#32) --- src/query/block.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/query/block.ts b/src/query/block.ts index 7d2707d..fb2d98d 100644 --- a/src/query/block.ts +++ b/src/query/block.ts @@ -82,6 +82,9 @@ export async function getBlock({ // REVIEW: does assuming re-forking condition work better than fatal error? process.exit(1); } + if (body.cumulative_diff) { // HACK: Fix some cumulative_diff is number + body.cumulative_diff = body.cumulative_diff.toString(); + } warmNode(tryNode); return body; }