ci(release): publish latest release

parent b200a6bd
IPFS hash of the deployment: IPFS hash of the deployment:
- CIDv0: `QmcQjAHrLBLgoJjyijTRWvPf8aYqyi4ShqfCgPJUt5KE7Q` - CIDv0: `QmZ8D4oPRH7CbNZ1ULVQedBkTLJhqv539kRTmifrva49GM`
- CIDv1: `bafybeigrb34tm6vzgzksmurnybn2upad75vcuw4lxxcqplzlofjlxbzjo4` - CIDv1: `bafybeifaiclxh6pc3bdtrrkpbvvqqxq6hz5r6htdzxaga4fikfpu2u56qi`
The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org). The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org).
...@@ -10,15 +10,15 @@ You can also access the Uniswap Interface from an IPFS gateway. ...@@ -10,15 +10,15 @@ You can also access the Uniswap Interface from an IPFS gateway.
Your Uniswap settings are never remembered across different URLs. Your Uniswap settings are never remembered across different URLs.
IPFS gateways: IPFS gateways:
- https://bafybeigrb34tm6vzgzksmurnybn2upad75vcuw4lxxcqplzlofjlxbzjo4.ipfs.dweb.link/ - https://bafybeifaiclxh6pc3bdtrrkpbvvqqxq6hz5r6htdzxaga4fikfpu2u56qi.ipfs.dweb.link/
- https://bafybeigrb34tm6vzgzksmurnybn2upad75vcuw4lxxcqplzlofjlxbzjo4.ipfs.cf-ipfs.com/ - https://bafybeifaiclxh6pc3bdtrrkpbvvqqxq6hz5r6htdzxaga4fikfpu2u56qi.ipfs.cf-ipfs.com/
- [ipfs://QmcQjAHrLBLgoJjyijTRWvPf8aYqyi4ShqfCgPJUt5KE7Q/](ipfs://QmcQjAHrLBLgoJjyijTRWvPf8aYqyi4ShqfCgPJUt5KE7Q/) - [ipfs://QmZ8D4oPRH7CbNZ1ULVQedBkTLJhqv539kRTmifrva49GM/](ipfs://QmZ8D4oPRH7CbNZ1ULVQedBkTLJhqv539kRTmifrva49GM/)
### 5.16.1 (2024-02-28) ### 5.16.2 (2024-02-28)
### Bug Fixes ### Bug Fixes
* **web:** use correct all-time swappers (#6637) 672ef4e * **web:** [hotfix] [limits] presets (#6638) 4f8964b
web/5.16.1 web/5.16.2
\ No newline at end of file \ No newline at end of file
import { Currency, CurrencyAmount, Price } from '@uniswap/sdk-core' import { Currency, CurrencyAmount, Fraction, Price } from '@uniswap/sdk-core'
import { parseUnits } from 'ethers/lib/utils' import { parseUnits } from 'ethers/lib/utils'
import JSBI from 'jsbi' import JSBI from 'jsbi'
import { useMemo } from 'react' import { useMemo } from 'react'
...@@ -37,10 +37,15 @@ export function useCurrentPriceAdjustment({ ...@@ -37,10 +37,15 @@ export function useCurrentPriceAdjustment({
const marketQuote = marketPrice.quote(oneUnitOfBaseCurrency) const marketQuote = marketPrice.quote(oneUnitOfBaseCurrency)
const parsedPriceQuote = parsedLimitPrice.quote(oneUnitOfBaseCurrency) const parsedPriceQuote = parsedLimitPrice.quote(oneUnitOfBaseCurrency)
const difference = parsedPriceQuote.subtract(marketQuote) const decimalsScalar = JSBI.exponentiate(JSBI.BigInt(10), JSBI.BigInt(18))
const percentageChange = difference.divide(marketQuote)
const currentPriceAdjustment = Math.floor(Number(percentageChange.multiply(100).toFixed(2))) const scaledMarketQuote = JSBI.BigInt(marketQuote.multiply(decimalsScalar).toFixed(0))
const scaledPriceQuote = JSBI.BigInt(parsedPriceQuote.multiply(decimalsScalar).toFixed(0))
const difference = JSBI.subtract(scaledPriceQuote, scaledMarketQuote)
const percentageChange = new Fraction(difference, scaledMarketQuote)
const currentPriceAdjustment = Math.round(Number(percentageChange.multiply(100).toFixed(2)))
return { return {
currentPriceAdjustment, currentPriceAdjustment,
priceError: limitPriceInverted ? (currentPriceAdjustment ?? 0) > 0 : (currentPriceAdjustment ?? 0) < 0, priceError: limitPriceInverted ? (currentPriceAdjustment ?? 0) > 0 : (currentPriceAdjustment ?? 0) < 0,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment