Skip to content

Conversation

@matthewwalsh0
Copy link
Member

@matthewwalsh0 matthewwalsh0 commented Nov 19, 2025

Description

Automatically add the Polygon USDCe token when opening the Predict withdraw confirmation.

Changelog

CHANGELOG entry: null

Related issues

Fixes: #22720

Manual testing steps

Screenshots/Recordings

Before

After

Pre-merge author checklist

Pre-merge reviewer checklist

  • I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
  • I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots.

Note

Auto-adds Polygon USDCe when opening Predict withdraw and updates token/balance selectors to search chain-wide and resolve the correct EVM address.

  • Confirmations UI
    • Automatically adds Polygon USDCe via useAddToken in predict-withdraw-info.tsx on Predict withdraw open (using CHAIN_IDS.POLYGON and POLYGON_USDCE).
  • Token/Balance Hook (useTokenWithBalance.ts)
    • Resolves selected EVM EOA from selectSelectedAccountGroupInternalAccounts; falls back to selected account.
    • Uses selectedEvmAddress for token balance queries and derives native balance from selectAccountsByChainId instead of selectAccountBalanceByChainId.
  • Selectors (tokensController.ts)
    • selectSingleTokenByAddressAndChainId now searches all addresses for a chain (not only the selected address).
    • selectAllTokensFlat returns tokens across addresses per chain.
  • Tests (tokensController.test.ts)
    • Updated to reflect chain-wide token lookup and flat token aggregation across addresses; added cases for non-selected address token retrieval.

Written by Cursor Bugbot for commit 0a1bd0d. This will update automatically on new commits. Configure here.

@matthewwalsh0 matthewwalsh0 added team-confirmations Push issues to confirmations team no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed labels Nov 19, 2025
@matthewwalsh0 matthewwalsh0 changed the title fix: predict withdraw with missing token fix: cp-7.60.0 predict withdraw with missing token Nov 19, 2025
@matthewwalsh0 matthewwalsh0 marked this pull request as ready for review November 19, 2025 01:54
@matthewwalsh0 matthewwalsh0 requested a review from a team as a code owner November 19, 2025 01:54
@matthewwalsh0 matthewwalsh0 force-pushed the fix/predict-withdraw-missing-token branch from b427bfa to 0a1bd0d Compare November 19, 2025 16:08
@github-actions
Copy link
Contributor

🔍 Smart E2E Test Selection

  • Selected E2E tags: SmokeAccounts, SmokeCore, SmokeConfirmationsRedesigned, SmokeIdentity, SmokeNetworkAbstractions, SmokeNetworkExpansion, SmokeTrade, SmokeWalletPlatform, SmokeWalletUX, SmokeAssets, SmokeSwaps, SmokeStake, SmokeCard, SmokeNotifications, SmokeRewards, SmokePerps, SmokeRamps, SmokeMultiChainPermissions, SmokeAnalytics, SmokeMultiChainAPI, SmokePredictions
  • Risk Level: high
  • AI Confidence: %
click to see 🤖 AI reasoning details

Fallback: AI analysis did not complete successfully. Running all tests.

View GitHub Actions results

@sonarqubecloud
Copy link

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

Labels

no-changelog no-changelog Indicates no external facing user changes, therefore no changelog documentation needed size-S team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]: Predict: Withdraw failing with Decoded USDC amount is invalid or too large

2 participants