Skip to content

Commit d346624

Browse files
committed
fix: lint
1 parent 803c7bd commit d346624

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

src/vaults/VaultInternal.ts

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
import type { ReadCommitResult } from 'isomorphic-git';
22
import type { EncryptedFS } from 'encryptedfs';
33
import type { DB, DBTransaction, LevelPath } from '@matrixai/db';
4+
import type { RPCClient } from '@matrixai/rpc';
5+
import type { ResourceAcquire, ResourceRelease } from '@matrixai/resources';
46
import type {
57
CommitId,
68
CommitLog,
@@ -15,7 +17,6 @@ import type {
1517
import type KeyRing from '../keys/KeyRing';
1618
import type { NodeId, NodeIdEncoded } from '../ids/types';
1719
import type NodeManager from '../nodes/NodeManager';
18-
import type { RPCClient } from '@matrixai/rpc';
1920
import type agentClientManifest from '../nodes/agent/callers';
2021
import type { POJO } from '../types';
2122
import path from 'path';
@@ -25,12 +26,7 @@ import {
2526
CreateDestroyStartStop,
2627
ready,
2728
} from '@matrixai/async-init/dist/CreateDestroyStartStop';
28-
import {
29-
ResourceAcquire,
30-
ResourceRelease,
31-
withF,
32-
withG,
33-
} from '@matrixai/resources';
29+
import { withF, withG } from '@matrixai/resources';
3430
import { RWLockWriter } from '@matrixai/async-locks';
3531
import * as vaultsUtils from './utils';
3632
import * as vaultsErrors from './errors';
@@ -551,7 +547,7 @@ class VaultInternal {
551547
const [release] = await acquire();
552548
return [
553549
async (e?: Error) => {
554-
release(e);
550+
await release(e);
555551
},
556552
this.efsVault,
557553
];
@@ -613,8 +609,8 @@ class VaultInternal {
613609
[...this.vaultMetadataDbPath, VaultInternal.dirtyKey],
614610
false,
615611
);
616-
if (releaseTran != null) releaseTran(e);
617-
release(e);
612+
if (releaseTran != null) await releaseTran(e);
613+
await release(e);
618614
},
619615
this.efsVault,
620616
];

0 commit comments

Comments
 (0)