Skip to content

Commit 685d40d

Browse files
committed
fix: set proveByIndex to true for V2 mode in TypeScript tests
In V2 mode, index-based proving is required. Changed all TypeScript tests to use proveByIndex: true for operations that read existing accounts.
1 parent 1bbd1ef commit 685d40d

5 files changed

Lines changed: 7 additions & 7 deletions

File tree

basic-operations/anchor/burn/tests/burn.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -204,7 +204,7 @@ async function burnCompressedAccount(
204204
merkleTreePubkeyIndex,
205205
queuePubkeyIndex,
206206
leafIndex: compressedAccount.leafIndex,
207-
proveByIndex: false,
207+
proveByIndex: true,
208208
rootIndex: proofRpcResult.rootIndices[0],
209209
},
210210
address: compressedAccount.address,

basic-operations/anchor/close/tests/close.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ async function closeCompressedAccount(
211211
merkleTreePubkeyIndex,
212212
queuePubkeyIndex,
213213
leafIndex: compressedAccount.leafIndex,
214-
proveByIndex: false,
214+
proveByIndex: true,
215215
rootIndex: proofRpcResult.rootIndices[0],
216216
},
217217
address: compressedAccount.address,

basic-operations/anchor/reinit/tests/reinit.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,7 @@ async function closeCompressedAccount(
230230
merkleTreePubkeyIndex,
231231
queuePubkeyIndex,
232232
leafIndex: compressedAccount.leafIndex,
233-
proveByIndex: false,
233+
proveByIndex: true,
234234
rootIndex: proofRpcResult.rootIndices[0],
235235
},
236236
address: compressedAccount.address,
@@ -296,7 +296,7 @@ async function reinitCompressedAccount(
296296
merkleTreePubkeyIndex,
297297
queuePubkeyIndex,
298298
leafIndex: compressedAccount.leafIndex,
299-
proveByIndex: false,
299+
proveByIndex: true,
300300
rootIndex: proofRpcResult.rootIndices[0],
301301
},
302302
address: compressedAccount.address,

basic-operations/anchor/update/tests/update.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -216,7 +216,7 @@ async function updateCompressedAccount(
216216
merkleTreePubkeyIndex,
217217
queuePubkeyIndex,
218218
leafIndex: compressedAccount.leafIndex,
219-
proveByIndex: false,
219+
proveByIndex: true,
220220
rootIndex: proofRpcResult.rootIndices[0],
221221
},
222222
outputStateTreeIndex,

counter/anchor/tests/test.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -211,7 +211,7 @@ async function incrementCounterCompressedAccount(
211211
const compressedAccountMeta = {
212212
treeInfo: {
213213
rootIndex: proofRpcResult.rootIndices[0],
214-
proveByIndex: false,
214+
proveByIndex: true,
215215
merkleTreePubkeyIndex,
216216
queuePubkeyIndex,
217217
leafIndex: counterAccount.leafIndex,
@@ -280,7 +280,7 @@ async function deleteCounterCompressedAccount(
280280
const compressedAccountMeta = {
281281
treeInfo: {
282282
rootIndex: proofRpcResult.rootIndices[0],
283-
proveByIndex: false,
283+
proveByIndex: true,
284284
merkleTreePubkeyIndex,
285285
queuePubkeyIndex,
286286
leafIndex: counterAccount.leafIndex,

0 commit comments

Comments
 (0)