Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix: Socket re-rendering issue upon network switch #2624

Merged
merged 3 commits into from
Jul 18, 2023
Merged

Conversation

LeifuChen
Copy link
Contributor

@LeifuChen LeifuChen commented Jul 18, 2023

Description

When the user is connected to the non-op network, the trade panel will be hidden, so the socket widget will be re-rendered. The PR is fixing this issue. Switching the network won't re-render the socket widget when the Bridge & Swap modal is open.

Related issue

Closes Kwenta/kwenta-private#45

Motivation and Context

How Has This Been Tested?

Case: User is connected to the Optimism Mainnet without any sUSD

  1. Click on Get sUSD
  2. Set the Source to Ethereum and Token to Ether
  3. Set the Destination to Optimism and Token to sUSD
  4. Click the Review Quote and Confirm Bridge
  5. Click the Switch chain to Ethereum
  6. Click the Bridge

Screenshots (if appropriate):

Switching the network won't re-render the socket widget when the Bridge & Swap modal is open.
截屏2023-07-18 21 55 52

@vercel
Copy link

vercel bot commented Jul 18, 2023

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
kwenta ✅ Ready (Inspect) Visit Preview Jul 18, 2023 7:11pm
kwenta-storybook ✅ Ready (Inspect) Visit Preview Jul 18, 2023 7:11pm

@codecov
Copy link

codecov bot commented Jul 18, 2023

Codecov Report

Merging #2624 (840d819) into dev (a3a5f83) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##              dev    Kwenta/kwenta#2624   +/-   ##
=======================================
  Coverage   51.30%   51.31%           
=======================================
  Files         379      379           
  Lines       11474    11475    +1     
  Branches     2721     2721           
=======================================
+ Hits         5887     5888    +1     
  Misses       5364     5364           
  Partials      223      223           
Impacted Files Coverage Δ
packages/app/src/pages/market.tsx 91.17% <100.00%> (+0.08%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@LeifuChen LeifuChen marked this pull request as ready for review July 18, 2023 19:07
@LeifuChen LeifuChen changed the title Fixed the re-rendered issue of the socket after switching the network Fixed Socket Re-rendering Issue Upon Network Switch Jul 18, 2023
@LeifuChen LeifuChen changed the title Fixed Socket Re-rendering Issue Upon Network Switch Fix: Socket re-rendering issue upon network switch Jul 18, 2023
Copy link
Contributor

@avclarke avclarke left a comment

Choose a reason for hiding this comment

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

Nice fix

@avclarke avclarke merged commit 7bdb651 into dev Jul 18, 2023
6 checks passed
@avclarke avclarke deleted the fix/socket-non-op branch July 18, 2023 20:26
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.

2 participants