shapeshift / web

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

feat: assertAndProcessMemo leverage noUncheckedIndexedAccess strictness #6810

Closed gomesalexandre closed 1 week ago

gomesalexandre commented 2 weeks ago

Description

We've been burned in assertAndProcessMemo by String.prototype.split() returning an array of strings, while it's really returning (string|undefined)[], see e.g https://github.com/shapeshift/web/pull/6809.

While adding noUncheckedIndexedAccess isn't a reasonable option (i.e Found 556 errors in 119 files.), we can at least add it temporary and add the required strictness to the offenders here, which this PR does.

Pull Request Type

Issue (if applicable)

N/A

Risk

High Risk PRs Require 2 approvals

Low, though being more strict comes with its own risks - confirm the checks are sane

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

Testing

Engineering

Operations

Screenshots (if applicable)