Skip to content

Conversation

@caieu
Copy link
Contributor

@caieu caieu commented Oct 28, 2025

Description

  • remove claimTransaction state
  • change depositTransaction to pendingDeposits

Changelog

CHANGELOG entry: null

Related issues

Fixes:

Manual testing steps

Feature: my feature name

  Scenario: user [verb for user action]
    Given [describe expected initial app state]

    When user [verb for user action]
    Then [describe expected outcome]

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

Replaces deposit tracking with per-account pendingDeposits, removes claimTransaction, and updates hooks/components/toasts/selectors and tests accordingly.

  • Controller (state + API)
    • Remove claimTransaction; replace depositTransaction with per-provider/address map pendingDeposits and add clearPendingDeposit.
    • Update depositWithConfirmation to manage pendingDeposits and validation; no claim state stored.
  • Hooks/Toasts
    • usePredictDeposit: expose isDepositPending via selectPredictPendingDepositByAddress; error handling unchanged.
    • usePredictDepositToasts: clear via clearPendingDeposit({ providerId }); supports provider param.
    • usePredictToasts: make clearTransaction optional; guard calls.
    • usePredictClaim: remove Redux status usage; keep claim and error toast.
    • usePredictClaimToasts: drop controller clearing; refresh positions on confirm.
  • Selectors
    • Add selectPredictPendingDeposits and selectPredictPendingDepositByAddress; remove deposit/claim transaction selectors.
  • UI
    • PredictBalance and PredictPositionsHeader: use isDepositPending to show “adding funds” and refresh balance when not pending.
  • Tests/Fixtures
    • Update unit tests to new state shape and behaviors; engine initial state JSON reflects pendingDeposits and removed claim/deposit transactions.

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

@github-actions
Copy link
Contributor

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.

@metamaskbot metamaskbot added the team-predict Predict team label Oct 28, 2025
@caieu caieu marked this pull request as ready for review October 28, 2025 23:37
@caieu caieu requested a review from a team as a code owner October 28, 2025 23:37
Copy link
Contributor

@matallui matallui left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

one little thing that needs fixing, but otherwise looking good

@caieu caieu requested a review from matallui October 29, 2025 13:23
cursor[bot]

This comment was marked as outdated.

@caieu caieu force-pushed the chore/predict-remove-states branch from a69e388 to 84b9c87 Compare October 29, 2025 18:34
@sonarqubecloud
Copy link

@matallui matallui added this pull request to the merge queue Oct 29, 2025
Merged via the queue into main with commit 059c861 Oct 29, 2025
152 of 154 checks passed
@matallui matallui deleted the chore/predict-remove-states branch October 29, 2025 22:02
@github-actions github-actions bot locked and limited conversation to collaborators Oct 29, 2025
@metamaskbot metamaskbot added the release-7.59.0 Issue or pull request that will be included in release 7.59.0 label Oct 29, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.59.0 Issue or pull request that will be included in release 7.59.0 size-L team-predict Predict team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants