From df3019dda0c04a94d09f78a0d7578217602eb9cd Mon Sep 17 00:00:00 2001 From: Prashant Bajpai <34747455+prashantasdeveloper@users.noreply.github.com> Date: Wed, 27 Nov 2024 11:01:59 +0530 Subject: [PATCH] =?UTF-8?q?fix:=20=F0=9F=90=9B=20Correctly=20handle=20Inst?= =?UTF-8?q?ructionAutomaticallyAffirmed=20event?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/mappings/entities/settlements/mapSettlement.ts | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/mappings/entities/settlements/mapSettlement.ts b/src/mappings/entities/settlements/mapSettlement.ts index e650d9f..9df2ce9 100644 --- a/src/mappings/entities/settlements/mapSettlement.ts +++ b/src/mappings/entities/settlements/mapSettlement.ts @@ -301,7 +301,7 @@ export const handleInstructionCreated = async (event: SubstrateEvent): Promise= 6003001 || specName === 'polymesh_private_dev') { - const promises = await mapAutomaticAffirmation(params, blockId, eventIdx); - await Promise.all(promises); + const [instructionEvent, instructionAffirmation] = await mapAutomaticAffirmation( + params, + blockId, + eventIdx + ); + await Promise.all([instructionEvent.save(), instructionAffirmation.save()]); } };