From ef686bbe8886af676bbe0232e4365ffb169b5faa Mon Sep 17 00:00:00 2001 From: Lydia Garms Date: Tue, 23 Jul 2024 14:43:07 +0100 Subject: [PATCH] fix: error in SimpleStruct6 due to encrypting unknown structs --- .../orchestration/javascript/raw/boilerplate-generator.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/boilerplate/orchestration/javascript/raw/boilerplate-generator.ts b/src/boilerplate/orchestration/javascript/raw/boilerplate-generator.ts index cbfb7b3c..0e11d925 100644 --- a/src/boilerplate/orchestration/javascript/raw/boilerplate-generator.ts +++ b/src/boilerplate/orchestration/javascript/raw/boilerplate-generator.ts @@ -566,7 +566,7 @@ encryptBackupPreimage = { let saltName = ''; switch (stateType) { case 'increment': - valueName = `BigInt(${stateName}_newCommitmentValue.hex(32))`; + valueName = structProperties ? `...${stateName}_newCommitmentValue.hex(32).map(v => BigInt(v))` : `BigInt(${stateName}_newCommitmentValue.hex(32))`; saltName = stateName + '_newSalt'; break; case 'decrement':