Fix/issues 795 628 619 622 - #952
Merged
ogazboiz merged 6 commits intoJun 30, 2026
Merged
Conversation
…thdrawn > deposited -> 0) Fix the guard itself: checked_sub().unwrap_or_default() only catches i128 boundary overflow, not an ordinary negative result. Replace with saturating_sub().max(0) so any withdrawn_amount > deposited_amount correctly yields 0 without panicking. Add test_calculate_claimable_underflow_returns_zero that forces the condition via env.as_contract storage manipulation and asserts 0. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…their sunset date The 2024-12-31 sunset date is 18 months in the past. Remove both unversioned route handlers from app.ts (clients hitting them will now get a 404 rather than a 410 with a stale date). Update DEPRECATION_POLICY.md to record the routes as removed. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Gates debug/info/warn on NODE_ENV !== 'production'; always surfaces error. Provides a single import point so all call-sites can be replaced consistently. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… call-sites Replaces 14 raw console.error/warn/info calls across 9 files with the new logger helper so debug output is suppressed in production builds. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…e.* in frontend
Applies to src/**/*.{ts,tsx}, excluding src/lib/logger.ts so the logger
module itself can still reference console internally.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
…ApiBaseUrl() Remove five independent process.env.NEXT_PUBLIC_API_URL definitions (some with /v1 suffix, some without) and replace each with getApiBaseUrl() from lib/api/_shared.ts. URL paths that previously depended on a /v1 suffix in the variable now concatenate /v1 explicitly, so behaviour is identical regardless of whether the env var includes the suffix. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Closed
1 task
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.
Summary
calculate_claimableunderflow guard (withdrawn_amount > deposited_amount → 0). Also fixes the guard itself:checked_sub().unwrap_or_default()only catches i128 boundary overflow, not a simple negative result; replaced withsaturating_sub().max(0).frontend/src/lib/logger.ts(gatesdebug/info/warnonNODE_ENV !== 'production', always passeserrorthrough). Replace all 14 rawconsole.*call-sites across 9 files. Addno-consoleESLint rule forsrc/**(excluding the logger module itself)./streams,/events) frombackend/src/app.ts; their sunset date (2024-12-31) is 18 months in the past. Updatebackend/docs/DEPRECATION_POLICY.mdto mark both routes as removed.API_BASE_URL/INDEXER_URLdefinition withgetApiBaseUrl()fromfrontend/src/lib/api/_shared.tsacross 5 files.getApiBaseUrl()already strips trailing slashes and readsNEXT_PUBLIC_API_URL, so behaviour is identical whether the env var is set with or without a trailing/v1.Closes #795
Closes #628
Closes #619
Closes #622