Skip to content

Commit

Permalink
Fix linting errors post-rebase.
Browse files Browse the repository at this point in the history
  • Loading branch information
derekpierre committed Aug 15, 2024
1 parent 83585f4 commit 8c30bc4
Show file tree
Hide file tree
Showing 6 changed files with 12 additions and 25 deletions.
7 changes: 1 addition & 6 deletions examples/taco/nextjs/src/hooks/useTaco.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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],
);
Expand Down
7 changes: 1 addition & 6 deletions examples/taco/nodejs/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 () => {
Expand Down
7 changes: 1 addition & 6 deletions examples/taco/react/src/hooks/useTaco.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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],
);
Expand Down
4 changes: 1 addition & 3 deletions packages/shared/src/porter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -38,9 +38,7 @@ export const getPorterUri = async (domain: Domain): Promise<string> => {
return (await getPorterUris(domain))[0];
};

export const getPorterUris = async (
domain: Domain,
): Promise<string[]> => {
export const getPorterUris = async (domain: Domain): Promise<string[]> => {
const fullList = [];
const uri = defaultPorterUri[domain];
if (!uri) {
Expand Down
4 changes: 3 additions & 1 deletion packages/taco/src/taco.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,9 @@ export const decrypt = async (
context?: ConditionContext,
porterUris?: string[],
): Promise<Uint8Array> => {
const porterUrisFull: string[] = porterUris ? porterUris : await getPorterUris(domain);
const porterUrisFull: string[] = porterUris
? porterUris
: await getPorterUris(domain);

const ritualId = await DkgCoordinatorAgent.getRitualIdFromPublicKey(
provider,
Expand Down
8 changes: 5 additions & 3 deletions packages/test-utils/src/utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = (
Expand Down

0 comments on commit 8c30bc4

Please sign in to comment.