@@ -54,7 +54,7 @@ describe("Accounts", () => {
5454
5555 // generate random accounts
5656 randomAccountManagers = await Promise . all (
57- ( await generateSchnorrAccounts ( 5 ) ) . map (
57+ ( await generateSchnorrAccounts ( 2 ) ) . map (
5858 a => getSchnorrAccount ( pxe , a . secret , a . signingKey , a . salt )
5959 )
6060 ) ;
@@ -110,21 +110,15 @@ describe("Accounts", () => {
110110 let sentTxs = [ ] ;
111111 for ( let i = 0 ; i < randomWallets . length ; i ++ ) {
112112 const paymentMethod = new FeeJuicePaymentMethodWithClaim ( randomWallets [ i ] , claims [ i ] ) ;
113- sentTxs . push ( randomAccountManagers [ i ] . deploy ( { fee : { paymentMethod } } ) ) ;
113+ await randomAccountManagers [ i ] . deploy ( { fee : { paymentMethod } } ) . wait ( ) ;
114114 }
115- await Promise . all ( sentTxs . map ( stx => stx . wait ( ) ) ) ;
116-
117115 // balance after deploy with claimed fee juice
118- balances = await Promise . all ( randomAddresses . map ( async a => getFeeJuiceBalance ( a , pxe ) ) ) ;
116+ balances = await Promise . all ( randomAddresses . map ( async a => await getFeeJuiceBalance ( a , pxe ) ) ) ;
119117 const amountAfterDeploy = claimAmount - approxMaxDeployCost ;
120118 balances . forEach ( b => expect ( b ) . toBeGreaterThanOrEqual ( amountAfterDeploy ) ) ;
121119
122120 } ) ;
123121
124- it ( "Deploys first unfunded account from first funded account" , async ( ) => {
125- const tx_acc = await randomAccountManagers [ 0 ] . deploy ( { deployWallet : wallets [ 0 ] } ) ;
126- } ) ;
127-
128122 it ( "Sponsored contract deployment" , async ( ) => {
129123 const salt = Fr . random ( ) ;
130124 const VotingContractArtifact = EasyPrivateVotingContractArtifact
@@ -138,7 +132,6 @@ describe("Accounts", () => {
138132 const daWallets = await Promise . all ( accounts . map ( a => a . getWallet ( ) ) ) ;
139133 const [ deployerWallet , adminWallet ] = daWallets ;
140134 const [ deployerAddress , adminAddress ] = daWallets . map ( w => w . getAddress ( ) ) ;
141- // const adminAddress = adminWallet.getCompleteAddress().address;
142135
143136 const deploymentData = await getContractInstanceFromDeployParams ( VotingContractArtifact ,
144137 {
@@ -151,12 +144,12 @@ describe("Accounts", () => {
151144 contractAddressSalt : salt ,
152145 fee : { paymentMethod : sponsoredPaymentMethod } // without the sponsoredFPC the deployment fails, thus confirming it works
153146 } )
147+
154148 const receipt = await tx . getReceipt ( ) ;
155149
156150 expect ( receipt ) . toEqual (
157151 expect . objectContaining ( {
158152 status : TxStatus . PENDING ,
159- error : ''
160153 } ) ,
161154 ) ;
162155
0 commit comments