Skip to content

Commit 3a6e29e

Browse files
committed
lint: linting
[ci skip]
1 parent 117fd36 commit 3a6e29e

File tree

10 files changed

+42
-57
lines changed

10 files changed

+42
-57
lines changed

src/agent/handlers/nodesClaimsGet.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ class NodesClaimsGetHandler extends ServerHandler<
1717
_input: ClaimIdMessage,
1818
): AsyncGenerator<AgentRPCResponseResult<AgentClaimMessage>> {
1919
const { sigchain, db } = this.container;
20-
yield* db.withTransactionG(async function* (
21-
tran,
22-
): AsyncGenerator<AgentRPCResponseResult<AgentClaimMessage>> {
20+
yield* db.withTransactionG(async function* (tran): AsyncGenerator<
21+
AgentRPCResponseResult<AgentClaimMessage>
22+
> {
2323
for await (const [claimId, signedClaim] of sigchain.getSignedClaims(
2424
{ /* seek: seekClaimId,*/ order: 'asc' },
2525
tran,

src/agent/handlers/nodesClosestLocalNodesGet.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,9 +38,9 @@ class NodesClosestLocalNodesGetHandler extends ServerHandler<
3838
},
3939
);
4040
// Get all local nodes that are closest to the target node from the request
41-
return yield* db.withTransactionG(async function* (
42-
tran,
43-
): AsyncGenerator<AgentRPCResponseResult<NodeAddressMessage>> {
41+
return yield* db.withTransactionG(async function* (tran): AsyncGenerator<
42+
AgentRPCResponseResult<NodeAddressMessage>
43+
> {
4444
const closestNodes = await nodeGraph.getClosestNodes(
4545
nodeId,
4646
undefined,

src/agent/handlers/vaultsScan.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,9 @@ class VaultsScanHandler extends ServerHandler<
2525
if (requestingNodeId == null) {
2626
throw new agentErrors.ErrorAgentNodeIdMissing();
2727
}
28-
yield* db.withTransactionG(async function* (
29-
tran,
30-
): AsyncGenerator<AgentRPCResponseResult<VaultsScanMessage>> {
28+
yield* db.withTransactionG(async function* (tran): AsyncGenerator<
29+
AgentRPCResponseResult<VaultsScanMessage>
30+
> {
3131
const listResponse = vaultManager.handleScanVaults(
3232
requestingNodeId,
3333
tran,

src/client/handlers/gestaltsGestaltList.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,9 @@ class GestaltsGestaltListHandler extends ServerHandler<
2020
ctx,
2121
): AsyncGenerator<ClientRPCResponseResult<GestaltMessage>> {
2222
const { db, gestaltGraph } = this.container;
23-
yield* db.withTransactionG(async function* (
24-
tran,
25-
): AsyncGenerator<ClientRPCResponseResult<GestaltMessage>> {
23+
yield* db.withTransactionG(async function* (tran): AsyncGenerator<
24+
ClientRPCResponseResult<GestaltMessage>
25+
> {
2626
if (ctx.signal.aborted) throw ctx.signal.reason;
2727
for await (const gestalt of gestaltGraph.getGestalts(tran)) {
2828
const gestaltMessage: GestaltMessage = {

src/keys/KeyRing.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -157,9 +157,8 @@ class KeyRing {
157157
});
158158
}
159159
await this.fs.promises.mkdir(this.keysPath, { recursive: true });
160-
const [keyPair, recoveryCode] = await this.setupKeyPair(
161-
setupKeyPairOptions,
162-
);
160+
const [keyPair, recoveryCode] =
161+
await this.setupKeyPair(setupKeyPairOptions);
163162
const dbKey = await this.setupDbKey(keyPair);
164163
const [passwordHash, passwordSalt] = await this.setupPasswordHash(
165164
options.password,
@@ -280,9 +279,8 @@ class KeyRing {
280279
await this.rotateLock.withF(async () => {
281280
this.logger.info('Changing root key pair password');
282281
await this.writeKeyPair(this._keyPair!, password);
283-
const [passwordHash, passwordSalt] = await this.setupPasswordHash(
284-
password,
285-
);
282+
const [passwordHash, passwordSalt] =
283+
await this.setupPasswordHash(password);
286284
bufferUnlock(this.passwordHash!.hash);
287285
bufferUnlock(this.passwordHash!.salt);
288286
bufferLock(passwordHash, this.strictMemoryLock);
@@ -372,9 +370,8 @@ class KeyRing {
372370
bufferUnlock(this._recoveryCodeData);
373371
}
374372
this._recoveryCodeData = recoveryCodeData as RecoveryCodeLocked;
375-
const [passwordHash, passwordSalt] = await this.setupPasswordHash(
376-
password,
377-
);
373+
const [passwordHash, passwordSalt] =
374+
await this.setupPasswordHash(password);
378375
bufferUnlock(this.passwordHash!.hash);
379376
bufferUnlock(this.passwordHash!.salt);
380377
bufferLock(passwordHash, this.strictMemoryLock);

tests/client/handlers/gestalts.test.ts

Lines changed: 8 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -218,9 +218,8 @@ describe('gestaltsActionsByIdentity', () => {
218218
};
219219
await rpcClient.methods.gestaltsActionsSetByIdentity(setActionMessage);
220220
// Check for permission
221-
const getSetResponse = await rpcClient.methods.gestaltsActionsGetByIdentity(
222-
providerMessage,
223-
);
221+
const getSetResponse =
222+
await rpcClient.methods.gestaltsActionsGetByIdentity(providerMessage);
224223
expect(getSetResponse.actionsList).toContainEqual(action);
225224
// Unset permission
226225
await rpcClient.methods.gestaltsActionsUnsetByIdentity(setActionMessage);
@@ -349,16 +348,14 @@ describe('gestaltsActionsByNode', () => {
349348
};
350349
await rpcClient.methods.gestaltsActionsSetByNode(requestMessage);
351350
// Check for permission
352-
const getSetResponse = await rpcClient.methods.gestaltsActionsGetByNode(
353-
nodeMessage,
354-
);
351+
const getSetResponse =
352+
await rpcClient.methods.gestaltsActionsGetByNode(nodeMessage);
355353
expect(getSetResponse.actionsList).toContainEqual(action);
356354
// Unset permission
357355
await rpcClient.methods.gestaltsActionsUnsetByNode(requestMessage);
358356
// Check permission was removed
359-
const getUnsetResponse = await rpcClient.methods.gestaltsActionsGetByNode(
360-
nodeMessage,
361-
);
357+
const getUnsetResponse =
358+
await rpcClient.methods.gestaltsActionsGetByNode(nodeMessage);
362359
expect(getUnsetResponse.actionsList).toHaveLength(0);
363360
});
364361
});
@@ -855,9 +852,8 @@ describe('gestaltsGestaltGetByIdentity', () => {
855852
providerId: identity.providerId,
856853
identityId: identity.identityId,
857854
};
858-
const response = await rpcClient.methods.gestaltsGestaltGetByIdentity(
859-
request,
860-
);
855+
const response =
856+
await rpcClient.methods.gestaltsGestaltGetByIdentity(request);
861857
expect(response.gestalt).toEqual(expectedGestalt);
862858
});
863859
});

tests/client/handlers/identities.test.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2752,16 +2752,14 @@ describe('identitiesTokenPutDeleteGet', () => {
27522752
token: testToken.providerToken,
27532753
});
27542754
// Get token
2755-
const getPutResponse = await rpcClient.methods.identitiesTokenGet(
2756-
providerMessage,
2757-
);
2755+
const getPutResponse =
2756+
await rpcClient.methods.identitiesTokenGet(providerMessage);
27582757
expect(getPutResponse.token).toStrictEqual(testToken.providerToken);
27592758
// Delete token
27602759
await rpcClient.methods.identitiesTokenDelete(providerMessage);
27612760
// Check token was deleted
2762-
const getDeleteResponse = await rpcClient.methods.identitiesTokenGet(
2763-
providerMessage,
2764-
);
2761+
const getDeleteResponse =
2762+
await rpcClient.methods.identitiesTokenGet(providerMessage);
27652763
expect(getDeleteResponse.token).toBeUndefined();
27662764
});
27672765
});

tests/gestalts/GestaltGraph.test.ts

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -384,9 +384,8 @@ describe('GestaltGraph', () => {
384384
});
385385
try {
386386
// Setting
387-
const [type, providerIdentityId] = await gestaltGraph.setIdentity(
388-
gestaltIdentityInfo,
389-
);
387+
const [type, providerIdentityId] =
388+
await gestaltGraph.setIdentity(gestaltIdentityInfo);
390389
expect(type).toBe('identity');
391390
expect(providerIdentityId[0]).toBe(gestaltIdentityInfo.providerId);
392391
expect(providerIdentityId[1]).toBe(gestaltIdentityInfo.identityId);
@@ -416,9 +415,8 @@ describe('GestaltGraph', () => {
416415
});
417416
try {
418417
// Setting
419-
const [type, providerIdentityId] = await gestaltGraph.setIdentity(
420-
gestaltIdentityInfo,
421-
);
418+
const [type, providerIdentityId] =
419+
await gestaltGraph.setIdentity(gestaltIdentityInfo);
422420
expect(type).toBe('identity');
423421
expect(providerIdentityId[0]).toBe(gestaltIdentityInfo.providerId);
424422
expect(providerIdentityId[1]).toBe(gestaltIdentityInfo.identityId);
@@ -682,9 +680,8 @@ describe('GestaltGraph', () => {
682680
'identity',
683681
providerIdentitiyId,
684682
]);
685-
const gestalt = await gestaltGraph.getGestaltByIdentity(
686-
providerIdentitiyId,
687-
);
683+
const gestalt =
684+
await gestaltGraph.getGestaltByIdentity(providerIdentitiyId);
688685
const gestaltIdentityId = encodeGestaltIdentityId([
689686
'identity',
690687
providerIdentitiyId,

tests/keys/utils/generate.test.ts

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -43,18 +43,16 @@ describe('keys/utils/generate', () => {
4343
const recoveryCode1 = recoveryCode.generateRecoveryCode(
4444
length as 12 | 24 | undefined,
4545
);
46-
const keyPair1 = await generate.generateDeterministicKeyPair(
47-
recoveryCode1,
48-
);
46+
const keyPair1 =
47+
await generate.generateDeterministicKeyPair(recoveryCode1);
4948
expect(keyPair1.publicKey).toHaveLength(32);
5049
expect(keyPair1.privateKey).toHaveLength(32);
5150
expect(keyPair1.publicKey).not.toEqual(keyPair1.privateKey);
5251
expect(keyPair1.secretKey).toStrictEqual(
5352
Buffer.concat([keyPair1.privateKey, keyPair1.publicKey]),
5453
);
55-
const keyPair2 = await generate.generateDeterministicKeyPair(
56-
recoveryCode1,
57-
);
54+
const keyPair2 =
55+
await generate.generateDeterministicKeyPair(recoveryCode1);
5856
expect(keyPair2.publicKey).toHaveLength(32);
5957
expect(keyPair2.privateKey).toHaveLength(32);
6058
expect(keyPair2.publicKey).not.toEqual(keyPair2.privateKey);

tests/notifications/NotificationsManager.test.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -778,9 +778,8 @@ describe('NotificationsManager', () => {
778778
vaults: {},
779779
});
780780
await notificationsManager.receiveNotification(notification);
781-
const receivedInvite = await notificationsManager.findGestaltInvite(
782-
senderId,
783-
);
781+
const receivedInvite =
782+
await notificationsManager.findGestaltInvite(senderId);
784783
expect(receivedInvite).toEqual(notification);
785784
// Reverse side-effects
786785
await notificationsManager.clearNotifications();

0 commit comments

Comments
 (0)