Skip to content

Commit

Permalink
Migrate to Lens v3
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoginth committed Dec 13, 2024
1 parent 4ecefd3 commit e4648b1
Show file tree
Hide file tree
Showing 7 changed files with 10 additions and 10 deletions.
2 changes: 1 addition & 1 deletion apps/api/src/routes/ens/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import catchedError from "src/helpers/catchedError";
import { resolverAbi } from "src/helpers/ens/resolverAbi";
import { rateLimiter } from "src/helpers/middlewares/rateLimiter";
import { invalidBody, noBody } from "src/helpers/responses";
import { http, createPublicClient, fallback } from "viem";
import { createPublicClient, fallback, http } from "viem";
import { mainnet } from "viem/chains";
import { array, object, string } from "zod";

Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/routes/internal/tokens/create.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ interface ExtensionRequest {
}

const validationSchema = object({
contractAddress: string().min(1).max(42).regex(Regex.ethereumAddress),
contractAddress: string().min(1).max(42).regex(Regex.evmAddress),
decimals: number().min(0).max(18),
name: string().min(1).max(100),
symbol: string().min(1).max(100)
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Pages/Privacy.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ const Privacy: NextPage = () => {
<p className="leading-7">
This Privacy Policy does not apply to websites, apps, products,
or services that we do not own or control. For example, your
interactions with Ethereum wallet are governed by the applicable
interactions with EVM wallet are governed by the applicable
privacy policies of that particular wallet.
</p>
{/* 4. Third-Parties ends */}
Expand Down
2 changes: 1 addition & 1 deletion apps/web/src/components/Staff/Tokens/Create.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ const validationSchema = object({
contractAddress: string()
.min(1)
.max(42)
.regex(Regex.ethereumAddress, { message: "Invalid Ethereum address" }),
.regex(Regex.evmAddress, { message: "Invalid EVM address" }),
decimals: string().min(1, { message: "Decimals is required" }),
name: string().min(1, { message: "Name is required" }),
symbol: string().min(1, { message: "Symbol is required" })
Expand Down
2 changes: 1 addition & 1 deletion packages/data/regex.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ const EDITOR_GROUP = "([\\dA-Za-z]\\w*)"; // This will start searching for group

export const Regex = {
cashtag: /(\$\w*[A-Za-z]\w*)/g,
ethereumAddress: /^(0x)?[\da-f]{40}$/i,
evmAddress: /^(0x)?[\da-f]{40}$/i,
username: /^[\dA-Za-z]\w{2,25}$/g,
hashtag: /(#\w*[A-Za-z]\w*)/g,
// Match string like @lens/someone.
Expand Down
6 changes: 3 additions & 3 deletions packages/helpers/formatAddress.ts
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
import { isAddress } from "viem";

/**
* Format the given Ethereum address by displaying only the first and last few characters.
* Format the given EVM address by displaying only the first and last few characters.
*
* @param address Complete Ethereum address
* @param address Complete EVM address
* @param slice Number of characters to display from the start and end of the address
* @returns Formatted Ethereum address
* @returns Formatted EVM address
*/
const formatAddress = (address: null | string, slice = 4): string => {
if (!address) {
Expand Down
4 changes: 2 additions & 2 deletions packages/helpers/resolveEns.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,8 +2,8 @@ import { HEY_API_URL } from "@hey/data/constants";
import axios from "axios";

/**
* Resolves ENS names for the specified Ethereum addresses.
* @param addresses An array of Ethereum addresses.
* Resolves ENS names for the specified EVM addresses.
* @param addresses An array of EVM addresses.
* @returns An array of ENS names.
*/
const resolveEns = async (addresses: string[]) => {
Expand Down

0 comments on commit e4648b1

Please sign in to comment.