Skip to content

Commit

Permalink
ci(release): publish latest release
Browse files Browse the repository at this point in the history
  • Loading branch information
hello-happy-puppy committed Feb 28, 2024
1 parent b200a6b commit 84ef9a0
Show file tree
Hide file tree
Showing 3 changed files with 17 additions and 12 deletions.
14 changes: 7 additions & 7 deletions RELEASE
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
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).

Expand All @@ -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


2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
web/5.16.1
web/5.16.2
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
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'
Expand Down Expand Up @@ -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,
Expand Down

0 comments on commit 84ef9a0

Please sign in to comment.