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

[OTE-438] Allow users to read data if they are in FIRST_STRIKE_CLOSE_ONLY #1716

Merged
merged 1 commit into from
Jun 18, 2024

Conversation

Christopher-Li
Copy link
Contributor

@Christopher-Li Christopher-Li commented Jun 18, 2024

Changelist

Allow users to read data if they are in FIRST_STRIKE_CLOSE_ONLY

Test Plan

Unit tests

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 the PR has breaking postgres changes to the indexer add the indexer-postgres-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.

Summary by CodeRabbit

  • New Features

    • Added support for Great Britain (GB_GEO) in compliance checks and API documentation.
  • Bug Fixes

    • Enhanced compliance check to ensure appropriate handling of addresses in FIRST_STRIKE_CLOSE_ONLY compliance status from restricted countries, preventing incorrect 403 status.

Copy link

linear bot commented Jun 18, 2024

Copy link
Contributor

coderabbitai bot commented Jun 18, 2024

Warning

Rate limit exceeded

@Christopher-Li has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 18 minutes and 35 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between c596696 and ae18d57.

Walkthrough

The recent changes enhance the compliance check process in the compliance-and-geo-check function, introduce support for the Great Britain geographic code (GB_GEO), and add a test case to verify handling of specific compliance statuses. These updates ensure better geographical and compliance handling in the comlink service.

Changes

File Change Summary
indexer/.../compliance-and-geo-check.test.ts Added a test case for the FIRST_STRIKE_CLOSE_ONLY compliance status from a restricted country, ensuring it doesn't return a 403 status.
indexer/.../api-documentation.md Added support for GB_GEO in the list of allowed geographies.
indexer/.../swagger.json Added "GB_GEO" to the list of location codes.
indexer/.../compliance-and-geo-check.ts Extended the complianceAndGeoCheck function to include checks for FIRST_STRIKE_CLOSE_ONLY compliance status.

Sequence Diagram(s)

sequenceDiagram
    participant User
    participant Service
    participant ComplianceCheck
    participant GeoCheck
    
    User->>Service: Make request
    Service->>ComplianceCheck: Check compliance status (including FIRST_STRIKE_CLOSE_ONLY)
    ComplianceCheck-->>Service: Compliance check result
    Service->>GeoCheck: Check geography (including GB_GEO)
    GeoCheck-->>Service: Geography check result
    Service-->>User: Return response
Loading

Poem

In the world of code so bright,
Geo and compliance take flight,
Great Britain's now in, you see,
Keeping checks as they should be,
Errors caught, rules align,
Through every request, outcomes shine,
A seamless dance, pure and fine.


Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

Share
Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

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 an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • 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/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

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.

Actionable comments posted: 1

Outside diff range and nitpick comments (3)
indexer/services/comlink/src/lib/compliance-and-geo-check.ts (1)

Line range hint 54-61: Consider removing the unnecessary else clause.

-      } else if (updatedStatus[0].status === ComplianceStatus.BLOCKED) {
-        return create4xxResponse(
-          res,
-          INDEXER_COMPLIUMANCE_BLOCKED_PAYLOAD,
-          403,
-          { code: BlockedCode.COMPLIANCE_BLOCKED },
-        );
-      }

The static analysis tool suggests this else clause is redundant since previous branches return early or break the flow.

indexer/services/comlink/__tests__/lib/compliance-and-geo-check.test.ts (1)

Line range hint 67-68: Remove the export statement from the test file.

- export const complianceCheckApp = Server(router);

Exporting from a test file can lead to unintended side effects or misuse in production code. It's best practice to keep test utilities encapsulated within the test environment.

indexer/services/comlink/public/api-documentation.md (1)

Line range hint 11-11: Consider removing the comma before 'because' as it is essential to the meaning of the sentence.

Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

Commits

Files that changed from the base of the PR and between 48c0880 and c596696.

Files selected for processing (4)
  • indexer/services/comlink/tests/lib/compliance-and-geo-check.test.ts (1 hunks)
  • indexer/services/comlink/public/api-documentation.md (1 hunks)
  • indexer/services/comlink/public/swagger.json (1 hunks)
  • indexer/services/comlink/src/lib/compliance-and-geo-check.ts (1 hunks)
Files not reviewed due to errors (1)
  • indexer/services/comlink/public/swagger.json (no review received)
Additional context used
Biome
indexer/services/comlink/src/lib/compliance-and-geo-check.ts

[error] 54-61: This else clause can be omitted because previous branches break early. (lint/style/noUselessElse)

Unsafe fix: Omit the else clause.

indexer/services/comlink/__tests__/lib/compliance-and-geo-check.test.ts

[error] 67-68: Do not export from a test file. (lint/suspicious/noExportsInTest)

LanguageTool
indexer/services/comlink/public/api-documentation.md

[formatting] ~11-~11: If the ‘because’ clause is essential to the meaning, do not use a comma before the clause. (COMMA_BEFORE_BECAUSE)
Context: ...than data fetched via Indexer's REST API, because the latter is backed by read replicas o...


[misspelling] ~2895-~2895: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...id="schemaperpetualpositionstatus"> </a...


[misspelling] ~2896-~2896: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...d="schema_PerpetualPositionStatus"> <...


[misspelling] ~2921-~2921: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...onSide <a id="to...


[misspelling] ~2922-~2922: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ..."> <a id="tocsp...


[misspelling] ~2946-~2946: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...IsoString <a id="tocSi...


[misspelling] ~2947-~2947: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ing"> <a id="tocsisos...


[misspelling] ~2964-~2964: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...maperpetualpositionresponseobject"> <a id="schema_PerpetualPositionResponseObj...


[misspelling] ~2965-~2965: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a_PerpetualPositionResponseObject"> <a id="tocSperpetualpositionresponseobject...


[misspelling] ~3014-~3014: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a id="schemaperpetualpositionsmap"> ...


[misspelling] ~3015-~3015: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... id="schema_PerpetualPositionsMap"> <a ...


[misspelling] ~3069-~3069: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...schemaassetpositionresponseobject"> <a id="schema_AssetPositionResponseObject"...


[misspelling] ~3070-~3070: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...chema_AssetPositionResponseObject"> </...


[misspelling] ~3097-~3097: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...p <a i...


[misspelling] ~3098-~3098: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...> <a id="...


[misspelling] ~3130-~3130: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...d="schemasubaccountresponseobject"> </...


[misspelling] ~3131-~3131: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...="schema_SubaccountResponseObject"> ...


[misspelling] ~3216-~3216: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...nse <a id=...


[misspelling] ~3217-~3217: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: .../a> <a id="to...


[misspelling] ~3301-~3301: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...d="schemaparentsubaccountresponse"> </...


[misspelling] ~3302-~3302: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...="schema_ParentSubaccountResponse"> ...


[misspelling] ~3392-~3392: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a id="schemaassetpositionresponse"> ...


[misspelling] ~3393-~3393: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... id="schema_AssetPositionResponse"> <a ...


[misspelling] ~3420-~3420: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...on <a id...


[misspelling] ~3421-~3421: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a> <a id="t...


[misspelling] ~3450-~3450: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <...


[misspelling] ~3451-~3451: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a id="schema_CandleResponseObject"> <a i...


[misspelling] ~3492-~3492: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...onse <a id="...


[misspelling] ~3493-~3493: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id="toc...


[misspelling] ~3527-~3527: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...us <a id...


[misspelling] ~3528-~3528: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a> <a id="t...


[misspelling] ~3555-~3555: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...on <a id...


[misspelling] ~3556-~3556: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a> <a id="t...


[misspelling] ~3584-~3584: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <...


[misspelling] ~3585-~3585: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a id="schema_ComplianceV2Response"> <a i...


[misspelling] ~3608-~3608: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...OrderSide <a id="tocSo...


[misspelling] ~3609-~3609: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ide"> <a id="tocsorde...


[misspelling] ~3633-~3633: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...Liquidity <a id="tocSl...


[misspelling] ~3634-~3634: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ity"> <a id="tocsliqu...


[misspelling] ~3658-~3658: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...# FillType <a id="tocSfi...


[misspelling] ~3659-~3659: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...type"> <a id="tocsfillt...


[misspelling] ~3686-~3686: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...rketType <a id="tocS...


[misspelling] ~3687-~3687: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...pe"> <a id="tocsmar...


[misspelling] ~3711-~3711: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a ...


[misspelling] ~3712-~3712: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id=...


[misspelling] ~3757-~3757: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...sponse <a id="to...


[misspelling] ~3758-~3758: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ..."> <a id="tocsf...


[misspelling] ~3800-~3800: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...onse <a id="...


[misspelling] ~3801-~3801: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id="toc...


[misspelling] ~3822-~3822: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...chemahistoricalblocktradingreward"> <a id="schema_HistoricalBlockTradingReward...


[misspelling] ~3823-~3823: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...hema_HistoricalBlockTradingReward"> <...


[misspelling] ~3846-~3846: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...oricalblocktradingrewardsresponse"> <a id="schema_HistoricalBlockTradingReward...


[misspelling] ~3847-~3847: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...oricalBlockTradingRewardsResponse"> <a id="tocShistoricalblocktradingrewardsre...


[misspelling] ~3872-~3872: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...mahistoricalfundingresponseobject"> <a id="schema_HistoricalFundingResponseObj...


[misspelling] ~3873-~3873: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a_HistoricalFundingResponseObject"> <a id="tocShistoricalfundingresponseobject...


[misspelling] ~3900-~3900: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...="schemahistoricalfundingresponse"> <...


[misspelling] ~3901-~3901: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ..."schema_HistoricalFundingResponse"> ...


[misspelling] ~3928-~3928: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... id="schemapnlticksresponseobject"> ...


[misspelling] ~3929-~3929: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...id="schema_PnlTicksResponseObject"> <a...


[misspelling] ~3962-~3962: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a id="schemahistoricalpnlresponse"> ...


[misspelling] ~3963-~3963: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... id="schema_HistoricalPnlResponse"> <a ...


[misspelling] ~3999-~3999: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ematradingrewardaggregationperiod"> <a id="schema_TradingRewardAggregationPeri...


[misspelling] ~4000-~4000: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ma_TradingRewardAggregationPeriod"> <a id="tocStradingrewardaggregationperiod"...


[misspelling] ~4025-~4025: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...istoricaltradingrewardaggregation"> <a id="schema_HistoricalTradingRewardAggre...


[misspelling] ~4026-~4026: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...istoricalTradingRewardAggregation"> <a id="tocShistoricaltradingrewardaggregat...


[misspelling] ~4055-~4055: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...tradingrewardaggregationsresponse"> <a id="schema_HistoricalTradingRewardAggre...


[misspelling] ~4056-~4056: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...TradingRewardAggregationsResponse"> <a id="tocShistoricaltradingrewardaggregat...


[misspelling] ~4084-~4084: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...schemaorderbookresponsepricelevel"> <a id="schema_OrderbookResponsePriceLevel"...


[misspelling] ~4085-~4085: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...chema_OrderbookResponsePriceLevel"> </...


[misspelling] ~4106-~4106: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...id="schemaorderbookresponseobject"> </a...


[misspelling] ~4107-~4107: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...d="schema_OrderbookResponseObject"> <...


[misspelling] ~4138-~4138: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...orce <a id="...


[misspelling] ~4139-~4139: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id="toc...


[misspelling] ~4164-~4164: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...rStatus <a id="toc...


[misspelling] ~4165-~4165: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...s"> <a id="tocsor...


[misspelling] ~4192-~4192: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... id="schemabesteffortopenedstatus"> ...


[misspelling] ~4193-~4193: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...id="schema_BestEffortOpenedStatus"> <a...


[misspelling] ~4216-~4216: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...atus <a id="...


[misspelling] ~4217-~4217: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id="toc...


[misspelling] ~4242-~4242: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...OrderType <a id="tocSo...


[misspelling] ~4243-~4243: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ype"> <a id="tocsorde...


[misspelling] ~4272-~4272: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a...


[misspelling] ~4273-~4273: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id...


[misspelling] ~4336-~4336: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a id="schemaperpetualmarketstatus"> ...


[misspelling] ~4337-~4337: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... id="schema_PerpetualMarketStatus"> <a ...


[misspelling] ~4365-~4365: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a...


[misspelling] ~4366-~4366: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id...


[misspelling] ~4390-~4390: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...hemaperpetualmarketresponseobject"> <a id="schema_PerpetualMarketResponseObjec...


[misspelling] ~4391-~4391: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ema_PerpetualMarketResponseObject"> ...


[misspelling] ~4450-~4450: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...id="schemaperpetualmarketresponse"> </a...


[misspelling] ~4451-~4451: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...d="schema_PerpetualMarketResponse"> <...


[misspelling] ~4518-~4518: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...="schemaperpetualpositionresponse"> <...


[misspelling] ~4519-~4519: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ..."schema_PerpetualPositionResponse"> ...


[misspelling] ~4557-~4557: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...id="schemasparklineresponseobject"> </a...


[misspelling] ~4558-~4558: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...d="schema_SparklineResponseObject"> <...


[misspelling] ~4582-~4582: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a...


[misspelling] ~4583-~4583: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id...


[misspelling] ~4607-~4607: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...sponse <a id="to...


[misspelling] ~4608-~4608: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ..."> <a id="tocst...


[misspelling] ~4629-~4629: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...TradeType <a id="tocSt...


[misspelling] ~4630-~4630: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ype"> <a id="tocstrad...


[misspelling] ~4655-~4655: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a...


[misspelling] ~4656-~4656: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... <a id...


[misspelling] ~4687-~4687: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...ponse <a id="t...


[misspelling] ~4688-~4688: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...> <a id="tocs...


[misspelling] ~4723-~4723: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...erType <a id="to...


[misspelling] ~4724-~4724: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ..."> <a id="tocst...


[misspelling] ~4750-~4750: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ... id="schematransferresponseobject"> ...


[misspelling] ~4751-~4751: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...id="schema_TransferResponseObject"> <a...


[misspelling] ~4796-~4796: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...se <a id...


[misspelling] ~4797-~4797: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...a> <a id="t...


[misspelling] ~4840-~4840: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ...aparentsubaccounttransferresponse"> <a id="schema_ParentSubaccountTransferResp...


[misspelling] ~4841-~4841: Use “an” instead of ‘a’ if the following word starts with a vowel sound, e.g. ‘an article’, ‘an hour’. (EN_A_VS_AN)
Context: ..._ParentSubaccountTransferResponse"> <a id="tocSparentsubaccounttransferrespons...

Markdownlint
indexer/services/comlink/public/api-documentation.md

4882-4882: Expected: 1; Actual: 2 (MD012, no-multiple-blanks)
Multiple consecutive blank lines


72-72: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


211-211: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


345-345: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


489-489: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


574-574: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


674-674: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


763-763: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


855-855: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


965-965: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


1053-1053: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


1131-1131: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


1214-1214: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


1305-1305: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


1402-1402: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


1504-1504: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


1587-1587: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


1697-1697: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


1891-1891: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


2060-2060: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


2157-2157: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


2293-2293: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


2401-2401: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


2503-2503: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


2576-2576: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


2655-2655: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


2749-2749: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


2851-2851: null (MD028, no-blanks-blockquote)
Blank line inside blockquote


1762-1762: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


1768-1768: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


1774-1774: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


1956-1956: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


1962-1962: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading


1968-1968: null (MD036, no-emphasis-as-heading)
Emphasis used instead of a heading

Additional comments not posted (2)
indexer/services/comlink/src/lib/compliance-and-geo-check.ts (1)

50-52: Ensure FIRST_STRIKE_CLOSE_ONLY status allows access as intended.

This change aligns with the PR objectives to allow users in FIRST_STRIKE_CLOSE_ONLY to read data. Make sure to validate this behavior with comprehensive tests.

indexer/services/comlink/__tests__/lib/compliance-and-geo-check.test.ts (1)

192-210: LGTM! This test case properly checks for the newly added FIRST_STRIKE_CLOSE_ONLY status.

It's great to see that the test case verifies that requests from addresses with FIRST_STRIKE_CLOSE_ONLY status from restricted countries do not return a 403 status, aligning with the PR objectives.

@@ -3575,6 +3575,7 @@ This operation does not require authentication
|*anonymous*|MANUAL|
|*anonymous*|US_GEO|
|*anonymous*|CA_GEO|
|*anonymous*|GB_GEO|
Copy link
Contributor

Choose a reason for hiding this comment

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

Ensure consistent usage of 'GB' instead of 'GB_GEO' to match other geographic codes like 'US' and 'CA'.

@Christopher-Li Christopher-Li force-pushed the cl_first_strike_close_only branch from c596696 to ae18d57 Compare June 18, 2024 18:34
@Christopher-Li Christopher-Li merged commit 98798a0 into main Jun 18, 2024
11 checks passed
@Christopher-Li Christopher-Li deleted the cl_first_strike_close_only branch June 18, 2024 21:09
@Christopher-Li
Copy link
Contributor Author

@Mergifyio backport release/indexer/v5.x

Copy link
Contributor

mergify bot commented Jun 18, 2024

backport release/indexer/v5.x

✅ Backports have been created

mergify bot pushed a commit that referenced this pull request Jun 18, 2024
Christopher-Li added a commit that referenced this pull request Jun 18, 2024
dydxwill added a commit that referenced this pull request Jun 28, 2024
dydxwill added a commit that referenced this pull request Jul 3, 2024
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