Skip to content

Conversation

@tcheeric
Copy link
Owner

Summary

  • update the whole-BTC parsing test to use a valid BOLT11 invoice format

Testing

  • mvn -q verify (fails: missing xyz.tcheeric:nostr-java-bom:1.1.1 import POM in central)

https://chatgpt.com/codex/tasks/task_b_68ead00a996c8331a07a0515d4e7f018

@tcheeric tcheeric merged commit 6fd28ca into chore/bump-version-1.0.0-SNAPSHOT Oct 11, 2025
@tcheeric tcheeric deleted the codex/address-review-comment-in-bolt11utiltest branch October 11, 2025 22:04
Copy link

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

Comment on lines 57 to 59
@Test
// Parses BTC with no unit. Example: 1 BTC → 100,000,000,000 msat.
void parseWholeBtcNoUnit() {

Choose a reason for hiding this comment

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

P1 Badge Whole-BTC fixture still encodes zero amount

The new invoice string lnbc1p1some is not a valid 1 BTC amount for parseMsat. Because the parser splits the HRP at the first 1, this string yields an empty amount section (bc) and parseMsat returns -1 (any-amount invoice), so the assertion for 100_000_000_000L will still fail and the test never validates whole-BTC parsing. The fixture needs amount digits before the separator (e.g. lnbc11…) or the parser must revert to lastIndexOf('1').

Useful? React with 👍 / 👎.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants