From ce684a5e0f297f2ef836960bb4dde7cceecdd6fb Mon Sep 17 00:00:00 2001 From: benesjan Date: Thu, 26 Oct 2023 12:59:20 +0000 Subject: [PATCH] checking whether the a note wsa created using getNotes --- yarn-project/end-to-end/src/e2e_token_contract.test.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/yarn-project/end-to-end/src/e2e_token_contract.test.ts b/yarn-project/end-to-end/src/e2e_token_contract.test.ts index 9fa8c8ce8ea6..58e7e5bf0020 100644 --- a/yarn-project/end-to-end/src/e2e_token_contract.test.ts +++ b/yarn-project/end-to-end/src/e2e_token_contract.test.ts @@ -168,9 +168,13 @@ describe('e2e_token_contract', () => { it('redeem as recipient', async () => { await addPendingShieldNoteToPXE(0, amount, secretHash, txHash); const txClaim = asset.methods.redeem_shield(accounts[0].address, amount, secret).send(); - const receiptClaim = await txClaim.wait(); + const receiptClaim = await txClaim.wait({ getNotes: true }); expect(receiptClaim.status).toBe(TxStatus.MINED); tokenSim.redeemShield(accounts[0].address, amount); + // 1 note should be created containing `amount` of tokens + const notes = receiptClaim.notes!; + expect(notes.length).toBe(1); + expect(notes[0].notePreimage.items[0].toBigInt()).toBe(amount); }); });