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

refactor: use bips base constant #7464

Merged
merged 2 commits into from Oct 13, 2023
Merged

refactor: use bips base constant #7464

merged 2 commits into from Oct 13, 2023

Conversation

cartcrom
Copy link
Contributor

Description

replaces hardcoded usage of 10000 as bips base w/ a constant

@vercel
Copy link

vercel bot commented Oct 13, 2023

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

Name Status Preview Comments Updated (UTC)
interface ✅ Ready (Inspect) Visit Preview 💬 Add feedback Oct 13, 2023 4:29pm

export const ONE_BIPS = new Percent(JSBI.BigInt(1), BIPS_BASE)

// used for warning states
export const ALLOWED_PRICE_IMPACT_LOW: Percent = new Percent(JSBI.BigInt(100), BIPS_BASE) // 1%
export const ALLOWED_PRICE_IMPACT_MEDIUM: Percent = new Percent(JSBI.BigInt(300), BIPS_BASE) // 3%
export const ALLOWED_PRICE_IMPACT_HIGH: Percent = new Percent(JSBI.BigInt(500), BIPS_BASE) // 5%
Copy link
Contributor Author

Choose a reason for hiding this comment

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

usage of JSBI here seemed redundant

@codecov
Copy link

codecov bot commented Oct 13, 2023

Codecov Report

Merging #7464 (d26fe24) into main (ad1e2c6) will increase coverage by 0.00%.
Report is 2 commits behind head on main.
The diff coverage is 61.53%.

Flag Coverage Δ
cloud-tests 83.60% <ø> (ø)
unit-tests 42.82% <61.53%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

@cartcrom cartcrom merged commit 7f597c0 into main Oct 13, 2023
25 checks passed
@cartcrom cartcrom deleted the bips_base branch October 13, 2023 20:15
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.

None yet

4 participants