From f63efb11e64cb599e79c7a6007f065ac9f8ea364 Mon Sep 17 00:00:00 2001 From: aakash-taneja Date: Sat, 14 Dec 2024 11:47:12 +0530 Subject: [PATCH] updated recovershard and revoke to handle new error response --- .../recoverShards/test/recoverShards.test.ts | 2 +- src/methods/revokeAccess/test/revoke.test.ts | 14 ++++++-------- 2 files changed, 7 insertions(+), 9 deletions(-) diff --git a/src/methods/recoverShards/test/recoverShards.test.ts b/src/methods/recoverShards/test/recoverShards.test.ts index a0c4c40..8c8c82b 100644 --- a/src/methods/recoverShards/test/recoverShards.test.ts +++ b/src/methods/recoverShards/test/recoverShards.test.ts @@ -97,6 +97,6 @@ describe("recoverShards:", () => { 5 ); expect(shards).toEqual([]); - expect(error?.message).toBe("Access Denied"); + expect(error?.message?.message?.message).toBe("Access Denied"); }, 20000); }); diff --git a/src/methods/revokeAccess/test/revoke.test.ts b/src/methods/revokeAccess/test/revoke.test.ts index e7b5b8b..90578dc 100644 --- a/src/methods/revokeAccess/test/revoke.test.ts +++ b/src/methods/revokeAccess/test/revoke.test.ts @@ -1,16 +1,16 @@ -import _package from "../.." -import { ethers } from "ethers" -import { getAuthMessage } from "../../getAuthMessage" +import _package from "../.."; +import { ethers } from "ethers"; +import { getAuthMessage } from "../../getAuthMessage"; describe("revoke file address", () => { let signer, signer2; beforeAll(async () => { signer = new ethers.Wallet( - "0x8218aa5dbf4dbec243142286b93e26af521b3e91219583595a06a7765abc9c8b", + "0x8218aa5dbf4dbec243142286b93e26af521b3e91219583595a06a7765abc9c8b" ); signer2 = new ethers.Wallet( - "0x8218aa5dbf4dbec243142286b93e26af521b3e91219583595a06a7765abc9c8a", + "0x8218aa5dbf4dbec243142286b93e26af521b3e91219583595a06a7765abc9c8a" ); }); @@ -52,8 +52,6 @@ describe("revoke file address", () => { [signer2.address] ); expect(isSuccess).toBe(false); - expect(error.message).toMatch(/Access Denied/i); + expect(error.message.message.message).toMatch(/Access Denied/i); }, 20000); - - });