Skip to content

Commit

Permalink
configure client wagmi provider with api keys (#217)
Browse files Browse the repository at this point in the history
Signed-off-by: Aaron Sutula <asutula@users.noreply.github.com>
Co-authored-by: Aaron Sutula <asutula@users.noreply.github.com>
  • Loading branch information
asutula and asutula authored Mar 8, 2024
1 parent 1eab762 commit 63837ea
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
4 changes: 2 additions & 2 deletions packages/cli/.env.example
Original file line number Diff line number Diff line change
Expand Up @@ -6,5 +6,5 @@ SESSION_COOKIE_NAME="STUDIO_SESSION"
SESSION_COOKIE_PASS="secure password secure password secure password secure password secure password secure password secure password"
DATA_SEAL_PASS="secure password secure password secure password secure password secure password secure password secure password"
POSTMARK_API_KEY=fillme(optional)
API_ROUTER_INFURA_KEY="api key"
API_ROUTER_QUICK_NODE_KEY="api key"
NEXT_PUBLIC_API_ROUTER_INFURA_KEY="api key"
NEXT_PUBLIC_API_ROUTER_QUICK_NODE_KEY="api key"
4 changes: 4 additions & 0 deletions packages/web/components/wagmi-provider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ const { chains, publicClient, webSocketPublicClient } = configuredChains(
typeof window !== "undefined" &&
(window.location?.hostname === "localhost" ||
window.location?.hostname === "127.0.0.1"),
{
infura: process.env.NEXT_PUBLIC_API_ROUTER_INFURA_KEY ?? "",
quickNode: process.env.NEXT_PUBLIC_API_ROUTER_QUICK_NODE_KEY ?? "",
},
);

const config = createConfig({
Expand Down
4 changes: 2 additions & 2 deletions packages/web/lib/api-router.ts
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,6 @@ export const apiRouter = appRouter(
(seal) => `${baseUrl}/invite?seal=${seal}`,
process.env.DATA_SEAL_PASS!,
process.env.NODE_ENV === "development",
process.env.API_ROUTER_INFURA_KEY ?? "",
process.env.API_ROUTER_QUICK_NODE_KEY ?? "",
process.env.NEXT_PUBLIC_API_ROUTER_INFURA_KEY ?? "",
process.env.NEXT_PUBLIC_API_ROUTER_QUICK_NODE_KEY ?? "",
);

0 comments on commit 63837ea

Please sign in to comment.