Skip to content

Commit

Permalink
chore: fix props for domain-services test
Browse files Browse the repository at this point in the history
  • Loading branch information
valpinkman authored and gre committed Sep 28, 2023
1 parent 7084b9f commit 9ab00c8
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
6 changes: 1 addition & 5 deletions apps/ledger-live-mobile/src/screens/Swap/Form/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,7 @@ import { useNavigation } from "@react-navigation/native";
import { KeyboardAwareScrollView } from "react-native-keyboard-aware-scroll-view";
import { Button, Flex } from "@ledgerhq/native-ui";
import { ExchangeRate, OnNoRatesCallback } from "@ledgerhq/live-common/exchange/swap/types";
import {
useSwapTransaction,
useSwapProviders,
usePageState,
} from "@ledgerhq/live-common/exchange/swap/hooks/index";
import { useSwapTransaction, usePageState } from "@ledgerhq/live-common/exchange/swap/hooks/index";
import { getCustomDappUrl } from "@ledgerhq/live-common/exchange/swap/utils/index";
import { useFeature } from "@ledgerhq/live-common/featureFlags/index";
import { useDispatch, useSelector } from "react-redux";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ const CustomTest = ({ str }: { str: string }) => {
);
};

const wrapper: React.ComponentType<string> = ({ children }) => (
const wrapper: React.ComponentType<{ children?: React.ReactNode }> = ({ children }) => (
<DomainServiceProvider>{children}</DomainServiceProvider>
);

Expand All @@ -65,6 +65,7 @@ describe("useDomain", () => {
it("should return an error when no resolution is found", async () => {
const { result } = renderHook(useDomain, {
initialProps: "",
// @ts-expect-error weird ts error
wrapper,
});

Expand All @@ -76,6 +77,7 @@ describe("useDomain", () => {
it("should return an error when no resolution is found", async () => {
const { result, waitForValueToChange } = renderHook(useDomain, {
initialProps: "404-Not-Found.eth",
// @ts-expect-error weird ts error
wrapper,
});

Expand All @@ -87,6 +89,7 @@ describe("useDomain", () => {
it("should return an error when the input has a forward registry but content is invalid", async () => {
const { result, waitForValueToChange } = renderHook(useDomain, {
initialProps: "not|valid|👋.eth",
// @ts-expect-error weird ts error
wrapper,
});

Expand Down

0 comments on commit 9ab00c8

Please sign in to comment.