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

[IND-487] remove market enum from FillsType #788

Merged
merged 1 commit into from
Nov 10, 2023
Merged

[IND-487] remove market enum from FillsType #788

merged 1 commit into from
Nov 10, 2023

Conversation

dydxwill
Copy link
Contributor

Changelist

remove market enum from FillsType

Test Plan

unit tested.

Author/Reviewer Checklist

  • If this PR has changes that result in a different app state given the same prior state and transaction list, manually add the state-breaking label.
  • If this PR isn't state-breaking but has changes that modify behavior in PrepareProposal or ProcessProposal, manually add the label proposal-breaking.
  • If this PR is one of many that implement a specific feature, manually label them all feature:[feature-name].
  • If you wish to for mergify-bot to automatically create a PR to backport your change to a release branch, manually add the label backport/[branch-name].
  • Manually add any of the following labels: refactor, chore, bug.

Copy link

linear bot commented Nov 10, 2023

Copy link
Contributor

coderabbitai bot commented Nov 10, 2023

Walkthrough

The changes across multiple files in the indexer and services directories indicate a shift in the default trading type from MARKET to LIMIT in the dYdX exchange. This modification affects the database migrations, type definitions, API and WebSocket documentation, and test cases. The changes suggest a strategic shift in trading operations, potentially to provide better control over order execution and pricing.

Changes

File(s) Change Summary
.../postgres/__tests__/helpers/constants.ts
.../ender/__tests__/helpers/constants.ts
.../ender/__tests__/lib/kafka-publisher.test.ts
The default fill type has been changed from MARKET to LIMIT in test constants and test cases, reflecting the new default trading type.
.../postgres/src/db/migrations/.../remove_market_fills_type.ts The database migration file has been updated to include new enum values for the fills table's type column, replacing the MARKET type with LIMIT and other types.
.../postgres/src/types/fill-types.ts The MARKET enum value has been removed from the FillType enum, indicating a change in the available fill types.
.../comlink/public/api-documentation.md
.../comlink/public/websocket-documentation.md
The API and WebSocket documentation have been updated to reflect the change in market transactions from MARKET to LIMIT.

Tips

Chat with CodeRabbit Bot (@coderabbitai)

  • If you reply to a review comment from CodeRabbit, the bot will automatically respond.
  • To engage with CodeRabbit bot directly around the specific lines of code in the PR, mention @coderabbitai in your review comment
  • Note: Review comments are made on code diffs or files, not on the PR overview.
  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Commands (invoked as PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger a review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai help to get help.
  • @coderabbitai resolve to resolve all the CodeRabbit review comments.

Note: For conversation with the bot, please use the review comments on code diffs or files.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • The JSON schema for the configuration file is available here.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/coderabbit-overrides.v2.json

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Review Status

Actionable comments generated: 0

Configuration used: CodeRabbit UI

Commits Files that changed from the base of the PR and between 1b3881f and 754d002.
Files ignored due to filter (1)
  • indexer/services/comlink/public/swagger.json
Files selected for processing (7)
  • indexer/packages/postgres/tests/helpers/constants.ts (1 hunks)
  • indexer/packages/postgres/src/db/migrations/migration_files/20231110103241_remove_market_fills_type.ts (1 hunks)
  • indexer/packages/postgres/src/types/fill-types.ts (1 hunks)
  • indexer/services/comlink/public/api-documentation.md (8 hunks)
  • indexer/services/comlink/public/websocket-documentation.md (2 hunks)
  • indexer/services/ender/tests/helpers/constants.ts (1 hunks)
  • indexer/services/ender/tests/lib/kafka-publisher.test.ts (1 hunks)
Additional comments: 8
indexer/services/ender/__tests__/lib/kafka-publisher.test.ts (1)
  • 241-247: The change from FillType.MARKET to FillType.LIMIT is reflected here. Ensure that this change aligns with the intended behavior of the test case.
indexer/packages/postgres/__tests__/helpers/constants.ts (1)
  • 355-361: The change from MARKET to LIMIT in the FillType enum is reflected here. Ensure that this change is propagated throughout the codebase and that it doesn't break any existing functionality.
indexer/packages/postgres/src/types/fill-types.ts (1)
  • 14-19: The removal of the MARKET enum value from FillType may have implications on the rest of the codebase. Ensure that all references to FillType.MARKET have been updated to FillType.LIMIT or another appropriate value. Also, verify that this change does not break any functionality that specifically relied on the MARKET fill type.
indexer/services/ender/__tests__/helpers/constants.ts (1)
  • 325-329: The defaultTradeContent object has been updated to reflect the change from FillType.MARKET to FillType.LIMIT. Ensure that this change is propagated throughout the test suite and does not break any existing tests.
indexer/packages/postgres/src/db/migrations/migration_files/20231110103241_remove_market_fills_type.ts (1)
  • 1-19: Ensure that the removal of 'MARKET' from the enum values in the 'type' column of the 'fills' table does not break any existing functionality that relies on this value. Also, verify that all instances where 'MARKET' was used have been updated to use 'LIMIT' or another appropriate value.
indexer/services/comlink/public/api-documentation.md (1)
  • 3099-3102: The change from "MARKET" to "LIMIT" in the transaction type may affect the behavior of trading operations and could have implications for order execution and pricing. Ensure that all stakeholders are aware of this change and its potential impact.
indexer/services/comlink/public/websocket-documentation.md (2)
  • 253-256: The MARKET enum value has been removed from FillType. Ensure that this change is reflected across all parts of the codebase where FillType is used. Also, verify that the removal of MARKET does not break any functionality or logic that relied on it.

  • 753-753: The trade type has been changed from "MARKET" to "LIMIT". Ensure that this change is reflected in all parts of the codebase where trade types are used. Also, verify that this change does not break any functionality or logic that relied on the "MARKET" type.

@dydxwill dydxwill merged commit 197f530 into main Nov 10, 2023
11 checks passed
@dydxwill dydxwill deleted the wl/rm_market branch November 10, 2023 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants