Omit missing value field

This commit is contained in:
Willian Mitsuda 2021-10-27 14:57:38 -03:00
parent e93c2953ec
commit d27df7d271
2 changed files with 5 additions and 2 deletions

View File

@ -42,7 +42,7 @@ const TraceItem: React.FC<TraceItemProps> = ({ 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"
}`}

View File

@ -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