From 8c30bc4f376713548ce532de4c75207750ea2d9c Mon Sep 17 00:00:00 2001 From: derekpierre Date: Thu, 15 Aug 2024 16:59:27 -0400 Subject: [PATCH] Fix linting errors post-rebase. --- examples/taco/nextjs/src/hooks/useTaco.ts | 7 +------ examples/taco/nodejs/src/index.ts | 7 +------ examples/taco/react/src/hooks/useTaco.ts | 7 +------ packages/shared/src/porter.ts | 4 +--- packages/taco/src/taco.ts | 4 +++- packages/test-utils/src/utils.ts | 8 +++++--- 6 files changed, 12 insertions(+), 25 deletions(-) diff --git a/examples/taco/nextjs/src/hooks/useTaco.ts b/examples/taco/nextjs/src/hooks/useTaco.ts index 36a14160..abcd7efd 100644 --- a/examples/taco/nextjs/src/hooks/useTaco.ts +++ b/examples/taco/nextjs/src/hooks/useTaco.ts @@ -39,12 +39,7 @@ export default function useTaco({ USER_ADDRESS_PARAM_DEFAULT, authProvider, ); - return decrypt( - provider, - domain, - messageKit, - conditionContext, - ); + return decrypt(provider, domain, messageKit, conditionContext); }, [isInit, provider, domain], ); diff --git a/examples/taco/nodejs/src/index.ts b/examples/taco/nodejs/src/index.ts index c38117da..7b31aa5c 100644 --- a/examples/taco/nodejs/src/index.ts +++ b/examples/taco/nodejs/src/index.ts @@ -117,12 +117,7 @@ const decryptFromBytes = async (encryptedBytes: Uint8Array) => { const conditionContext = conditions.context.ConditionContext.fromMessageKit(messageKit); conditionContext.addAuthProvider(USER_ADDRESS_PARAM_DEFAULT, authProvider); - return decrypt( - provider, - domain, - messageKit, - conditionContext, - ); + return decrypt(provider, domain, messageKit, conditionContext); }; const runExample = async () => { diff --git a/examples/taco/react/src/hooks/useTaco.ts b/examples/taco/react/src/hooks/useTaco.ts index 36a14160..abcd7efd 100644 --- a/examples/taco/react/src/hooks/useTaco.ts +++ b/examples/taco/react/src/hooks/useTaco.ts @@ -39,12 +39,7 @@ export default function useTaco({ USER_ADDRESS_PARAM_DEFAULT, authProvider, ); - return decrypt( - provider, - domain, - messageKit, - conditionContext, - ); + return decrypt(provider, domain, messageKit, conditionContext); }, [isInit, provider, domain], ); diff --git a/packages/shared/src/porter.ts b/packages/shared/src/porter.ts index ac47d517..0a13050d 100644 --- a/packages/shared/src/porter.ts +++ b/packages/shared/src/porter.ts @@ -38,9 +38,7 @@ export const getPorterUri = async (domain: Domain): Promise => { return (await getPorterUris(domain))[0]; }; -export const getPorterUris = async ( - domain: Domain, -): Promise => { +export const getPorterUris = async (domain: Domain): Promise => { const fullList = []; const uri = defaultPorterUri[domain]; if (!uri) { diff --git a/packages/taco/src/taco.ts b/packages/taco/src/taco.ts index 33d26f30..e711ae6b 100644 --- a/packages/taco/src/taco.ts +++ b/packages/taco/src/taco.ts @@ -140,7 +140,9 @@ export const decrypt = async ( context?: ConditionContext, porterUris?: string[], ): Promise => { - const porterUrisFull: string[] = porterUris ? porterUris : await getPorterUris(domain); + const porterUrisFull: string[] = porterUris + ? porterUris + : await getPorterUris(domain); const ritualId = await DkgCoordinatorAgent.getRitualIdFromPublicKey( provider, diff --git a/packages/test-utils/src/utils.ts b/packages/test-utils/src/utils.ts index b205c2c2..a19af139 100644 --- a/packages/test-utils/src/utils.ts +++ b/packages/test-utils/src/utils.ts @@ -152,9 +152,11 @@ export const fakeUrsulas = (n = 4): Ursula[] => export const mockGetUrsulas = ( ursulas: Ursula[] = fakeUrsulas(), ): SpyInstance => { - return vi.spyOn(PorterClient.prototype, 'getUrsulas').mockImplementation(async () => { - return Promise.resolve(ursulas); - }); + return vi + .spyOn(PorterClient.prototype, 'getUrsulas') + .mockImplementation(async () => { + return Promise.resolve(ursulas); + }); }; const fakeCFragResponse = (