Skip to content

Commit b6c39a2

Browse files
committed
makes acquireLock and releaseLock more consistent
Signed-off-by: Konstantina Blazhukova <[email protected]>
1 parent a36fcff commit b6c39a2

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

packages/relay/src/lib/services/lockService/LockService.ts

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -31,10 +31,9 @@ export class LockService {
3131
* @returns A promise that resolves to a unique session key, or null if acquisition fails (fail open).
3232
*/
3333
async acquireLock(address: string): Promise<string | undefined> {
34-
if (!ConfigService.get('ENABLE_NONCE_ORDERING')) {
35-
return;
34+
if (ConfigService.get('ENABLE_NONCE_ORDERING')) {
35+
return await this.strategy.acquireLock(address);
3636
}
37-
return await this.strategy.acquireLock(address);
3837
}
3938

4039
/**

0 commit comments

Comments
 (0)