ci(release): publish latest release

parent b200a6bd
IPFS hash of the deployment:
- CIDv0: `QmcQjAHrLBLgoJjyijTRWvPf8aYqyi4ShqfCgPJUt5KE7Q`
- CIDv1: `bafybeigrb34tm6vzgzksmurnybn2upad75vcuw4lxxcqplzlofjlxbzjo4`
- CIDv0: `QmZ8D4oPRH7CbNZ1ULVQedBkTLJhqv539kRTmifrva49GM`
- CIDv1: `bafybeifaiclxh6pc3bdtrrkpbvvqqxq6hz5r6htdzxaga4fikfpu2u56qi`
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.
Your Uniswap settings are never remembered across different URLs.
IPFS gateways:
- https://bafybeigrb34tm6vzgzksmurnybn2upad75vcuw4lxxcqplzlofjlxbzjo4.ipfs.dweb.link/
- https://bafybeigrb34tm6vzgzksmurnybn2upad75vcuw4lxxcqplzlofjlxbzjo4.ipfs.cf-ipfs.com/
- [ipfs://QmcQjAHrLBLgoJjyijTRWvPf8aYqyi4ShqfCgPJUt5KE7Q/](ipfs://QmcQjAHrLBLgoJjyijTRWvPf8aYqyi4ShqfCgPJUt5KE7Q/)
- https://bafybeifaiclxh6pc3bdtrrkpbvvqqxq6hz5r6htdzxaga4fikfpu2u56qi.ipfs.dweb.link/
- https://bafybeifaiclxh6pc3bdtrrkpbvvqqxq6hz5r6htdzxaga4fikfpu2u56qi.ipfs.cf-ipfs.com/
- [ipfs://QmZ8D4oPRH7CbNZ1ULVQedBkTLJhqv539kRTmifrva49GM/](ipfs://QmZ8D4oPRH7CbNZ1ULVQedBkTLJhqv539kRTmifrva49GM/)
### 5.16.1 (2024-02-28)
### 5.16.2 (2024-02-28)
### Bug Fixes
* **web:** use correct all-time swappers (#6637) 672ef4e
* **web:** [hotfix] [limits] presets (#6638) 4f8964b
web/5.16.1
\ No newline at end of file
web/5.16.2
\ 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 JSBI from 'jsbi'
import { useMemo } from 'react'
......@@ -37,10 +37,15 @@ export function useCurrentPriceAdjustment({
const marketQuote = marketPrice.quote(oneUnitOfBaseCurrency)
const parsedPriceQuote = parsedLimitPrice.quote(oneUnitOfBaseCurrency)
const difference = parsedPriceQuote.subtract(marketQuote)
const percentageChange = difference.divide(marketQuote)
const decimalsScalar = JSBI.exponentiate(JSBI.BigInt(10), JSBI.BigInt(18))
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 {
currentPriceAdjustment,
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