fix: money account selection on perps page#32007
Conversation
|
CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes. |
🔍 Smart E2E Test Selection
click to see 🤖 AI reasoning detailsE2E Test Selection:
Previously, both cases were combined in one condition, causing the explicit override to incorrectly defer to the interactive row when isResultReady was true. This change directly affects:
The change is a targeted logic fix with clear scope — it only affects the PayWithRow rendering decision, not the broader confirmation infrastructure. Performance Test Selection: |
|
Skipping sonar as its not working currently |
Description
Fix money account selection on perps page
Changelog
CHANGELOG entry:
Related issues
Fixes: https://consensyssoftware.atlassian.net/browse/CONF-1577
Manual testing steps
NA
Screenshots/Recordings
NA
Pre-merge author checklist
Performance checks (if applicable)
trace()for usage andaddTokenfor an exampleFor performance guidelines and tooling, see the Performance Guide.
Pre-merge reviewer checklist
Note
Low Risk
Small UI branching change in confirmation pay-with row with expanded unit tests; no auth or payment execution changes.
Overview
Pay with row routing now treats controller
PaymentOverride.MoneyAccountand flag-based money account default separately.An explicit money account override always renders the money account row, including on the review step when
isResultReadyis true (e.g. perps deposit). The feature-flag default still shows the money account row only before results are ready; on review it falls back to the interactive token row unless the user explicitly chose money account.Tests were updated to match and a case was added for flag-only default on review vs explicit override.
Reviewed by Cursor Bugbot for commit 957fd9e. Bugbot is set up for automated code reviews on this repo. Configure here.