I'm currently using jspurefix for a FIX initiator implementation and created a class FixAdapter extends AsciiSession as shown in the example project. While using it I noticed a bug where the Decimal object used by mathjs (jspurefix dependency) seems to overwrite the Decimal object used by decimaljs (my project dependency). This came to light when another service was trying to deserialize this Decimal and threw the following error:
UnhandledPromiseRejectionWarning: Error: Error while trying to fetch. Original error message: [DecimalError] Invalid argument: [object Object]
where instead of a "1" it contained:
{
"mathjs": "BigNumber",
"value": "1"
}
It's a pretty niche case, but can be easily fixed by tweaking the mathjs import, as seen in the PR.
Hi,
I'm currently using
jspurefix
for a FIX initiator implementation and created aclass FixAdapter extends AsciiSession
as shown in the example project. While using it I noticed a bug where theDecimal
object used bymathjs
(jspurefix
dependency) seems to overwrite theDecimal
object used bydecimaljs
(my project dependency). This came to light when another service was trying to deserialize thisDecimal
and threw the following error:where instead of a
"1"
it contained:It's a pretty niche case, but can be easily fixed by tweaking the
mathjs
import, as seen in the PR.