shapeshift / web

ShapeShift Web
https://app.shapeshift.com
MIT License
172 stars 185 forks source link

feat: bitcoinjs-lib remove MAX_SAFE_INTEGER limitations #8130

Closed gomesalexandre closed 1 week ago

gomesalexandre commented 1 week ago

Description

i.e those limitations are perfectly fine for Bitcoin as we will never overflow them, but for e.g DOGE, it's pretty easy to end up in situation with outputs for which the value is greater than MAX_SAFE_INTEGER (but lower than MAX_VALUE).

This removes the check to unbork things for that user.

Issue (if applicable)

closes https://github.com/shapeshift/web/issues/8128

Risk

High Risk PRs Require 2 approvals

What protocols, transaction types, wallets or contract interactions might be affected by this PR?

Very high - for those high-value Txs, things could overflow. If any output Tx is malformed, this could end up in either receiving less than attempted, getting less change than expected, or a mix of both, with the network being gifted the overflown mistake.

Testing

Engineering

Operations

Screenshots (if applicable)

image image
kaladinlight commented 1 week ago

This is the wrong bitcoinjs-lib. We need to patch the shapeshift fork currently being used in hdwallet