Closed pigfrown closed 3 years ago
JavaScript does not support operators overloading and because BN is an Object you will get true
only when variables contain the same references.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Equality
If the operands are both objects, return true only if both operands reference the same object.
If you want to compare 2 BN objects you need to use methods https://github.com/indutny/bn.js#utilities like .eq
.