From f59d4d0190fe48cbd0bcb81477c815c9e0db1abd Mon Sep 17 00:00:00 2001 From: Ahmad Kaouk Date: Thu, 23 May 2024 16:16:35 +0200 Subject: [PATCH] fix test --- test/suites/dev/moonbase/test-contract/test-eip-6780.ts | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/test/suites/dev/moonbase/test-contract/test-eip-6780.ts b/test/suites/dev/moonbase/test-contract/test-eip-6780.ts index 041c0cd952..8b66e1b7df 100644 --- a/test/suites/dev/moonbase/test-contract/test-eip-6780.ts +++ b/test/suites/dev/moonbase/test-contract/test-eip-6780.ts @@ -24,7 +24,7 @@ describeSuite({ "transaction that created the contract", test: async function () { // Get Code - const code = await context.polkadotJs().query.evm.accountCodes(contract); + const code = (await context.polkadotJs().query.evm.accountCodes(contract)).toHex(); // transfer some tokens to the contract await context.createBlock( @@ -47,8 +47,11 @@ describeSuite({ expectEVMResult(result!.events, "Succeed", "Suicided"); // Code should not be deleted - const postSuicideCode = await context.polkadotJs().query.evm.accountCodes(contract); - expect(postSuicideCode).toEqual(code); + const postSuicideCode = ( + await context.polkadotJs().query.evm.accountCodes(contract) + ).toHex(); + + expect(postSuicideCode).to.eq(code); // Nonce should be one expect((await context.polkadotJs().query.system.account(contract)).nonce.toBigInt()).to.eq(