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: 🐛 Fix the pool tvl display when amount > 1B #10896

Merged
merged 5 commits into from
Oct 31, 2024

Conversation

chef-ryan
Copy link
Contributor

@chef-ryan chef-ryan commented Oct 30, 2024


PR-Codex overview

This PR introduces a new component, PoolTvlWarning, to display warnings about TVL and APR data accuracy in the PoolInfo view. It also updates localization strings to include a new warning message.

Detailed summary

  • Added PoolTvlWarning component in PoolInfo.tsx.
  • Integrated PoolTvlWarning into the PoolInfo layout.
  • Updated localization in translations.json to include:
    • New warning message about TVL and APR data.
    • Added context for users regarding the accuracy of data.

✨ Ask PR-Codex anything about this PR by commenting with /codex {your question}

Copy link

vercel bot commented Oct 30, 2024

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

Name Status Preview Comments Updated (UTC)
aptos-web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 31, 2024 3:11am
blog ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 31, 2024 3:11am
bridge ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 31, 2024 3:11am
games ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 31, 2024 3:11am
gamification ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 31, 2024 3:11am
uikit ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 31, 2024 3:11am
web ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 31, 2024 3:11am

Copy link

changeset-bot bot commented Oct 30, 2024

⚠️ No Changeset found

Latest commit: 6d788ff

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Collaborator

Choose a reason for hiding this comment

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

Typo in file name

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

<Text color="warning" as="span">
{t('TVL and APR data may not be reflected correctly due to technical limitation, please refer to')}{' '}
<TextLink target="_blank" href={link}>
{t('this link')}
Copy link
Collaborator

Choose a reason for hiding this comment

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

'info page'

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

return null
}
// const pairAddress = Pair.getAddress(token0.wrapped, token1.wrapped)
const link = `https://pancakeswap.finance/info/v3/pairs/${id}`
Copy link
Collaborator

Choose a reason for hiding this comment

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

it could be v2/SS and could be different chain

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done


const version = `${protocol === Protocol.V3 ? '/v3/' : ''}`
const stableSwap = `${protocol === Protocol.STABLE ? '?type=stableSwap' : ''}`
const link = `https://pancakeswap.finance/info/${version}${chain}/pairs/${id}${stableSwap}`
Copy link
Collaborator

Choose a reason for hiding this comment

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

better use relative link

Copy link
Contributor Author

Choose a reason for hiding this comment

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

done

@chefjackson chefjackson merged commit bb34914 into develop Oct 31, 2024
19 checks passed
@chefjackson chefjackson deleted the feature/risky-pool-info branch October 31, 2024 03:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants