shapeshift / web

ShapeShift Web
https://app.shapeshift.com
MIT License
157 stars 180 forks source link

feat: additional Array.prototype.split() safety #6811

Closed gomesalexandre closed 1 week ago

gomesalexandre commented 2 weeks ago

Description

follows-up on https://github.com/shapeshift/web/pull/6810 - since we can't do the noUncheckedIndexedAccess dance without having 500+ errors, this at least brings strictness for the specific case of Array.prototype.split() returning (string | undefined)[] vs. string with our current compiler options.

Note that this aims to be a non-breaking change - while the strictness is now present, all type violations have been tackled in a way that should be non-breaking, with either:

Pull Request Type

Issue (if applicable)

N/A, follows-up on https://github.com/shapeshift/web/pull/6810

Risk

High Risk PRs Require 2 approvals

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

Low but not nil by definition - see testing steps

Testing

The two above don't require new Tx - just do a full cache clear and ensure Txs look sane against develop

Engineering

Operations

Screenshots (if applicable)

Txs look sane after a cache clear (left: develop, right: this diff with cleared cache)

image image image image image image image