fix(mock): carry the requested amount in the invoice prefix (0.3.2) - #64
Merged
Merged
Conversation
Every mock invoice began lnbc10n (1 sat) whatever amountSat asked for,
so imani-gateway-core's check that a client mint's invoice charges the
sale price (imani-gateway-core#92) refused every staging client mint.
The prefix is now lnbc{sats*10}n. Release 0.3.2.
Qodana Community for JVM5 new problems were found
☁️ View the detailed Qodana report Contact Qodana teamContact us at qodana-support@jetbrains.com
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
MockLnServerbuilt every invoice with the fixed prefixlnbc10n(1 sat), whateveramountSatwas requested. imani-gateway-core#92 now reads the price off the mint's invoice and requires it to match the sale, so every staging client mint was refused. Found while investigating cashu-mint#494.lnbc{amountSat * 10}n, the nano-BTC form of the requested amount.amountSat <= 0gives an amountless invoice.Testing
lnbc5000n1; unit cases for 1, 100, 0 and negative amounts.mvn -q verify -pl '!phoenixd-test': exit 0.phoenixd-testfails 7 tests withBindExceptionon port 9740 on unmodified develop too, because a localcashu-mint-phoenixd-mock-1container holds the port. The failures are environmental and unrelated to this change.GitHub Actions cannot start jobs on this account (billing hold).