Skip to content

Commit

Permalink
Update CachingUtils.ts
Browse files Browse the repository at this point in the history
  • Loading branch information
nicholaspai committed Feb 15, 2024
1 parent df94108 commit bef6e15
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/utils/CachingUtils.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
import { DEFAULT_CACHING_SAFE_LAG, DEFAULT_CACHING_TTL } from "../constants";
import { CachingMechanismInterface, Deposit, Fill, SlowFillRequest } from "../interfaces";
import { CachingMechanismInterface, Deposit, Fill } from "../interfaces";
import { assert } from "./LogUtils";
import { composeRevivers, objectWithBigNumberReviver } from "./ReviverUtils";
import { getCurrentTime } from "./TimeUtils";
Expand Down Expand Up @@ -44,10 +44,10 @@ export async function setDepositInCache(
}

/**
* Resolves the key for caching a bridge event.
* @param bridgeEvent The depositId and originChainId are used to generate the key.
* @returns The key for caching the event.
* Resolves the key for caching either a deposit or a fill.
* @param depositOrFill Either a deposit or a fill. In either case, the depositId and originChainId are used to generate the key.
* @returns The key for caching the deposit or fill.
*/
export function getDepositKey(bridgeEvent: Deposit | Fill | SlowFillRequest): string {
return `deposit_${bridgeEvent.originChainId}_${bridgeEvent.depositId}`;
export function getDepositKey(depositOrFill: Deposit | Fill): string {
return `deposit_${depositOrFill.originChainId}_${depositOrFill.depositId}`;
}

0 comments on commit bef6e15

Please sign in to comment.