@@ -96,9 +96,6 @@ async function codegenHasura(env: DotEnv) {
9696
9797 const clientTemplate = `import { createServerHasuraClient } from "@settlemint/sdk-hasura";
9898import type { introspection } from "../../hasura-env.d.ts";
99- import { loadEnv } from "@settlemint/sdk-utils/environment";
100-
101- const env = loadEnv(true, process.env.SETTLEMINT_ENVIRONMENT);
10299
103100export const { client: hasuraClient, graphql: hasuraGraphql } = createServerHasuraClient<{
104101 introspection: introspection;
@@ -108,9 +105,9 @@ export const { client: hasuraClient, graphql: hasuraGraphql } = createServerHasu
108105 JSON: Record<string, unknown>;
109106 };
110107}>({
111- instance: env.SETTLEMINT_HASURA_ENDPOINT!,
112- accessToken: env.SETTLEMINT_ACCESS_TOKEN!,
113- adminSecret: env.SETTLEMINT_HASURA_ADMIN_SECRET!,
108+ instance: process. env.SETTLEMINT_HASURA_ENDPOINT!,
109+ accessToken: process. env.SETTLEMINT_ACCESS_TOKEN!,
110+ adminSecret: process. env.SETTLEMINT_HASURA_ADMIN_SECRET!,
114111});` ;
115112
116113 await writeTemplate ( clientTemplate , "/lib/settlemint" , "hasura.ts" ) ;
@@ -134,9 +131,6 @@ async function codegenPortal(env: DotEnv) {
134131
135132 const clientTemplate = `import { createServerPortalClient } from "@settlemint/sdk-portal";
136133import type { introspection } from "../../portal-env.d.ts";
137- import { loadEnv } from "@settlemint/sdk-utils/environment";
138-
139- const env = loadEnv(true, process.env.SETTLEMINT_ENVIRONMENT);
140134
141135export const { client: portalClient, graphql: portalGraphql } = createServerPortalClient<{
142136 introspection: introspection;
@@ -146,8 +140,8 @@ export const { client: portalClient, graphql: portalGraphql } = createServerPort
146140 JSON: Record<string, unknown>;
147141 };
148142}>({
149- instance: env.SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT!,
150- accessToken: env.SETTLEMINT_ACCESS_TOKEN!,
143+ instance: process. env.SETTLEMINT_PORTAL_GRAPHQL_ENDPOINT!,
144+ accessToken: process. env.SETTLEMINT_ACCESS_TOKEN!,
151145});` ;
152146
153147 await writeTemplate ( clientTemplate , "/lib/settlemint" , "portal.ts" ) ;
@@ -198,9 +192,6 @@ async function codegenTheGraph(env: DotEnv) {
198192
199193 const clientTemplate = `import { createServerTheGraphClient } from "@settlemint/sdk-thegraph";
200194import type { introspection } from "../../the-graph-env.d.ts";
201- import { loadEnv } from "@settlemint/sdk-utils/environment";
202-
203- const env = loadEnv(true, process.env.SETTLEMINT_ENVIRONMENT);
204195
205196export const { client: theGraphClient, graphql: theGraphGraphql } = createServerTheGraphClient<{
206197 introspection: introspection;
@@ -210,8 +201,8 @@ export const { client: theGraphClient, graphql: theGraphGraphql } = createServer
210201 JSON: Record<string, unknown>;
211202 };
212203}>({
213- instance: env.SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT!,
214- accessToken: env.SETTLEMINT_ACCESS_TOKEN!,
204+ instance: process. env.SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT!,
205+ accessToken: process. env.SETTLEMINT_ACCESS_TOKEN!,
215206});` ;
216207
217208 await writeTemplate ( clientTemplate , "/lib/settlemint" , "the-graph.ts" ) ;
@@ -235,9 +226,6 @@ async function codegenTheGraphFallback(env: DotEnv) {
235226
236227 const clientTemplate = `import { createServerTheGraphClient } from "@settlemint/sdk-thegraph";
237228import type { introspection } from "../../the-graph-fallback-env.d.ts";
238- import { loadEnv } from "@settlemint/sdk-utils/environment";
239-
240- const env = loadEnv(true, process.env.SETTLEMINT_ENVIRONMENT);
241229
242230export const { client: theGraphFallbackClient, graphql: theGraphFallbackGraphql } = createServerTheGraphClient<{
243231 introspection: introspection;
@@ -247,8 +235,8 @@ export const { client: theGraphFallbackClient, graphql: theGraphFallbackGraphql
247235 JSON: Record<string, unknown>;
248236 };
249237}>({
250- instance: env.SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK!,
251- accessToken: env.SETTLEMINT_ACCESS_TOKEN!,
238+ instance: process. env.SETTLEMINT_THEGRAPH_SUBGRAPH_ENDPOINT_FALLBACK!,
239+ accessToken: process. env.SETTLEMINT_ACCESS_TOKEN!,
252240});` ;
253241
254242 await writeTemplate ( clientTemplate , "/lib/settlemint" , "the-graph-fallback.ts" ) ;
0 commit comments