From fdad7ecc59a0030873ff451313ee32161557d0ba Mon Sep 17 00:00:00 2001 From: Geoffrey Casper Date: Thu, 11 Apr 2024 10:45:19 -0400 Subject: [PATCH] fix contract result containing undefined for dag encoding --- src/services/new/witness/index.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/services/new/witness/index.ts b/src/services/new/witness/index.ts index 386b917..06568e0 100644 --- a/src/services/new/witness/index.ts +++ b/src/services/new/witness/index.ts @@ -405,11 +405,11 @@ export class WitnessServiceV2 { results[contract_id].push({ id: tx.id, result: { - ret: contractCallResult.ret, - error: contractCallResult.error, - errorType: contractCallResult.errorType, - logs: contractCallResult.logs, - IOGas: contractCallResult.IOGas + ret: contractCallResult.ret ?? null, + error: contractCallResult.error ?? null, + errorType: contractCallResult.errorType ?? null, + logs: contractCallResult.logs ?? null, + IOGas: contractCallResult.IOGas ?? null, } }) }