Skip to content

Commit

Permalink
fix env vars
Browse files Browse the repository at this point in the history
  • Loading branch information
notV4l committed Feb 6, 2024
1 parent 974f92a commit 1d99bec
Showing 1 changed file with 5 additions and 15 deletions.
20 changes: 5 additions & 15 deletions web/src/dojo/setup/config.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,20 @@

import manifest from "../../../manifest.json";

const {
NEXT_PUBLIC_RPC_ENDPOINT,
NEXT_PUBLIC_GRAPHQL_ENDPOINT,
NEXT_PUBLIC_GRAPHQL_ENDPOINT_WS,
NEXT_PUBLIC_ADMIN_ADDRESS,
NEXT_PUBLIC_ADMIN_PRIVATE_KEY,
NEXT_PUBLIC_ACCOUNT_CLASS_HASH
} = process.env


export type Config = ReturnType<typeof dojoConfig>;

export function dojoConfig() {
return {
rpcUrl: NEXT_PUBLIC_RPC_ENDPOINT || "http://localhost:5050",
toriiUrl: NEXT_PUBLIC_GRAPHQL_ENDPOINT || "http://0.0.0.0:8080",
rpcUrl: process.env.NEXT_PUBLIC_RPC_ENDPOINT || "http://localhost:5050",
toriiUrl: process.env.NEXT_PUBLIC_GRAPHQL_ENDPOINT || "http://0.0.0.0:8080",
masterAddress:
NEXT_PUBLIC_ADMIN_ADDRESS ||
process.env.NEXT_PUBLIC_ADMIN_ADDRESS ||
"0x6162896d1d7ab204c7ccac6dd5f8e9e7c25ecd5ae4fcb4ad32e57786bb46e03",
masterPrivateKey:
NEXT_PUBLIC_ADMIN_PRIVATE_KEY ||
process.env.NEXT_PUBLIC_ADMIN_PRIVATE_KEY ||
"0x1800000000300000180000000000030000000000003006001800006600",
accountClassHash:
NEXT_PUBLIC_ACCOUNT_CLASS_HASH ||
process.env.NEXT_PUBLIC_ACCOUNT_CLASS_HASH ||
"0x05400e90f7e0ae78bd02c77cd75527280470e2fe19c54970dd79dc37a9d3645c",
manifest,
}
Expand Down

0 comments on commit 1d99bec

Please sign in to comment.