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
[ ] :bug: Bug fix (Non-breaking Change: Fixes an issue)
[x] :nail_care: New Feature (Breaking/Non-breaking Change)
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
Do a sanity pass of THOR Txs and confirm they are happy (no need to broadcast - set a breakpoint inuseSendThorTx's executeTransaction at the very first line of its body and ensure memos still look sane
Engineering
Ensure checks are sane
Revert the revert of the tsconfig option efa3b15657cafa6debfa27202962b2e64e91189c
Description
We've been burned in
assertAndProcessMemo
byString.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.eFound 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
Low, though being more strict comes with its own risks - confirm the checks are sane
Testing
useSendThorTx
'sexecuteTransaction
at the very first line of its body and ensure memos still look saneEngineering
memo.ts
fileOperations
Screenshots (if applicable)