Repository navigation
fix: dedup logger, replace magic number, validate Stellar key format, add coverage script - #441
Merged
DeFiVC merged 1 commit intoAug 31, 2026
Conversation
…e Stellar key format Closes ChainLearnOfficial#248 Closes ChainLearnOfficial#249 Closes ChainLearnOfficial#250 Closes ChainLearnOfficial#245
|
@unlimitedengineer Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
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 #248
Closes #249
Closes #250
Closes #245
#248 — Replace hardcoded
limit: 20withWARM_PAGE_LIMIT(src/cache/warmer.ts)The
landingPageQueryon line 27 used a magic20instead of the already-definedWARM_PAGE_LIMITconstant. Now both the landing-page query and the pagination loop use the same constant.#249 — Remove duplicate Fastify logger config (
src/server.ts)Fastify's constructor was given its own inline
loggerobject (level + transport) that duplicated the identical fields already configured insrc/utils/logger.ts. Replaced the inline config with the singletonloggerimport so there is exactly one place that controls log level, transport, and serializers.#250 — Add
test:coveragescript (package.json)Added
"test:coverage": "vitest run --coverage"alongside the existingtestandtest:watchscripts.@vitest/coverage-v8is already listed as a dev dependency.#245 — Validate Stellar secret key format (
src/config/index.ts)STELLAR_PLATFORM_SECRETwas only validated withmin(1), allowing any non-empty string. Updated toregex(/^S[A-Z2-7]{55}$/)so invalid keys are rejected at startup with a clear error message.