Note that these functions are already used with v4 input but this was not caught due to the way bn.js is imported downstream. Making this support explicit facilitates resolving the type issue without requiring a prior full migration off bn.js v4 or resorting to peppering ts-expect-errors all over.
Explanation
BNToHex
fractionBN
fromHex
toHex
fractionBN
now uses the original BN implementation when passed a v4 BN instanceReferences
bn.js
is imported downstream. Making this support explicit facilitates resolving the type issue without requiring a prior full migration off bn.js v4 or resorting to peppering ts-expect-errors all over.4827
Changelog
@metamask/controller-utils
bn.js
v4 library:BNToHex
fractionBN
fromHex
toHex
fractionToBN
now returns output using the samebn.js
library version that created the inputChecklist