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()) +);