Skip to content

fix: fix error when navigating to asset details on bridge #15409

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

Draft
wants to merge 4 commits into
base: main
Choose a base branch
from

Conversation

sahar-fehri
Copy link
Contributor

Description

Related issues

Fixes: #15407

Manual testing steps

  1. Go to this page...

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.

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.

@@ -83,7 +83,7 @@ const Price = ({

const price: number = isEvmNetworkSelected
? distributedPriceData[activeChartIndex]?.[1] || currentPrice
: Number(multichainAssetRates.rate);
: Number(multichainAssetRates?.rate);
Copy link
Contributor

Choose a reason for hiding this comment

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

Could this potentially resolve as NaN?

@@ -91,11 +92,15 @@ const AssetOverview: React.FC<AssetOverviewProps> = ({
swapsIsLive,
networkName,
}: AssetOverviewProps) => {
// For non evm assets, the resultChainId is equal to the asset.chainId; while for evm assets; the resultChainId === "eip155:1" !== asset.chainId
const resultChainId = formatChainIdToCaip(asset.chainId as Hex);
const isNonEvmAsset = resultChainId === asset.chainId ;
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Couple components were fetching data from EVM vs Non EVM selectors based on isEvmSelected
Which would work correctly if you are initially on an EVM or non EVM network initially, and then click on one of the assets from the main tokenList.

While in the bridge flow; you can initially be on a NonEVM network; then choose to bridge to an EVM network and naviagate to token details page for an EVM asset. Which meant that relying on "isEvmSelected" is no longer accurate to fetch correct data from correct selectors; hence; changed this to rely on whether the asset that is being clicked on is EVM or non EVM

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

Successfully merging this pull request may close these issues.

[Bug]: App crashes when selecting token details tooltip in dest token selector
3 participants