diff --git a/src/utils/V3Utils.ts b/src/utils/V3Utils.ts index 7839b813..f610a0cb 100644 --- a/src/utils/V3Utils.ts +++ b/src/utils/V3Utils.ts @@ -89,10 +89,11 @@ export function isSlowFill(fill: Fill): boolean { return isV2Fill(fill) ? fill.updatableRelayData.isSlowRelay : fill.updatableRelayData.fillType === FillType.SlowFill; } +// If needed, this can be made generic in the future. export function isSlowFillRequest(fill: Fill | SlowFillRequest): fill is SlowFillRequest { - return !isV2Fill(fill as Fill) && !isV3Fill(fill as Fill); + // Relayer field exists in V2Fill, V3Fill, but not SlowFillRequest. + return (fill as Fill).relayer === undefined; } - type MinV2SlowFillLeaf = Pick; type MinV3SlowFillLeaf = Pick; export function isV2SlowFillLeaf(