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

Try handle fragmented utxos #104

Draft
wants to merge 5 commits into
base: dev
Choose a base branch
from

Conversation

gavinharris-dev
Copy link
Contributor

I've got it working but I really do not know if this is a good way to handle!

This commit adds a new configuration option `MAX_ASSETS_PER_CHANGE_OUTPUT` to the `config.js` file. If the value is set, it limits the maximum number of assets per change output. The `Tx` class in `tx-builder.js` now checks this configuration and splits the change output into multiple outputs if the number of assets exceeds the limit.
@gavinharris-dev gavinharris-dev changed the base branch from main to dev September 26, 2023 05:06
spare = spareAssetUTxOs.pop();

if (!spare){
throw new Error(`UTxOs too fragmented - or no Spare UTxOs available to fix this mess`);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to change the Error - Sorry; this was me playing around!

@gavinharris-dev
Copy link
Contributor Author

We need to get some more tests to ensure that we are still correctly balancing the Transaction.

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