Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Transaction building fixes #39

Open
wants to merge 3 commits into
base: main
Choose a base branch
from

Conversation

SupernaviX
Copy link
Contributor

All the fixes needed to build a transaction in my app!

  • Add support for a "custom" ledger (anything which implements the Ledger trait). I'm using one powered by blockfrost.
  • Hard-code a 2-ada fee. It would be better to compute the actual fee, but that looks very complicated and the logic for it probably should live somewhere more reusable.
  • Fix change calculation. The old impl used a TotalLovelaceMinusFee output, which took a list of TXOs and returned their values minus the fee. It ignored any lovelace/assets which were spent as part of other TXs. This implementation uses a TotalChange output, which looks at the values of all other inputs and outputs to run its calculation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant