MeshJS / mesh

An open-source library to advance Web3 development on Cardano

Home Page:https://meshjs.dev

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

largestFirst selects only uTXo's without assets

Michel-Hamont opened this issue · comments

commented

as title says. I was trying out the multi-sig minting in a next.js environment and happened to have only uTXo's with assets attached in a pre-prod browser-wallet (etrnl). It didn't pick any uTXo's resulting in an error in the tx, because input was 0 and output 11+M lovelace.
After splitting an uTXo to create a new uTXo without assets attached the tx build worked fine.
I am sure largestFirst is intended to pick non-asset holding utxos, but it creates a problem if there are no utxos without assets.

commented

closed the issue. solution: never use largestFirst, always use largestFirstMultiAsset.