From 20e7b2b3545d5511617f87b73f0d780132261728 Mon Sep 17 00:00:00 2001 From: benesjan Date: Tue, 14 May 2024 11:10:22 +0000 Subject: [PATCH] same secrets fix --- yarn-project/accounts/src/testing/create_account.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/yarn-project/accounts/src/testing/create_account.ts b/yarn-project/accounts/src/testing/create_account.ts index 1ecf3a87c88..5f9903165da 100644 --- a/yarn-project/accounts/src/testing/create_account.ts +++ b/yarn-project/accounts/src/testing/create_account.ts @@ -31,7 +31,7 @@ export async function createAccounts( const accounts = []; if (secrets.length == 0) { - secrets = Array(numberOfAccounts).fill(Fr.random()); + secrets = Array.from({ length: numberOfAccounts }, () => Fr.random()); } else if (secrets.length > 0 && secrets.length !== numberOfAccounts) { throw new Error('Secrets array must be empty or have the same length as the number of accounts'); }