Repository navigation
Conversation
Contributor
Preview approval requiredThis pull request comes from a fork, so Mintlify won't build a preview until someone with write access approves commit |
Contributor
|
🤖 Automated message from Doxie. I saw this new PR. I have not reviewed it, because nobody with permission has called me in. How to reach me:
|
This branch has not been deployed
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.
Fixes #3188.
The JavaScript payment monitor reads
amountfrom every decoded transfer value. A transfer without a multiplexed ID carries the amount as a plaini128, which the SDK decodes to abigint. Readingamountfrom that value returnsundefined, and the example logs a decoding error.Read the decoded
bigintdirectly and keep readingamountfrom the map when a multiplexed ID is present. This matches the Python example on the same page.Verification
Ran the amount-decoding block from the guide before and after the patch with XDR values encoded and decoded by
@stellar/[email protected].i128with amount12345678TypeErrorAmount: 12345678 stroops (1.2345678 XLM)amount: 12345678andto_muxed_id: 42Amount: 12345678 stroops (1.2345678 XLM)Amount: 12345678 stroops (1.2345678 XLM)Reproduce with the JavaScript SDK
Install
@stellar/[email protected]in a scratch directory and save the following asrepro.mjsthere. Runnode repro.mjs <path-to-send-and-receive-payments.mdx>against the base and patched guide.The repository's MDX formatting, component padding, generated RPC docs, Mintlify build, and link checks passed. On Windows, the component padding check was run in batches to stay within the command-line length limit.