Skip to content

Commit 4d18033

Browse files
sirdeggenclaude
andauthored
refactor(conformance): reduce cognitive complexity in sdk dispatcher (#82)
* refactor(conformance): reduce cognitive complexity in sdk dispatcher Extract 30+ sub-handler functions into sdkHelpers.ts to bring all 8 S3776 violations (max complexity 71) below the 15-allowed threshold. Removes dead StorageUtils import and redundant odd-hex padding. 6601 conformance vectors continue to pass. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * refactor(conformance): drive remaining S3776 below threshold in sdkHelpers Extract helpers to bring functions at L195 (CC 19) and L696 (CC 21) under the cognitive-complexity limit of 15. - merklePathFromBump (CC 19) → split into assertMerklePathStructure, assertTxidMerkleRoots, assertSparseTxidRoots; public function now CC 2 - dispatchNodeTransactionFixture (CC 21) → split into parseTransactionOrReturnInvalid, countRejectedSpends, countOneSpend; public function now CC 3 Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com> * chore(sonar): remove unused ECDSA and decodeMessage imports ECDSA usage moved to sdkHelpers.ts during the L195/L696 refactor (commit 1b04e0e); the import in sdk.ts is now dead. decodeMessage is exported from sdk.ts but never consumed by sdkHelpers.ts. --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
1 parent 46532a3 commit 4d18033

2 files changed

Lines changed: 854 additions & 633 deletions

File tree

0 commit comments

Comments
 (0)