Skip to content

fix: filter empty scam proposal ids - #52

Open
modernzju wants to merge 8 commits into
chainapsis:mainfrom
modernzju:main
Open

fix: filter empty scam proposal ids#52
modernzju wants to merge 8 commits into
chainapsis:mainfrom
modernzju:main

Conversation

@modernzju

Copy link
Copy Markdown

Summary

Fixes the scam proposal API so it no longer returns empty proposal IDs for files that end with a trailing newline.

What changed

  • Filters empty lines when reading scam-proposals/*.txt
  • Keeps proposal range expansion, but avoids mutating the array while iterating
  • Uses a more accurate response type for the API handler

Why

Most proposal list files end with a newline. The previous parsing logic split on \n but did not remove empty entries, so the API response could include "" as a proposal ID. The scam validators API already filters empty lines, so this makes the proposal API consistent.

Testing

  • Ran git diff --check
  • Simulated parsing all 27 scam-proposals files and confirmed no empty proposal IDs are produced
  • npm run lint

phishing-block-list-bot and others added 8 commits May 28, 2026 06:10
Chain: cosmos
Proposal: #99999999
Domains: synthetic-test.invalid
Approved by: U06H5N9D67R
Chain: cosmos
Proposal: #1038
Domains: atomplay.at, miro.medium.com, recosmo2.xyz
Approved by: U06H5N9D67R
Chain: cosmos
Proposal: #1039
Approved by: U06H5N9D67R
Chain: cosmos
Proposal: #1040
Domains: cosmos67.at, recosmo7.xyz
Approved by: U06H5N9D67R
Chain: cosmos
Proposal: #1042
Domains: atomgame.at, blocklist.keplr.app
Approved by: U06H5N9D67R
Signed-off-by: modernzju <modernzju@outlook.com>
@vercel

vercel Bot commented Jun 20, 2026

Copy link
Copy Markdown

@modernzju is attempting to deploy a commit to the Keplr Team on Vercel.

A member of the Team first needs to authorize it.

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.

2 participants