Skip to content

fix(revolut): remove blanket digit-prefix crypto classification#157

Merged
GeiserX merged 3 commits intomainfrom
fix/revolut-65c-crypto-misclassification
May 6, 2026
Merged

fix(revolut): remove blanket digit-prefix crypto classification#157
GeiserX merged 3 commits intomainfrom
fix/revolut-65c-crypto-misclassification

Conversation

@GeiserX
Copy link
Copy Markdown
Owner

@GeiserX GeiserX commented May 6, 2026

Summary

  • Removes the overly broad heuristic that classified all symbols starting with digits as crypto
  • Stock tickers like 65C were incorrectly placed under crypto (Modelo 721) instead of stocks (Modelo 720)
  • 1INCH and other digit-prefixed crypto are already in the KNOWN_CRYPTO set, making the regex redundant

Test plan

  • Added test verifying 65C is classified as STK
  • Existing test confirms 1INCH still classified as CRYPTO (via KNOWN_CRYPTO set)
  • All 85 Revolut parser tests pass

Stock tickers like 65C were incorrectly classified as crypto because
the heuristic assumed all symbols starting with digits are crypto.
1INCH is already in the KNOWN_CRYPTO set, making the regex redundant.
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented May 6, 2026

Warning

Rate limit exceeded

@GeiserX has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 23 minutes and 4 seconds before requesting another review.

To continue reviewing without waiting, purchase usage credits in the billing tab.

⌛ 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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: d2209f13-9085-4cd2-b2b8-6a86036e1da1

📥 Commits

Reviewing files that changed from the base of the PR and between 5301879 and a25377e.

📒 Files selected for processing (4)
  • scripts/update-crypto-symbols.ts
  • src/parsers/crypto-symbols.ts
  • src/parsers/revolut.ts
  • tests/parsers/revolut.test.ts
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch fix/revolut-65c-crypto-misclassification

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Sourced from Revolut's published crypto trading list. Covers DeFi,
infrastructure tokens, stablecoins, rebrands (MATIC→POL), and
historically-available tokens needed for older exports.
@codecov
Copy link
Copy Markdown

codecov Bot commented May 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 97.63%. Comparing base (670e39c) to head (a25377e).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #157      +/-   ##
==========================================
+ Coverage   97.62%   97.63%   +0.01%     
==========================================
  Files          37       38       +1     
  Lines        7585     7622      +37     
  Branches     1551     1549       -2     
==========================================
+ Hits         7405     7442      +37     
  Misses        179      179              
  Partials        1        1              
Files with missing lines Coverage Δ
src/parsers/crypto-symbols.ts 100.00% <100.00%> (ø)
src/parsers/revolut.ts 98.43% <100.00%> (-0.06%) ⬇️
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Replace hardcoded KNOWN_CRYPTO set with a generated file sourced from
CoinGecko's top 500 coins by market cap. Stock ticker conflicts (A, B,
T, etc.) are excluded at generation time.

Run `npx tsx scripts/update-crypto-symbols.ts` to refresh the list.
@GeiserX GeiserX merged commit 8f6bef2 into main May 6, 2026
5 checks passed
@GeiserX GeiserX deleted the fix/revolut-65c-crypto-misclassification branch May 6, 2026 07:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant