Skip to content

Commit

Permalink
cleanup: revert env changes
Browse files Browse the repository at this point in the history
  • Loading branch information
BrickheadJohnny committed Jul 23, 2024
1 parent e6f7e90 commit 36e3452
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 8 deletions.
5 changes: 0 additions & 5 deletions src/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,6 @@ export const env = createEnv({
NEXT_PUBLIC_GOOGLE_CLIENT_ID: z.string(),
NEXT_PUBLIC_GOOGLE_SERVICE_ACCOUNT_EMAIL: z.string(),
NEXT_PUBLIC_WALLETCONNECT_PROJECT_ID: z.string(),

// E2E
NEXT_PUBLIC_E2E_WALLET_MNEMONIC: z.string(),
},
runtimeEnv: {
NEXT_PUBLIC_API: process.env.NEXT_PUBLIC_API,
Expand Down Expand Up @@ -134,7 +131,5 @@ export const env = createEnv({

WAAS_VIEM_URL: process.env.WAAS_VIEM_URL,
WAAS_WEB_URL: process.env.WAAS_WEB_URL,

NEXT_PUBLIC_E2E_WALLET_MNEMONIC: process.env.NEXT_PUBLIC_E2E_WALLET_MNEMONIC,
},
})
10 changes: 7 additions & 3 deletions src/wagmiConfig/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ export const wagmiConfig = createConfig({
[blastSepolia.id]: http(),
[oasisSapphire.id]: http(),
[sepolia.id]: http(
env.NEXT_PUBLIC_E2E_WALLET_MNEMONIC
process.env.NEXT_PUBLIC_E2E_WALLET_MNEMONIC
? "http://localhost:8545"
: "https://ethereum-sepolia-rpc.publicnode.com"
),
Expand All @@ -196,10 +196,14 @@ export const wagmiConfig = createConfig({
},
ssr: true,
connectors:
typeof navigator !== "undefined" && navigator.userAgent.includes("GUILD_E2E")
typeof navigator !== "undefined" &&
navigator.userAgent.includes("GUILD_E2E") &&
process.env.NEXT_PUBLIC_E2E_WALLET_MNEMONIC
? [
mock({
accounts: [mnemonicToAccount(env.NEXT_PUBLIC_E2E_WALLET_MNEMONIC)],
accounts: [
mnemonicToAccount(process.env.NEXT_PUBLIC_E2E_WALLET_MNEMONIC),
],
features: {
reconnect: true,
},
Expand Down

0 comments on commit 36e3452

Please sign in to comment.