Skip to content

Commit

Permalink
fix(explorer): The search is case sensitive (#747)
Browse files Browse the repository at this point in the history
  • Loading branch information
satyajeetkolhapure authored Oct 9, 2024
1 parent d7d92df commit b0f0d9c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions explorer/src/utils/searchUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,8 +47,12 @@ export const parseSearch = (search: string | null, chainPrefix: Hex): Partial<Re
const hexNumbers = rawNumbers.map((num) => buildAttestationId(Number(num), chainPrefix));
const attestationIds = [...potentialAttestationIds, ...hexNumbers];

const defaultAddresses = filterByRegex(startsWith0x, regexEthAddress.byNumberOfChar[42]);
const longAddresses = filterByRegex(startsWith0x, regexEthAddress.byNumberOfChar[64]);
const defaultAddresses = filterByRegex(startsWith0x, regexEthAddress.byNumberOfChar[42]).map((address) =>
address.toLowerCase(),
);
const longAddresses = filterByRegex(startsWith0x, regexEthAddress.byNumberOfChar[64]).map((longAddress) =>
longAddress.toLowerCase(),
);

const urls = filterByRegex(splitSearchBySpace, urlRegex);
const allStrings = [...urls, ...defaultAddresses, ...longAddresses, ...attestationIds];
Expand Down

0 comments on commit b0f0d9c

Please sign in to comment.