Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: Correct V3Fill type definition #550

Merged
merged 1 commit into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading