project-serum / serum-ts

Project Serum TypeScript monorepo
https://projectserum.com
Apache License 2.0
270 stars 245 forks source link

getL2 use add instead of iadd #213

Closed Taylor123 closed 2 years ago

Taylor123 commented 2 years ago

getL2's usage of iadd mutates state, which can cause unwanted side effects. Switching to add so the BN isn't modified in place seems to resolve