File tree 3 files changed +22
-16
lines changed
apps/web/src/components/AccountDrawer
3 files changed +22
-16
lines changed Original file line number Diff line number Diff line change 1
1
IPFS hash of the deployment:
2
- - CIDv0: `QmQJQv4CsTmaz2YxvP2J6rckTN55Kpb8kgs3nuH75K4HWV `
3
- - CIDv1: `bafybeia5esoynn6udnsocgpwufk6one5vbkcvowseql5tfilf46asmveqy `
2
+ - CIDv0: `QmRHsud7WNRFUg4cTcXRxuwZYZRAhYMkYAcA97mtqwq9re `
3
+ - CIDv1: `bafybeibl3u67jwwr3vxssx7z6bbz35bk333qe6xdnkruce7pmma5uf2z74 `
4
4
5
5
The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org).
6
6
@@ -10,15 +10,15 @@ You can also access the Uniswap Interface from an IPFS gateway.
10
10
Your Uniswap settings are never remembered across different URLs.
11
11
12
12
IPFS 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 /)
16
16
17
- ### 5.64.1 (2025-01-09 )
17
+ ### 5.64.2 (2025-01-13 )
18
18
19
19
20
20
### Bug Fixes
21
21
22
- * **web:** limit orders do not work with uniswapx v2 (#14996) d520262
22
+ * **web:** fix infinite loop on analytics toggle 3a2b4dc
23
23
24
24
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 1
1
import { SettingsToggle } from 'components/AccountDrawer/SettingsToggle'
2
- import { useState } from 'react'
2
+ import { useCallback , useEffect , useState } from 'react'
3
3
import { useTranslation } from 'react-i18next'
4
4
// eslint-disable-next-line no-restricted-imports
5
5
import { analytics , getAnalyticsAtomDirect } from 'utilities/src/telemetry/analytics/analytics'
6
6
7
7
export function AnalyticsToggle ( ) {
8
- // eslint-disable-next-line @typescript-eslint/no-unused-vars
9
- const [ x , setCounter ] = useState ( 0 )
10
8
const [ allowAnalytics , setAllowAnalytics ] = useState ( true )
11
9
const { t } = useTranslation ( )
12
10
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 ] )
14
23
15
24
return (
16
25
< SettingsToggle
17
26
title = { t ( 'analytics.allow' ) }
18
27
description = { t ( 'analytics.allow.message' ) }
19
28
isActive = { allowAnalytics }
20
- toggle = { ( ) => {
21
- analytics . setAllowAnalytics ( ! allowAnalytics )
22
- setCounter ( ( c ) => c + 1 )
23
- } }
29
+ toggle = { handleToggle }
24
30
/>
25
31
)
26
32
}
You can’t perform that action at this time.
0 commit comments