Skip to content

Commit

Permalink
fix: Correct V3Fill type definition
Browse files Browse the repository at this point in the history
Identified by Nick in a separate PR. It's proposed separately here
because it's a standalone fix that's easy to review and merge now.
  • Loading branch information
pxrl committed Feb 12, 2024
1 parent 04be894 commit d2b0ccb
Show file tree
Hide file tree
Showing 6 changed files with 9 additions and 37 deletions.
12 changes: 6 additions & 6 deletions src/clients/mocks/MockSpokePoolClient.ts
Original file line number Diff line number Diff line change
Expand Up @@ -323,11 +323,11 @@ export class MockSpokePoolClient extends SpokePoolClient {
depositor: fill.depositor ?? randomAddress(),
recipient,
message,
updatableRelayData: {
updatedRecipient: fill.updatableRelayData?.recipient ?? recipient,
updatedMessage: fill.updatableRelayData?.message ?? message,
updatedOutputAmount: fill.updatableRelayData?.outputAmount ?? outputAmount,
fillType: fill.updatableRelayData?.fillType ?? FillType.FastFill,
relayExecutionInfo: {
updatedRecipient: fill.relayExecutionInfo?.recipient ?? recipient,
updatedMessage: fill.relayExecutionInfo?.message ?? message,
updatedOutputAmount: fill.relayExecutionInfo?.outputAmount ?? outputAmount,
fillType: fill.relayExecutionInfo?.fillType ?? FillType.FastFill,
},
};

Expand Down Expand Up @@ -392,7 +392,7 @@ export class MockSpokePoolClient extends SpokePoolClient {
destinationChainId: this.chainId,
relayer: ZERO_ADDRESS,
repaymentChainId: 0,
updatableRelayData: {
relayExecutionInfo: {
recipient: leaf.relayData.recipient,
outputAmount: leaf.updatedOutputAmount,
message: leaf.relayData.message,
Expand Down
2 changes: 1 addition & 1 deletion src/interfaces/SpokePool.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ export interface V3Fill extends V3RelayData {
destinationChainId: number;
relayer: string;
repaymentChainId: number;
updatableRelayData: V3RelayExecutionEventInfo;
relayExecutionInfo: V3RelayExecutionEventInfo;
}

export interface V2FillWithBlock extends V2Fill, SortableEvent {}
Expand Down
27 changes: 0 additions & 27 deletions src/interfaces/UBA.ts

This file was deleted.

1 change: 0 additions & 1 deletion src/interfaces/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@ export * from "./ConfigStore";
export * from "./HubPool";
export * from "./SpokePool";
export * from "./Bridge";
export * from "./UBA";
export * from "./Error";
export * from "./TypedData";
export * from "./CachingMechanism";
2 changes: 1 addition & 1 deletion src/utils/V3Utils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ export function isV3RelayData<T extends MinV3RelayData, U extends MinV2RelayData
}

export function isSlowFill(fill: Fill): boolean {
return isV2Fill(fill) ? fill.updatableRelayData.isSlowRelay : fill.updatableRelayData.fillType === FillType.SlowFill;
return isV2Fill(fill) ? fill.updatableRelayData.isSlowRelay : fill.relayExecutionInfo.fillType === FillType.SlowFill;
}

type MinV2SlowFillLeaf = Pick<V2SlowFillLeaf, "payoutAdjustmentPct">;
Expand Down
2 changes: 1 addition & 1 deletion test/utils/SpokePoolUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ export function v3FillFromDeposit(deposit: V3DepositWithBlock, relayer: string):
// Caller can modify these later.
exclusiveRelayer: relayer,
repaymentChainId: deposit.destinationChainId,
updatableRelayData: {
relayExecutionInfo: {
recipient: deposit.updatedRecipient ?? recipient,
message: deposit.updatedMessage ?? message,
outputAmount: deposit.updatedOutputAmount ?? deposit.outputAmount,
Expand Down

0 comments on commit d2b0ccb

Please sign in to comment.