Skip to content

Classify Cardano pool IDs as bech32 or hex - #56

Merged
Nebyt merged 3 commits into
mainfrom
feat/pool-id
Aug 24, 2026
Merged

Nebyt merged 3 commits into
mainfrom
feat/pool-id

Conversation

@Nebyt

@Nebyt Nebyt commented Aug 24, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • Accept pool1… bech32 IDs or 56-character hex pool key hashes, with trim/0x/case normalization.
  • Unit-test empty input, wrong hex length, and unrelated address strings.

Stack

  • Base: main
  • Depends on: none (independent of the token-mint stack)
  • Follow-up PR: stake delegation card

Test plan

  • npx jest src/utils/poolId.test.js

Made with Cursor

Nebyt and others added 2 commits August 24, 2026 13:25
Normalize pool1… and 56-character hex key hashes in one place before they are turned into CSL pool key hashes.

Co-authored-by: Cursor <cursoragent@cursor.com>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.

Reviewed by Cursor Bugbot for commit 05b87c0. Configure here.

Comment thread src/utils/poolId.js
A pool1 string must decode and carry a 28-byte key hash, so truncated, padded, or checksum-invalid IDs never reach stake-delegation as if they were real.

Co-authored-by: Cursor <cursoragent@cursor.com>
@Nebyt
Nebyt merged commit d10e65c into main Aug 24, 2026
5 checks passed
@Nebyt
Nebyt deleted the feat/pool-id branch August 24, 2026 12:34
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