From 98f7b599e1f1375c8c75f19cd8fa9e8318bd688b Mon Sep 17 00:00:00 2001 From: jawndiego Date: Mon, 24 Jun 2024 17:03:03 -0400 Subject: [PATCH] clients --- apps/site/app/api/registerFor/route.ts | 2 +- apps/site/config/syndicateClient.ts | 30 ++------------------------ 2 files changed, 3 insertions(+), 29 deletions(-) diff --git a/apps/site/app/api/registerFor/route.ts b/apps/site/app/api/registerFor/route.ts index 63971565..ae162873 100644 --- a/apps/site/app/api/registerFor/route.ts +++ b/apps/site/app/api/registerFor/route.ts @@ -16,7 +16,7 @@ export async function POST(req: NextRequest) { const registerTx = // biome-ignore lint: - await syndicateClientIdRegistry!.officialActions.transact.sendTransaction( + await syndicateClientIdRegistry!.transact.sendTransaction( generateIdRegistryInput({ to, recovery, deadline, sig }), ) diff --git a/apps/site/config/syndicateClient.ts b/apps/site/config/syndicateClient.ts index 88ca5f6b..cd8d5346 100644 --- a/apps/site/config/syndicateClient.ts +++ b/apps/site/config/syndicateClient.ts @@ -69,31 +69,5 @@ export const generateIdRegistryInput = (register: Register) => ({ }, }) -const apiPostKey = process.env.SYNDICATE_POST_API_KEY -const apiIdKey = process.env.SYNDICATE_ID_API_KEY - -// export const syndicateClientPost = -// projectIdPost !== 'Error' && apiPostKey -// ? { -// officialActions: new SyndicateClient({ -// token: () => apiPostKey, -// }), -// projectId: projectIdPost, -// generatePostTxnInput, -// generatePostBatchTxnInput, - -// } -// : null - -export const syndicateClientPost = new SyndicateClient({ token: apiPostKey as string }) - -export const syndicateClientIdRegistry = - projectIdRegistry !== 'Error' && apiIdKey - ? { - officialActions: new SyndicateClient({ - token: () => apiIdKey, - }), - projectId: projectIdRegistry, - generateIdRegistryInput, - } - : null +export const syndicateClientPost = new SyndicateClient({ token: process.env.SYNDICATE_POST_API_KEY as string }) +export const syndicateClientIdRegistry = new SyndicateClient({ token: process.env.SYNDICATE_ID_API_KEY as string }) \ No newline at end of file