Skip to content

Commit 84ef9a0

Browse files
ci(release): publish latest release
1 parent b200a6b commit 84ef9a0

File tree

3 files changed

+17
-12
lines changed

3 files changed

+17
-12
lines changed

RELEASE

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
IPFS hash of the deployment:
2-
- CIDv0: `QmcQjAHrLBLgoJjyijTRWvPf8aYqyi4ShqfCgPJUt5KE7Q`
3-
- CIDv1: `bafybeigrb34tm6vzgzksmurnybn2upad75vcuw4lxxcqplzlofjlxbzjo4`
2+
- CIDv0: `QmZ8D4oPRH7CbNZ1ULVQedBkTLJhqv539kRTmifrva49GM`
3+
- CIDv1: `bafybeifaiclxh6pc3bdtrrkpbvvqqxq6hz5r6htdzxaga4fikfpu2u56qi`
44

55
The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org).
66

@@ -10,15 +10,15 @@ You can also access the Uniswap Interface from an IPFS gateway.
1010
Your Uniswap settings are never remembered across different URLs.
1111

1212
IPFS gateways:
13-
- https://bafybeigrb34tm6vzgzksmurnybn2upad75vcuw4lxxcqplzlofjlxbzjo4.ipfs.dweb.link/
14-
- https://bafybeigrb34tm6vzgzksmurnybn2upad75vcuw4lxxcqplzlofjlxbzjo4.ipfs.cf-ipfs.com/
15-
- [ipfs://QmcQjAHrLBLgoJjyijTRWvPf8aYqyi4ShqfCgPJUt5KE7Q/](ipfs://QmcQjAHrLBLgoJjyijTRWvPf8aYqyi4ShqfCgPJUt5KE7Q/)
13+
- https://bafybeifaiclxh6pc3bdtrrkpbvvqqxq6hz5r6htdzxaga4fikfpu2u56qi.ipfs.dweb.link/
14+
- https://bafybeifaiclxh6pc3bdtrrkpbvvqqxq6hz5r6htdzxaga4fikfpu2u56qi.ipfs.cf-ipfs.com/
15+
- [ipfs://QmZ8D4oPRH7CbNZ1ULVQedBkTLJhqv539kRTmifrva49GM/](ipfs://QmZ8D4oPRH7CbNZ1ULVQedBkTLJhqv539kRTmifrva49GM/)
1616

17-
### 5.16.1 (2024-02-28)
17+
### 5.16.2 (2024-02-28)
1818

1919

2020
### Bug Fixes
2121

22-
* **web:** use correct all-time swappers (#6637) 672ef4e
22+
* **web:** [hotfix] [limits] presets (#6638) 4f8964b
2323

2424

VERSION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
web/5.16.1
1+
web/5.16.2

apps/web/src/components/CurrencyInputPanel/LimitPriceInputPanel/useCurrentPriceAdjustment.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
import { Currency, CurrencyAmount, Price } from '@uniswap/sdk-core'
1+
import { Currency, CurrencyAmount, Fraction, Price } from '@uniswap/sdk-core'
22
import { parseUnits } from 'ethers/lib/utils'
33
import JSBI from 'jsbi'
44
import { useMemo } from 'react'
@@ -37,10 +37,15 @@ export function useCurrentPriceAdjustment({
3737

3838
const marketQuote = marketPrice.quote(oneUnitOfBaseCurrency)
3939
const parsedPriceQuote = parsedLimitPrice.quote(oneUnitOfBaseCurrency)
40-
const difference = parsedPriceQuote.subtract(marketQuote)
41-
const percentageChange = difference.divide(marketQuote)
40+
const decimalsScalar = JSBI.exponentiate(JSBI.BigInt(10), JSBI.BigInt(18))
4241

43-
const currentPriceAdjustment = Math.floor(Number(percentageChange.multiply(100).toFixed(2)))
42+
const scaledMarketQuote = JSBI.BigInt(marketQuote.multiply(decimalsScalar).toFixed(0))
43+
const scaledPriceQuote = JSBI.BigInt(parsedPriceQuote.multiply(decimalsScalar).toFixed(0))
44+
45+
const difference = JSBI.subtract(scaledPriceQuote, scaledMarketQuote)
46+
const percentageChange = new Fraction(difference, scaledMarketQuote)
47+
48+
const currentPriceAdjustment = Math.round(Number(percentageChange.multiply(100).toFixed(2)))
4449
return {
4550
currentPriceAdjustment,
4651
priceError: limitPriceInverted ? (currentPriceAdjustment ?? 0) > 0 : (currentPriceAdjustment ?? 0) < 0,

0 commit comments

Comments
 (0)