From 8cdfd237b374e36e42cfafeabd059f425124ae96 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9rgio=20Torres?= <30977845+Torres-ssf@users.noreply.github.com> Date: Thu, 12 Sep 2024 16:40:20 -0300 Subject: [PATCH] update assembleReceiptByType to validade receipt changes --- packages/account/src/providers/utils/receipts.test.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/packages/account/src/providers/utils/receipts.test.ts b/packages/account/src/providers/utils/receipts.test.ts index cc9b6b86c0f..5da13b10377 100644 --- a/packages/account/src/providers/utils/receipts.test.ts +++ b/packages/account/src/providers/utils/receipts.test.ts @@ -72,6 +72,7 @@ describe('assembleReceiptByType', () => { expect(receipt.len).toStrictEqual(new BN(MOCK_GQL_RECEIPT_FRAGMENT.len)); expect(receipt.is).toStrictEqual(new BN(MOCK_GQL_RECEIPT_FRAGMENT.is)); expect(receipt.pc).toStrictEqual(new BN(MOCK_GQL_RECEIPT_FRAGMENT.pc)); + expect(receipt.data).toStrictEqual(MOCK_GQL_RECEIPT_FRAGMENT.data); expect(receipt.ptr).toStrictEqual(new BN(MOCK_GQL_RECEIPT_FRAGMENT.ptr)); }); @@ -133,6 +134,7 @@ describe('assembleReceiptByType', () => { expect(receipt.len).toStrictEqual(new BN(MOCK_GQL_RECEIPT_FRAGMENT.len)); expect(receipt.val0).toStrictEqual(new BN(MOCK_GQL_RECEIPT_FRAGMENT.ra)); expect(receipt.val1).toStrictEqual(new BN(MOCK_GQL_RECEIPT_FRAGMENT.rb)); + expect(receipt.data).toStrictEqual(MOCK_GQL_RECEIPT_FRAGMENT.data); }); it('should return a ReceiptTransfer receipt when GqlReceiptType.Transfer is provided', () => { @@ -218,6 +220,7 @@ describe('assembleReceiptByType', () => { const amount = bn(MOCK_GQL_RECEIPT_FRAGMENT.amount); const data = arrayify(MOCK_GQL_RECEIPT_FRAGMENT.data || ''); const digest = MOCK_GQL_RECEIPT_FRAGMENT.digest; + const len = Number(MOCK_GQL_RECEIPT_FRAGMENT.len); const messageId = ReceiptMessageOutCoder.getMessageId({ sender, @@ -234,6 +237,7 @@ describe('assembleReceiptByType', () => { expect(receipt.nonce).toStrictEqual(nonce); expect(receipt.recipient).toStrictEqual(recipient); expect(receipt.sender).toStrictEqual(sender); + expect(receipt.len).toStrictEqual(len); expect(receipt.data).toStrictEqual(data); });