Skip to content

Commit 89201e4

Browse files
fix: normalize address and ID inputs to lowercase in details pages (#52)
* fix: normalize address and ID inputs to lowercase in details pages * chore: update Node.js and npm version requirements in README * chore: reorder script entry from README
1 parent bb15401 commit 89201e4

File tree

9 files changed

+10
-11
lines changed

9 files changed

+10
-11
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020
## Quick Start
2121

2222
### Prerequisites
23-
- Node.js >= 18
24-
- npm >= 9
23+
- Node.js >= 22
24+
- npm >= 10
2525

2626
### Install
2727
```bash
@@ -56,13 +56,13 @@ npm run preview
5656
```
5757

5858
## Useful Scripts
59+
- `npm run codegen` — GraphQL types
5960
- `npm run dev` — start dev server
6061
- `npm run build` — production build
6162
- `npm run preview` — preview build
6263
- `npm run lint` — lint code
6364
- `npm run check-type` — TypeScript check
6465
- `npm run format` — Prettier format
65-
- `npm run codegen` — GraphQL types
6666

6767
## Tech Stack
6868
- **React 19** + TypeScript

src/routes/$chainSlug/_layout/address/$addressAddress.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ function AddressRoute() {
8484
hasPastError,
8585
isValid,
8686
error,
87-
} = useAddressData(addressAddress, chainId!);
87+
} = useAddressData((addressAddress as string).toLowerCase(), chainId!);
8888

8989
const addressDetails = address ? buildAddressDetails({ address }) : undefined;
9090
const addressOverview = address

src/routes/$chainSlug/_layout/app/$appAddress.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ function AppsRoute() {
6565
hasPastError,
6666
isValid,
6767
error,
68-
} = useAppData(appAddress, chainId!);
68+
} = useAppData((appAddress as string).toLowerCase(), chainId!);
6969

7070
const appDetails = app ? buildAppDetails({ app }) : undefined;
7171

src/routes/$chainSlug/_layout/dataset/$datasetAddress.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function DatasetsRoute() {
6767
hasPastError,
6868
isValid,
6969
error,
70-
} = useDatasetData(datasetAddress, chainId!);
70+
} = useDatasetData((datasetAddress as string).toLowerCase(), chainId!);
7171

7272
const datasetDetails = dataset ? buildDatasetDetails({ dataset }) : undefined;
7373

src/routes/$chainSlug/_layout/deal/$dealId.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function DealsRoute() {
6969
hasPastError,
7070
isValid,
7171
error,
72-
} = useDealData(dealId, chainId!);
72+
} = useDealData((dealId as string).toLowerCase(), chainId!);
7373

7474
const dealDetails = deal
7575
? buildDealDetails({ deal, isConnected })

src/routes/$chainSlug/_layout/search/$search.tsx

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@ import { createFileRoute, redirect } from '@tanstack/react-router';
33
export const Route = createFileRoute('/$chainSlug/_layout/search/$search')({
44
loader: ({ params }) => {
55
const { chainSlug, search } = params;
6-
console.log('$search', chainSlug, search);
76

87
return redirect({
98
to: `/${chainSlug}?search=${encodeURIComponent(search)}`,

src/routes/$chainSlug/_layout/task/$taskId.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,7 @@ function TasksRoute() {
6363
hasPastError,
6464
isValid,
6565
error,
66-
} = useTaskData(taskId, chainId!);
66+
} = useTaskData((taskId as string).toLowerCase(), chainId!);
6767

6868
const taskDetails = task ? buildTaskDetails({ task }) : undefined;
6969

src/routes/$chainSlug/_layout/tx/$txHash.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ function TransactionsRoute() {
7777
hasPastError,
7878
isValid,
7979
error,
80-
} = useTransactionData(txHash, chainId!);
80+
} = useTransactionData((txHash as string).toLowerCase(), chainId!);
8181

8282
const transactionDetails = transaction
8383
? buildTransactionDetails({ transaction })

src/routes/$chainSlug/_layout/workerpool/$workerpoolAddress.tsx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ function WorkerpoolsRoute() {
6767
hasPastError,
6868
isValid,
6969
error,
70-
} = useWorkerpoolData(workerpoolAddress, chainId!);
70+
} = useWorkerpoolData((workerpoolAddress as string).toLowerCase(), chainId!);
7171

7272
const workerpoolDetails = workerpool
7373
? buildWorkerpoolDetails({ workerpool })

0 commit comments

Comments
 (0)