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 1bf1add commit fb4e9a8
Show file tree
Hide file tree
Showing 8 changed files with 11 additions and 17 deletions.
6 changes: 3 additions & 3 deletions apps/api/src/helpers/getRpc.ts
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import { LENS_TESTNET_RPCS, POLYGON_RPCS } from "@hey/data/rpcs";
import { LENS_TESTNET_RPCS } from "@hey/data/rpcs";
import type { FallbackTransport } from "viem";
import { http, fallback } from "viem";
import { fallback, http } from "viem";

const getRpc = ({ mainnet }: { mainnet: boolean }): FallbackTransport => {
if (mainnet) {
return fallback(POLYGON_RPCS.map((rpc) => http(rpc)));
return fallback(LENS_TESTNET_RPCS.map((rpc) => http(rpc)));
}

return fallback(LENS_TESTNET_RPCS.map((rpc) => http(rpc)));
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/routes/account/status/clear.ts
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ export const post = [
});

await delRedis(`account:${payload.act.sub}`);
logger.info(`Cleared profile status for ${payload.act.sub}`);
logger.info(`Cleared account status for ${payload.act.sub}`);

return res.status(200).json({ result: accountStatus, success: true });
} catch (error) {
Expand Down
2 changes: 1 addition & 1 deletion apps/api/src/routes/internal/permissions/assign.ts
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ export const postUpdateTasks = async (
<p>Hey Hey!</p>
<br />
<p>Yay! Your account on ${APP_NAME} has been verified! ✅</p>
<a href="https://hey.xyz/account/${accountAddress}">Visit your profile →</a>
<a href="https://hey.xyz/account/${accountAddress}">Visit your account →</a>
<br />
<p>Thanks,</p>
<p>${APP_NAME} team</p>
Expand Down
4 changes: 2 additions & 2 deletions apps/og/src/app/posts/[id]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -60,8 +60,8 @@ export const generateMetadata = async ({
"social media post",
"social media",
"lenster",
"polygon",
"profile post",
"zksync",
"account post",
"like",
"share",
"post",
Expand Down
2 changes: 1 addition & 1 deletion apps/og/src/app/u/[username]/page.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ export const generateMetadata = async ({
"social media profile",
"social media",
"lenster",
"polygon",
"zksync",
"profile",
"lens",
"lens protocol",
Expand Down
2 changes: 1 addition & 1 deletion apps/og/src/defaultMetadata.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const defaultMetadata: Metadata = {
"hey.xyz",
"social media",
"lenster",
"polygon",
"zksync",
"lens",
"lens protocol",
"decentralized",
Expand Down
4 changes: 2 additions & 2 deletions apps/web/src/components/Common/Providers/Web3Provider.tsx
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { APP_NAME, WALLETCONNECT_PROJECT_ID } from "@hey/data/constants";
import { LENS_TESTNET_RPCS, POLYGON_RPCS } from "@hey/data/rpcs";
import { LENS_TESTNET_RPCS } from "@hey/data/rpcs";
import { chains } from "@lens-network/sdk/viem";
import type { FC, ReactNode } from "react";
import { createConfig, fallback, http, WagmiProvider } from "wagmi";
Expand All @@ -15,7 +15,7 @@ const wagmiConfig = createConfig({
chains: [chains.testnet, chains.testnet],
connectors,
transports: {
[chains.testnet.id]: fallback(POLYGON_RPCS.map((rpc) => http(rpc))),
[chains.testnet.id]: fallback(LENS_TESTNET_RPCS.map((rpc) => http(rpc))),
[chains.testnet.id]: fallback(LENS_TESTNET_RPCS.map((rpc) => http(rpc)))
}
});
Expand Down
6 changes: 0 additions & 6 deletions packages/data/rpcs.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1 @@
export const POLYGON_RPCS = [
"https://polygon-rpc.com",
"https://polygon-bor-rpc.publicnode.com",
"https://polygon.drpc.org"
];

export const LENS_TESTNET_RPCS = ["https://rpc.testnet.lens.dev"];

0 comments on commit fb4e9a8

Please sign in to comment.