forked from Uniswap/widgets
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Remove unused
@uniswap/router-sdk
dependency (#10)
* Remove unused `@uniswap/router-sdk` dependency * Remove other packages that had @uniswap/router-sdk as dependency --------- Co-authored-by: Kunal Jain <jainkunal3004@gmail.com> Co-authored-by: Kunal <kunal@joinwido.com>
- Loading branch information
1 parent
974b5ca
commit 9a32f63
Showing
7 changed files
with
46 additions
and
508 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,11 @@ | ||
import { ONE } from '@uniswap/router-sdk' | ||
import { Currency, CurrencyAmount, Fraction, Percent } from '@uniswap/sdk-core' | ||
import JSBI from 'jsbi' | ||
|
||
export function calcMinimumAmountOut( | ||
slippageTolerance: Percent, | ||
amountOut: CurrencyAmount<Currency> | ||
): CurrencyAmount<Currency> { | ||
const ONE = JSBI.BigInt(1) | ||
const slippageAdjustedAmountOut = new Fraction(ONE).subtract(slippageTolerance).multiply(amountOut.quotient).quotient | ||
return CurrencyAmount.fromRawAmount(amountOut.currency, slippageAdjustedAmountOut) | ||
} |
Oops, something went wrong.
9a32f63
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Successfully deployed to the following URLs:
wido-widget – ./
wido-widget.vercel.app
wido-widget-wido.vercel.app
wido-widget-git-main-wido.vercel.app