From 1448916ba58bbe8989f4ceb2d2b62d206f4dedcf Mon Sep 17 00:00:00 2001 From: Megha-Dev-19 <100185149+Megha-Dev-19@users.noreply.github.com> Date: Wed, 17 Jul 2024 23:15:45 +0530 Subject: [PATCH] fix filter issue for terms and condition --- .../widget/devhub/entity/proposal/AcceptedTerms.jsx | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/instances/devhub.near/widget/devhub/entity/proposal/AcceptedTerms.jsx b/instances/devhub.near/widget/devhub/entity/proposal/AcceptedTerms.jsx index 3673bb81d..0686ddfae 100644 --- a/instances/devhub.near/widget/devhub/entity/proposal/AcceptedTerms.jsx +++ b/instances/devhub.near/widget/devhub/entity/proposal/AcceptedTerms.jsx @@ -56,10 +56,11 @@ if (state.proposalBlockHeight !== null) { ); if (Array.isArray(data?.body?.shards)) { data.body.shards.map((shard) => { - const data = shard.chunk.transactions.filter( + const data = (shard?.chunk?.transactions ?? []).filter( (txn) => - txn.transaction.receiver_id === "devhub.near" && - txn.transaction.actions[0].FunctionCall.method_name === "add_proposal" + txn?.transaction?.receiver_id === "devhub.near" && + txn?.transaction?.actions?.[0]?.FunctionCall?.method_name === + "add_proposal" ); if (data?.length) { const args = JSON.parse(