Closed gavinharris-dev closed 11 months ago
This may help with #102 - probably will not 'solve' the issue however it will help when the users 'unfrack' their Wallets
Thanks for this contribution Gavin!
At first I thought it would be better to keep this out of the library and leave it up to the user to implement such functionality during tx building.
But this addition is clean and only a few lines of code, and at some point in the future we can set MAX_ASSETS_PER_CHANGE_OUTPUT to a sane default so a typical Helios dev never has to think about this.
This commit adds a new configuration option
MAX_ASSETS_PER_CHANGE_OUTPUT
to theconfig.js
file. If the value is set, it limits the maximum number of assets per change output. TheTx
class intx-builder.js
now checks this configuration and splits the change output into multiple outputs if the number of assets exceeds the limit.