-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fix: cached parseAbi inputs/outputs (#277)
- Loading branch information
1 parent
324d1cd
commit ec9cba8
Showing
9 changed files
with
140 additions
and
35 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
import * as mantineHooks from "@mantine/hooks"; | ||
import { notifications } from "@mantine/notifications"; | ||
import { | ||
cleanup, | ||
|
@@ -19,7 +20,6 @@ import withMantineTheme from "../../utils/WithMantineTheme"; | |
import { encodedDataSamples } from "./encodedData.stubs"; | ||
import { JotaiTestProvider } from "./jotaiHelpers"; | ||
import { erc1155JSONABISpecStub } from "./specification.stubs"; | ||
import * as mantineHooks from "@mantine/hooks"; | ||
|
||
vi.mock("@mantine/hooks", async () => { | ||
const actual = await vi.importActual<typeof mantineHooks>("@mantine/hooks"); | ||
|
@@ -687,7 +687,7 @@ describe("Specification Form View", () => { | |
|
||
expect( | ||
screen.getByText( | ||
`Unknown type. Type "bla" is not a valid ABI type. Version: [email protected].0`, | ||
`Unknown type. Type "bla" is not a valid ABI type. Version: [email protected].7`, | ||
), | ||
).toBeInTheDocument(); | ||
}); | ||
|
@@ -712,7 +712,7 @@ describe("Specification Form View", () => { | |
|
||
expect( | ||
screen.getByText( | ||
`Invalid ABI parameter. "address" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html Details: uint address Version: [email protected].0`, | ||
`Invalid ABI parameter. "address" is a protected Solidity keyword. More info: https://docs.soliditylang.org/en/latest/cheatsheet.html Details: uint address Version: [email protected].7`, | ||
), | ||
).toBeInTheDocument(); | ||
}); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
import { fireEvent, render, screen, waitFor } from "@testing-library/react"; | ||
import { AbiFunction, getAddress, stringToHex } from "viem"; | ||
import { afterAll, describe, it } from "vitest"; | ||
import { GenericInputForm } from "../../src/GenericInputForm"; | ||
import withMantineTheme from "../utils/WithMantineTheme"; | ||
import { AbiFunction, getAddress, stringToHex } from "viem"; | ||
import { abiParam, formSpecification, functionSignature } from "./mocks"; | ||
|
||
const Component = withMantineTheme(GenericInputForm); | ||
|
@@ -819,7 +819,7 @@ describe("GenericInputForm", () => { | |
}); | ||
expect( | ||
screen.getByText( | ||
"Unknown signature. Details: invalid-value Version: [email protected].0", | ||
"Unknown signature. Details: invalid-value Version: [email protected].7", | ||
), | ||
).toBeInTheDocument(); | ||
|
||
|
@@ -1022,7 +1022,7 @@ describe("GenericInputForm", () => { | |
}); | ||
expect( | ||
screen.getByText( | ||
"Invalid ABI parameter. Details: invalid-value Version: [email protected].0", | ||
"Invalid ABI parameter. Details: invalid-value Version: [email protected].7", | ||
), | ||
).toBeInTheDocument(); | ||
fireEvent.change(abiParameterInput, { | ||
|
Oops, something went wrong.