From d086607e77f67dbc38337683aa55c78f3b8fdb0a Mon Sep 17 00:00:00 2001 From: Mateusz Jasiuk Date: Fri, 27 Dec 2024 09:50:44 +0100 Subject: [PATCH] fix: cr comments --- apps/namadillo/src/atoms/balance/services.ts | 3 --- apps/namadillo/src/setupTests.ts | 7 +++++++ 2 files changed, 7 insertions(+), 3 deletions(-) diff --git a/apps/namadillo/src/atoms/balance/services.ts b/apps/namadillo/src/atoms/balance/services.ts index 2e33c6e10..585bf6960 100644 --- a/apps/namadillo/src/atoms/balance/services.ts +++ b/apps/namadillo/src/atoms/balance/services.ts @@ -80,9 +80,6 @@ export const fetchShieldedBalance = async ( addresses: string[], chainId: string ): Promise => { - // TODO mock shielded balance - // return await mockShieldedBalance(viewingKey); - const sdk = await getSdkInstance(); return await sdk.rpc.queryBalance(viewingKey.key, addresses, chainId); }; diff --git a/apps/namadillo/src/setupTests.ts b/apps/namadillo/src/setupTests.ts index d17ad566b..13c3e7448 100644 --- a/apps/namadillo/src/setupTests.ts +++ b/apps/namadillo/src/setupTests.ts @@ -13,3 +13,10 @@ jest.mock("atoms/integrations", () => ({ jest.mock("atoms/integrations/atoms", () => ({ localnetConfigAtom: atom({ data: undefined }), })); + +// Because we run tests in node environment, we need to mock inline-init as node-init +jest.mock( + "@namada/sdk/inline-init", + () => () => + Promise.resolve(jest.requireActual("@namada/sdk/node-init").default()) +);