-
+
diff --git a/src/use4Bytes.ts b/src/use4Bytes.ts
index 11f29d2..dad9f75 100644
--- a/src/use4Bytes.ts
+++ b/src/use4Bytes.ts
@@ -4,12 +4,10 @@ import { fourBytesURL } from "./url";
const cache = new Map
();
-export const use4Bytes = (data: string) => {
+export const use4Bytes = (rawFourBytes: string) => {
const runtime = useContext(RuntimeContext);
const assetsURLPrefix = runtime.config?.assetsURLPrefix;
- let rawFourBytes = data.slice(0, 10);
-
const [name, setName] = useState();
const [fourBytes, setFourBytes] = useState();
useEffect(() => {
@@ -45,7 +43,7 @@ export const use4Bytes = (data: string) => {
});
}, [rawFourBytes, assetsURLPrefix, fourBytes]);
- if (data === "0x") {
+ if (rawFourBytes === "0x") {
return "Transfer";
}
if (assetsURLPrefix === undefined) {