Add missing `undefined` check
What version of Stacks.js are you using?
7.0.3
Describe the bug
Seems the makeUnsignedSTXTokenTransfer builder is missing an undefined check for automatically setting the fee and nonce,
https://github.com/hirosystems/stacks.js/blob/2cf886b6419232dbb54caccf5216b4f42605f3ad/packages/transactions/src/builders.ts#L181-L191
in contrast to,
https://github.com/hirosystems/stacks.js/blob/2cf886b6419232dbb54caccf5216b4f42605f3ad/packages/transactions/src/builders.ts#L388-L398
Expected behavior
All builders should have both null + undef check to when auto-setting fee & nonce
My bad, didn't realize it was using the == operator instead of ===, which does match undefined to null. Maybe worth using something more explicit?
- like Leather's
isUndefined - or something like
isNullish(inspired by nullish) to check for either undefined or null?
Yes thanks for noting there's a few less explicit uses like this. Will add to the refactoring roadmap