chore: remove unused signing and auth token functions from crypto utils#58
Merged
DeFiVC merged 2 commits intoJun 27, 2026
Conversation
DeFiVC
approved these changes
Jun 27, 2026
DeFiVC
left a comment
Contributor
There was a problem hiding this comment.
PR Review: chore: remove unused signing and auth token functions from crypto utils
Author: Danielodingz | Closes: #38 | CI: ✅ Green | Conflicts: ✅ None
Blocking Issues
None.
Code Issues
None. The removal is clean — both signWithPlatformKey and generateChallengeToken are confirmed unused (grep finds zero imports outside crypto.ts). The unused imports (getPlatformKeypair, getNetworkPassphrase) are correctly removed alongside the functions.
Minor Nits
- Entire
crypto.tsmay be dead code — After this removal,verifyStellarSignatureandsha256Hashare the only remaining exports. Grep shows neither is imported anywhere in the codebase. Consider a follow-up to remove the entire file if these functions are also unused. This is outside the scope of #38.
What's Good
- Minimal, focused change — Only removes what the issue describes, no scope creep
- Correct cleanup — Functions, their JSDoc comments, and unused imports all removed together
- No functional impact — Confirmed by CI (Lint + Test both pass)
- Follows codebase conventions — Clean diff, consistent with existing style
Straightforward dead code removal. Approving."
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #38
Description
This PR addresses dead code within the
src/utils/crypto.tsfile.Previously,
signWithPlatformKey()andgenerateChallengeToken()were defined but never utilized anywhere in the codebase. The Stellar signing logic is already correctly implemented and managed directly withinsrc/stellar/signatures.ts.This cleanup reduces code duplication and streamlines the utility module by safely removing these unused functions and their corresponding dead imports.
Changes Made
src/utils/crypto.ts: Removed thesignWithPlatformKeyandgenerateChallengeTokenfunctions.src/utils/crypto.ts: Cleaned up the unused imports forgetPlatformKeypairandgetNetworkPassphrase.Impact
No functional changes or impact on existing workflows. Improves overall codebase maintainability by eliminating redundant and dead code, ensuring the Stellar signing logic remains centralized in
src/stellar/signatures.ts.