From d27df7d27150f362f2377aaa699da3fb1f743782 Mon Sep 17 00:00:00 2001 From: Willian Mitsuda Date: Wed, 27 Oct 2021 14:57:38 -0300 Subject: [PATCH] Omit missing value field --- src/transaction/TraceItem.tsx | 2 +- src/useErigonHooks.ts | 5 ++++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/src/transaction/TraceItem.tsx b/src/transaction/TraceItem.tsx index 3b6b9ef..4de951a 100644 --- a/src/transaction/TraceItem.tsx +++ b/src/transaction/TraceItem.tsx @@ -42,7 +42,7 @@ const TraceItem: React.FC = ({ t, txData, last }) => { className={`font-bold ${ t.type === "STATICCALL" ? "text-red-700" - : t.type === "DELEGATECALL" + : t.type === "DELEGATECALL" || t.type === "CALLCODE" ? "text-gray-400" : "text-blue-900" }`} diff --git a/src/useErigonHooks.ts b/src/useErigonHooks.ts index 62b2449..dc7de4e 100644 --- a/src/useErigonHooks.ts +++ b/src/useErigonHooks.ts @@ -341,7 +341,10 @@ export const useTraceTransaction = ( for (let i = 0; i < results.length; i++) { results[i].from = provider.formatter.address(results[i].from); results[i].to = provider.formatter.address(results[i].to); - results[i].value = provider.formatter.bigNumber(results[i].value); + results[i].value = + results[i].value === null + ? null + : provider.formatter.bigNumber(results[i].value); } // Build trace tree