Skip to content

Conversation

@mchappell
Copy link
Member

@mchappell mchappell commented Nov 5, 2025

@mchappell mchappell requested a review from a team as a code owner November 5, 2025 11:15
@mchappell mchappell force-pushed the feat/swaps-integration branch from 7001a8c to dc695c5 Compare November 5, 2025 11:16
@lace-bot
Copy link
Collaborator

lace-bot commented Nov 5, 2025

Allure Report

allure-report-publisher generated test report!

processReports: ❌ test report for f044c0d7

passed failed skipped flaky total result
Total 31 2 4 0 37

mchappell and others added 14 commits November 5, 2025 18:40
Fix bug where slippage value resets after being changed if any other
input receives focus. The innerSlippage state now syncs with
targetSlippage when the drawer opens.
Sync localExcludedDexs with excludedDexs when the liquidity sources
drawer opens to ensure the drawer displays the current state.
Add validation for empty strings, NaN, and negative numbers in
slippage input. Handle empty string case for better UX while typing.
Add validation in handleSaveSlippage to prevent saving invalid
slippage values (NaN, <= 0, or > max).
Reset slippageError state when the drawer opens to ensure a clean
state for each drawer session.
Add comment clarifying that feeAdust is intentionally misspelled
as required by the SteelSwap API to prevent confusion.
Remove targetSlippage from useEffect dependencies to prevent
innerSlippage from resetting when targetSlippage changes while
the drawer is open. Only sync when the drawer opens.
Replace hardcoded 'Confirm' string with translation key
t('general.button.confirm') for consistency with other drawers.
Fix inconsistent capitalization from 'Steelswap' to 'SteelSwap' to
match the brand name used elsewhere in the codebase.
…rwrite

Make slippage a persistent global setting that:
- Persists to localStorage when user changes it
- Loads from localStorage on mount
- Only initializes from feature flag if no user setting exists
- Never gets overwritten by feature flag changes after user sets it
Use ref to track drawer state transitions and include targetSlippage
in dependencies to ensure current value is used when drawer opens,
preventing stale closure issues.
Use ref to track drawer state transitions and only sync when drawer
opens, preventing local state from being reset when excludedDexs
changes while drawer is open.
Validate that the stored slippage value from localStorage is a valid
number before using it to prevent type errors from corrupted storage
data.
Fix critical bug where Failure enum had same value as Success,
causing failure state to be indistinguishable from success state.
This would lead to incorrect UI rendering and state management.
Add defensive null check to prevent runtime error when unsignedTx
is null or undefined. This prevents app crash if function is called
without a valid transaction.
Fix incorrect error message that referenced 'ThemeContext' instead
of 'SwapsContext', which would be confusing for developers debugging
context issues.
Add defensive null check for unsignedTx and estimate to prevent
runtime errors. While conditionally rendered in SwapContainer,
this ensures type safety and prevents potential crashes. Moved
null check after hooks to comply with React hooks rules.
Add delay before applying feature flag defaults to ensure storage
load completes first. This prevents feature flag from overwriting
user's persisted slippage setting if feature flag loads before
storage completes.
Replace splice() with slice() to avoid mutating the original tokens
array. This prevents unexpected behavior with re-renders and state
consistency issues.
Add defensive null checks when accessing asset balances to prevent
runtime errors if asset is not found. Also fix potential undefined
string concatenation for tokenB selection.
- Add comment explaining why fetchEstimate returns early when unsignedTx exists
- Fix interval cleanup to handle undefined case properly
- Remove unused excludedDexs dependency from useEffect (already in fetchEstimate)
Add filtering to remove undefined values that could result from
missing pools in split groups. This prevents 'undefined' from
appearing in the quote sources string.
Fix misleading comment that said 'seconds' when the value is actually
in milliseconds (15 seconds = 15,000 milliseconds).
Add useRef to imports for consistency instead of using React.useRef.
This follows the standard import pattern used elsewhere in the codebase.
Add validation to check for NaN after converting quantity to number.
This prevents invalid quantity values from being sent to the API
and provides a clear error message if conversion fails.
Fix logic error where || was used instead of &&, which could cause
the empty state to not render correctly. Now properly checks if
tokens array is missing or empty before showing empty state.
Simplify the double negation logic to make it clearer. If the value
is undefined, default to false (not acknowledged), then negate to
show the disclaimer (true).
Add proper error logging and user feedback for fetchDexList and
fetchSwappableTokensList. Errors are now logged to console and
user is notified via toast notification instead of silently failing.
Replace console.error with logger from @lace/common for consistency
with the rest of the codebase. Logger provides error capturing
(Sentry) in addition to console output.
Make error handling more consistent by always returning (not throwing)
and logging errors appropriately. 406 status still shows specific
error message, while other errors show generic message with logging.
… issues

Add check to ensure decimals is greater than 0 before using it in
division and toFixed operations. This prevents potential issues with
edge case tokens that might have zero or negative decimals.
Extract hardcoded values (900 for TTL, 20 for pagination) to named
constants in const.ts for better maintainability and clarity.
Add basic runtime validation for API responses to ensure they have
the expected structure before using them. This prevents runtime
errors if the API returns unexpected data.
…nsList

Remove toast notification that referenced non-existent translation key
and restore original throw behavior
… calls

Remove STEELSWAP_TOKEN from API headers as the proxy does not require
authentication. Update comments to use relative documentation paths
instead of full URLs.
Update .env.defaults to use https://steelswap.lw.iog.io as the default
SteelSwap API URL instead of the direct API endpoint.
@sonarqubecloud
Copy link

sonarqubecloud bot commented Nov 6, 2025

Quality Gate Failed Quality Gate failed

Failed conditions
C Reliability Rating on New Code (required ≥ A)

See analysis details on SonarQube Cloud

Catch issues before they fail your Quality Gate with our IDE extension SonarQube for IDE

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants