Skip to content

Commit

Permalink
Remove validation of fullFeeAmount
Browse files Browse the repository at this point in the history
  • Loading branch information
iamacook committed Jan 14, 2025
1 parent f9259e5 commit 4bb4a69
Show file tree
Hide file tree
Showing 6 changed files with 1 addition and 24 deletions.
1 change: 0 additions & 1 deletion src/domain/swaps/entities/__tests__/order.builder.ts
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,6 @@ export function orderBuilder(): IBuilder<Order> {
.with('executedFeeAmount', faker.number.bigInt({ min: 1 }))
.with('invalidated', faker.datatype.boolean())
.with('status', faker.helpers.arrayElement(Object.values(OrderStatus)))
.with('fullFeeAmount', faker.number.bigInt({ min: 1 }))
.with('isLiquidityOrder', faker.datatype.boolean())
.with(
'ethflowData',
Expand Down
1 change: 0 additions & 1 deletion src/domain/swaps/entities/order.entity.ts
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,6 @@ export const OrderSchema = z.object({
executedFeeAmount: z.coerce.bigint(),
invalidated: z.boolean(),
status: z.nativeEnum(OrderStatus).catch(OrderStatus.Unknown),
fullFeeAmount: z.coerce.bigint(),
isLiquidityOrder: z.boolean(),
ethflowData: z
.object({
Expand Down
2 changes: 0 additions & 2 deletions src/domain/swaps/swaps.repository.e2e-spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,6 @@ const orderIds = {
from: null,
fullAppData:
'{"version":"0.4.0","appCode":"DefiLlama","environment":"production","metadata":{"referrer":{"version":"0.1.0","address":"0x08a3c2A819E3de7ACa384c798269B3Ce1CD0e437"}}}',
fullFeeAmount: BigInt('0'),
invalidated: false,
isLiquidityOrder: false,
kind: 'sell',
Expand Down Expand Up @@ -78,7 +77,6 @@ const orderIds = {
from: null,
fullAppData:
'{"appCode":"CoW Swap","environment":"production","metadata":{"orderClass":{"orderClass":"market"},"quote":{"slippageBips":"200"}},"version":"0.11.0"}',
fullFeeAmount: BigInt('0'),
invalidated: false,
isLiquidityOrder: false,
kind: 'sell',
Expand Down
1 change: 0 additions & 1 deletion src/routes/transactions/helpers/swap-order.helper.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,6 @@ describe('Swap Order Helper tests', () => {
feeAmount: order.feeAmount,
from: order.from,
fullAppData: order.fullAppData,
fullFeeAmount: order.fullFeeAmount,
invalidated: order.invalidated,
isLiquidityOrder: order.isLiquidityOrder,
kind: order.kind,
Expand Down
16 changes: 1 addition & 15 deletions src/routes/transactions/mappers/common/twap-order.mapper.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,6 @@ describe('TwapOrderMapper', () => {
status: 'fulfilled',
class: 'limit',
settlementContract: '0x9008d19f58aabd9ed0d60971565aa8510560ab41',
fullFeeAmount: '0',
solverFee: '0',
isLiquidityOrder: false,
fullAppData:
Expand Down Expand Up @@ -257,7 +256,7 @@ describe('TwapOrderMapper', () => {
status: 'fulfilled',
class: 'limit',
settlementContract: '0x9008d19f58aabd9ed0d60971565aa8510560ab41',
fullFeeAmount: '0',

solverFee: '0',
isLiquidityOrder: false,
fullAppData:
Expand Down Expand Up @@ -396,7 +395,6 @@ describe('TwapOrderMapper', () => {
status: 'fulfilled',
class: 'limit',
settlementContract: '0x9008d19f58aabd9ed0d60971565aa8510560ab41',
fullFeeAmount: '0',
solverFee: '0',
isLiquidityOrder: false,
fullAppData:
Expand Down Expand Up @@ -629,7 +627,6 @@ describe('TwapOrderMapper', () => {
status: 'fulfilled',
class: 'limit',
settlementContract: '0x9008d19f58aabd9ed0d60971565aa8510560ab41',
fullFeeAmount: '0',
solverFee: '0',
isLiquidityOrder: false,
fullAppData: JSON.parse(
Expand Down Expand Up @@ -729,7 +726,6 @@ describe('TwapOrderMapper', () => {
status: 'fulfilled',
class: 'limit',
settlementContract: '0x9008d19f58aabd9ed0d60971565aa8510560ab41',
fullFeeAmount: '0',
solverFee: '0',
isLiquidityOrder: false,
fullAppData: JSON.parse(
Expand Down Expand Up @@ -935,7 +931,6 @@ describe('TwapOrderMapper', () => {
status: 'open',
class: 'limit',
settlementContract: '0x9008d19f58aabd9ed0d60971565aa8510560ab41',
fullFeeAmount: '0',
solverFee: '0',
isLiquidityOrder: false,
fullAppData:
Expand Down Expand Up @@ -1054,7 +1049,6 @@ describe('TwapOrderMapper', () => {
status: 'fulfilled',
class: 'limit',
settlementContract: '0x9008d19f58aabd9ed0d60971565aa8510560ab41',
fullFeeAmount: '0',
solverFee: '0',
isLiquidityOrder: false,
fullAppData:
Expand Down Expand Up @@ -1173,7 +1167,6 @@ describe('TwapOrderMapper', () => {
status: 'fulfilled',
class: 'limit',
settlementContract: '0x9008d19f58aabd9ed0d60971565aa8510560ab41',
fullFeeAmount: '0',
solverFee: '0',
isLiquidityOrder: false,
fullAppData:
Expand Down Expand Up @@ -1213,7 +1206,6 @@ describe('TwapOrderMapper', () => {
status: 'fulfilled',
class: 'limit',
settlementContract: '0x9008d19f58aabd9ed0d60971565aa8510560ab41',
fullFeeAmount: '0',
solverFee: '0',
isLiquidityOrder: false,
fullAppData:
Expand Down Expand Up @@ -1335,7 +1327,6 @@ describe('TwapOrderMapper', () => {
status: 'fulfilled',
class: 'limit',
settlementContract: '0x9008d19f58aabd9ed0d60971565aa8510560ab41',
fullFeeAmount: '0',
solverFee: '0',
isLiquidityOrder: false,
fullAppData:
Expand Down Expand Up @@ -1375,7 +1366,6 @@ describe('TwapOrderMapper', () => {
status: 'fulfilled',
class: 'limit',
settlementContract: '0x9008d19f58aabd9ed0d60971565aa8510560ab41',
fullFeeAmount: '0',
solverFee: '0',
isLiquidityOrder: false,
fullAppData:
Expand Down Expand Up @@ -1416,7 +1406,6 @@ describe('TwapOrderMapper', () => {
status: 'open',
class: 'limit',
settlementContract: '0x9008d19f58aabd9ed0d60971565aa8510560ab41',
fullFeeAmount: '0',
solverFee: '0',
isLiquidityOrder: false,
fullAppData:
Expand Down Expand Up @@ -1535,7 +1524,6 @@ describe('TwapOrderMapper', () => {
status: 'fulfilled',
class: 'limit',
settlementContract: '0x9008d19f58aabd9ed0d60971565aa8510560ab41',
fullFeeAmount: '0',
solverFee: '0',
isLiquidityOrder: false,
fullAppData:
Expand Down Expand Up @@ -1575,7 +1563,6 @@ describe('TwapOrderMapper', () => {
status: 'fulfilled',
class: 'limit',
settlementContract: '0x9008d19f58aabd9ed0d60971565aa8510560ab41',
fullFeeAmount: '0',
solverFee: '0',
isLiquidityOrder: false,
fullAppData:
Expand Down Expand Up @@ -1615,7 +1602,6 @@ describe('TwapOrderMapper', () => {
status: 'expired',
class: 'limit',
settlementContract: '0x9008d19f58aabd9ed0d60971565aa8510560ab41',
fullFeeAmount: '0',
solverFee: '0',
isLiquidityOrder: false,
fullAppData:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -262,7 +262,6 @@ describe('SwapTransferInfoMapper', () => {
status: 'fulfilled',
class: 'limit',
settlementContract: '0x9008d19f58aabd9ed0d60971565aa8510560ab41',
fullFeeAmount: '0',
solverFee: '0',
isLiquidityOrder: false,
fullAppData:
Expand Down Expand Up @@ -299,7 +298,6 @@ describe('SwapTransferInfoMapper', () => {
status: 'fulfilled',
class: 'limit',
settlementContract: '0x9008d19f58aabd9ed0d60971565aa8510560ab41',
fullFeeAmount: '0',
solverFee: '0',
isLiquidityOrder: false,
fullAppData:
Expand Down Expand Up @@ -422,7 +420,6 @@ describe('SwapTransferInfoMapper', () => {
status: 'fulfilled',
class: 'limit',
settlementContract: '0x9008d19f58aabd9ed0d60971565aa8510560ab41',
fullFeeAmount: '0',
solverFee: '0',
isLiquidityOrder: false,
fullAppData:
Expand Down Expand Up @@ -459,7 +456,6 @@ describe('SwapTransferInfoMapper', () => {
status: 'fulfilled',
class: 'limit',
settlementContract: '0x9008d19f58aabd9ed0d60971565aa8510560ab41',
fullFeeAmount: '0',
solverFee: '0',
isLiquidityOrder: false,
fullAppData:
Expand Down

0 comments on commit 4bb4a69

Please sign in to comment.