Skip to content

fix: Broken deposit monitor toasts cp-7.57.0#21165

Merged
gambinish merged 12 commits into
mainfrom
perps/fix-deposit-withdraw-toast
Oct 15, 2025
Merged

fix: Broken deposit monitor toasts cp-7.57.0#21165
gambinish merged 12 commits into
mainfrom
perps/fix-deposit-withdraw-toast

Conversation

@gambinish

@gambinish gambinish commented Oct 14, 2025

Copy link
Copy Markdown
Member

Description

Fixes a regression to Deposit toasts not firing. Also removes time estimation from non arb.USDC deposits as they weren't as accurate as they would seem, since they require multiple bridge txns.

Changelog

CHANGELOG entry: Fix regression to perps deposit toasts

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

Screen.Recording.2025-10-14.at.2.27.02.PM.mov
Screenshot 2025-10-14 at 2 33 48 PM

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

Adds a deposit status hook that drives perps deposit toasts (in-progress/success/error) with balance monitoring, wires it into the stream bridge, and defines Arbitrum chainId hex.

  • Perps:
    • Deposit monitoring: Introduces usePerpsDepositStatus to subscribe to TransactionController updates, show in‑progress toasts (0s for arb.USDC, 60s otherwise), detect success via live availableBalance increase, and surface errors with cleanup.
    • Integration: Invokes usePerpsDepositStatus from components/UI/Perps/components/PerpsStreamBridge.tsx alongside withdrawal status.
    • Tests: Adds comprehensive unit tests in hooks/usePerpsDepositStatus.test.ts covering transaction handling, balance monitoring, controller error handling, and cleanup.
  • Config:
    • Adds ARBITRUM_MAINNET_CHAIN_ID_HEX in constants/hyperLiquidConfig.ts.

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

@github-actions

Copy link
Copy Markdown
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.

@gambinish gambinish added team-perps Perps team and removed team-earn labels Oct 14, 2025
@github-actions github-actions Bot added size-L and removed size-M labels Oct 14, 2025
@gambinish gambinish marked this pull request as ready for review October 14, 2025 22:46
@gambinish gambinish requested a review from a team as a code owner October 14, 2025 22:46
cursor[bot]

This comment was marked as outdated.

dylanbutler1
dylanbutler1 previously approved these changes Oct 15, 2025
cursor[bot]

This comment was marked as outdated.

@github-actions github-actions Bot added size-XL and removed size-L labels Oct 15, 2025
cursor[bot]

This comment was marked as outdated.

@Matt561 Matt561 self-requested a review October 15, 2025 19:44
Matt561
Matt561 previously approved these changes Oct 15, 2025

@Matt561 Matt561 left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tests well on iOS simulator. 👍

Comment thread app/components/UI/Perps/controllers/PerpsController.ts Outdated
@gambinish

Copy link
Copy Markdown
Member Author

Adding recordings from latest commits:

Screen.Recording.2025-10-15.at.12.20.15.PM.mov
Screen.Recording.2025-10-15.at.12.21.11.PM.mov

@sonarqubecloud

Copy link
Copy Markdown

@gambinish gambinish enabled auto-merge October 15, 2025 20:29
@Matt561 Matt561 self-requested a review October 15, 2025 20:44
@gambinish gambinish added this pull request to the merge queue Oct 15, 2025
Merged via the queue into main with commit 0600647 Oct 15, 2025
94 checks passed
@gambinish gambinish deleted the perps/fix-deposit-withdraw-toast branch October 15, 2025 21:01
@github-actions github-actions Bot locked and limited conversation to collaborators Oct 15, 2025
@metamaskbot metamaskbot added the release-7.58.0 Issue or pull request that will be included in release 7.58.0 label Oct 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-7.58.0 Issue or pull request that will be included in release 7.58.0 size-L team-perps Perps team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants