metaplex-foundation / solita

Genrates an SDK API from solana contract IDL.
Apache License 2.0
142 stars 33 forks source link

fix: handling empty accounts for anchor remaining accounts #80

Closed thlorenz closed 2 years ago

thlorenz commented 2 years ago

Summary

The intent of this PR was to just handle the case of empty accounts when we try to add anchorRemainingAccounts. In this case we just assume that there are none and thus don't render any of the code allowing users to add them.

If this assumption was wrong we need to iterate on this solution.

As a side effect I ran into issues with web3.js (missing cross-fetch) which originated from it being a dep of beet-solita. Thus after upgrading numerous deps in the beet repo we updated the beet deps here to pull in those patches.