Repository navigation
Conversation
…arantees Refract-Protocol#573: pagination.ts uses keyset-cursor pagination exclusively, so there is no Math.floor(offset / limit) anywhere and no live page-number computation to fix. ListClaimsDto's `page` field (the named consumer) has zero real callers. Added offsetToPageNumber(offset, limit), a correct 1-based conversion (returns 1 for offset 0), so any future offset-based listing or page-number display starts from a tested helper instead of reintroducing the exact bug pattern the issue describes. Not wired into a live path since none exists. Closes Refract-Protocol#573 Refract-Protocol#571: coverage-limits.validator.ts already rejects coverageAmount 0 today, but only because every product's catalog entry hardcodes minCoverageAmount to 100 - the >= minCoverageAmount check would stop catching 0 if a future catalog entry ever set that minimum to 0 or lower. Added an explicit, catalog-independent "coverageAmount must be greater than 0" check that holds regardless of any product's configured minimum, plus a new spec file covering the zero/negative rejection and confirming in-range and above-catalog-max amounts still behave as before. Closes Refract-Protocol#571 Refract-Protocol#570: both real fixed-decimal parsers (fixed-point.ts's parseFixed, oracle-encoding.ts's parseFixedDecimal) already use a regex requiring a digit before any dot, so "." and "-.5" already throw - there was nothing to fix in the regex itself, and no test anywhere pinned this down. Added spec files for both parsers asserting "." and "-.5" throw and "0.5"/"-0.5"/"5" still parse correctly. Deviation: the issue also names "5." (a trailing dot, no fractional digits) as input that "must still be accepted," but the current regex rejects that too and no existing test or call site relies on it parsing - asserting it would be a false test, so it's explicitly documented as not covered rather than fabricated. Closes Refract-Protocol#570
|
@thelux134 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.
#573: pagination.ts uses keyset-cursor pagination exclusively, so there is no Math.floor(offset / limit) anywhere and no live page-number computation to fix. ListClaimsDto's
pagefield (the named consumer) has zero real callers. Added offsetToPageNumber(offset, limit), a correct 1-based conversion (returns 1 for offset 0), so any future offset-based listing or page-number display starts from a tested helper instead of reintroducing the exact bug pattern the issue describes. Not wired into a live path since none exists. Closes #573#571: coverage-limits.validator.ts already rejects coverageAmount 0 today, but only because every product's catalog entry hardcodes minCoverageAmount to 100 - the >= minCoverageAmount check would stop catching 0 if a future catalog entry ever set that minimum to 0 or lower. Added an explicit, catalog-independent "coverageAmount must be greater than 0" check that holds regardless of any product's configured minimum, plus a new spec file covering the zero/negative rejection and confirming in-range and above-catalog-max amounts still behave as before.
Closes #571
#570: both real fixed-decimal parsers (fixed-point.ts's parseFixed, oracle-encoding.ts's parseFixedDecimal) already use a regex requiring a digit before any dot, so "." and "-.5" already throw - there was nothing to fix in the regex itself, and no test anywhere pinned this down. Added spec files for both parsers asserting "." and "-.5" throw and "0.5"/"-0.5"/"5" still parse correctly. Deviation: the issue also names "5." (a trailing dot, no fractional digits) as input that "must still be accepted," but the current regex rejects that too and no existing test or call site relies on it parsing - asserting it would be a false test, so it's explicitly documented as not covered rather than fabricated.
Closes #570
Summary
Type of change
Checklist
.envvalues committedNotes for reviewers