This repository was archived by the owner on Jan 14, 2026. It is now read-only.
feat: add getSummary() method for exact swap amounts and fees#38
Merged
Conversation
Add SwapSummary interface and getSummary() method to SwapComposer that returns exact input/output amounts and total fees after swap execution. - Extract input amount from user-signed transaction during processing - Extract output amount from inner transaction after execution - Track transaction IDs and sender addresses for both input and output - Return undefined until execute() completes with all data available
github-actions Bot
added a commit
that referenced
this pull request
Jan 10, 2026
# [1.7.0](v1.6.0...v1.7.0) (2026-01-10) ### Features * add getSummary() method for exact swap amounts and fees ([#38](#38)) ([b90cf49](b90cf49))
Contributor
|
🎉 This PR is included in version 1.7.0 🎉 The release is available on: Your semantic-release bot 📦🚀 |
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 subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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
Adds a
getSummary()method toSwapComposerthat returns exact swap input/output amounts and transaction fees after execution. This enables displaying a complete summary of what was sent, received, and paid in fees once a swap has been committed to the network.The implementation tracks the input payment/asset transfer transaction and the output app call transaction, then extracts the actual output amount from the inner transaction that transfers funds to the user.
Details
Key changes
getSummary()method: Returns aSwapSummaryobject afterexecute()is called, containing:SwapSummarytype: Added totypes.tswith full documentationTesting
getSummary()returnsundefinedbefore execution