Conversation
The fixture captured the live BASE_ASSET value of 11 (millisatoshi). BTC webhook amounts are satoshis, so the documented contract in amboss-shared and the corrected database row both use 8. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
bufo24
force-pushed
the
fix/AMB-3240-btc-webhook-fixture-precision
branch
from
September 22, 2026 09:27
b5fa057 to
5c8e6b1
Compare
bufo24
marked this pull request as ready for review
September 22, 2026 09:27
wthrajat
approved these changes
Sep 22, 2026
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.
Changes
precision: 11→precision: 8in the BTCBASE_ASSETblocks of the webhook verification fixture (webhooks.test.ts:18,29).Why
The fixture was captured from a live payload, and the live value is wrong. The BTC
BASE_ASSETrow was seeded with11(millisatoshi) while BTC wire amounts are satoshis — so an integrator readingprecisionat runtime, as our docs instruct, sends 1000x too much.AmbossTech/amboss-shared#1079corrects the row to8.amboss-shared/src/types/webhook-events.ts:26-28already documents BTC webhook payloads asprecision: 8, so this aligns the fixture with the contract rather than inventing a new value.Notes for the reviewer
precision; it passes the value from the GraphQL response straight through to the caller. Verified: noMath.pow,10 **, or division near aprecisionreference anywhere inpackages/.BODYat runtime viasign()(webhooks.test.ts:48-50), so there is no hardcoded HMAC to regenerate. No assertion readsprecision.ambosstech-sdkholds an identical fixture but appears superseded by this repo (its HEAD is ~3 months older). Left alone — say the word if it's still live and I'll match it.Test plan
pnpm run test— 62 pass, 0 failamboss-shared#1079, so the fixture and the database agreeNote:
pnpm --filter @ambosstech/payments run testalone fails every test file —@ambosstech/coremust be built first, which the roottestscript does. Not related to this change.🤖 Generated with Claude Code