File tree Expand file tree Collapse file tree 3 files changed +22
-16
lines changed
apps/web/src/components/AccountDrawer Expand file tree Collapse file tree 3 files changed +22
-16
lines changed Original file line number Diff line number Diff line change 11IPFS hash of the deployment:
2- - CIDv0: `QmQJQv4CsTmaz2YxvP2J6rckTN55Kpb8kgs3nuH75K4HWV `
3- - CIDv1: `bafybeia5esoynn6udnsocgpwufk6one5vbkcvowseql5tfilf46asmveqy `
2+ - CIDv0: `QmRHsud7WNRFUg4cTcXRxuwZYZRAhYMkYAcA97mtqwq9re `
3+ - CIDv1: `bafybeibl3u67jwwr3vxssx7z6bbz35bk333qe6xdnkruce7pmma5uf2z74 `
44
55The 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.
1010Your Uniswap settings are never remembered across different URLs.
1111
1212IPFS gateways:
13- - https://bafybeia5esoynn6udnsocgpwufk6one5vbkcvowseql5tfilf46asmveqy .ipfs.dweb.link/
14- - https://bafybeia5esoynn6udnsocgpwufk6one5vbkcvowseql5tfilf46asmveqy .ipfs.cf-ipfs.com/
15- - [ipfs://QmQJQv4CsTmaz2YxvP2J6rckTN55Kpb8kgs3nuH75K4HWV /](ipfs://QmQJQv4CsTmaz2YxvP2J6rckTN55Kpb8kgs3nuH75K4HWV /)
13+ - https://bafybeibl3u67jwwr3vxssx7z6bbz35bk333qe6xdnkruce7pmma5uf2z74 .ipfs.dweb.link/
14+ - https://bafybeibl3u67jwwr3vxssx7z6bbz35bk333qe6xdnkruce7pmma5uf2z74 .ipfs.cf-ipfs.com/
15+ - [ipfs://QmRHsud7WNRFUg4cTcXRxuwZYZRAhYMkYAcA97mtqwq9re /](ipfs://QmRHsud7WNRFUg4cTcXRxuwZYZRAhYMkYAcA97mtqwq9re /)
1616
17- ### 5.64.1 (2025-01-09 )
17+ ### 5.64.2 (2025-01-13 )
1818
1919
2020### Bug Fixes
2121
22- * **web:** limit orders do not work with uniswapx v2 (#14996) d520262
22+ * **web:** fix infinite loop on analytics toggle 3a2b4dc
2323
2424
Original file line number Diff line number Diff line change 1- web/5.64.1
1+ web/5.64.2
Original file line number Diff line number Diff line change 11import { SettingsToggle } from 'components/AccountDrawer/SettingsToggle'
2- import { useState } from 'react'
2+ import { useCallback , useEffect , useState } from 'react'
33import { useTranslation } from 'react-i18next'
44// eslint-disable-next-line no-restricted-imports
55import { analytics , getAnalyticsAtomDirect } from 'utilities/src/telemetry/analytics/analytics'
66
77export function AnalyticsToggle ( ) {
8- // eslint-disable-next-line @typescript-eslint/no-unused-vars
9- const [ x , setCounter ] = useState ( 0 )
108 const [ allowAnalytics , setAllowAnalytics ] = useState ( true )
119 const { t } = useTranslation ( )
1210
13- getAnalyticsAtomDirect ( true ) . then ( ( v : boolean ) => setAllowAnalytics ( v ) )
11+ useEffect ( ( ) => {
12+ getAnalyticsAtomDirect ( true )
13+ . then ( ( enabled ) => setAllowAnalytics ( enabled ) )
14+ . catch ( ( ) => {
15+ setAllowAnalytics ( true )
16+ } )
17+ } , [ ] )
18+
19+ const handleToggle = useCallback ( async ( ) => {
20+ await analytics . setAllowAnalytics ( ! allowAnalytics )
21+ setAllowAnalytics ( ! allowAnalytics )
22+ } , [ allowAnalytics ] )
1423
1524 return (
1625 < SettingsToggle
1726 title = { t ( 'analytics.allow' ) }
1827 description = { t ( 'analytics.allow.message' ) }
1928 isActive = { allowAnalytics }
20- toggle = { ( ) => {
21- analytics . setAllowAnalytics ( ! allowAnalytics )
22- setCounter ( ( c ) => c + 1 )
23- } }
29+ toggle = { handleToggle }
2430 />
2531 )
2632}
You can’t perform that action at this time.
0 commit comments