Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
I
interface
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
LuckySwap
interface
Commits
dd1b5ef4
Commit
dd1b5ef4
authored
Sep 09, 2024
by
Uniswap Labs Service Account
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci(release): publish latest release
parent
cd6e81be
Changes
9
Hide whitespace changes
Inline
Side-by-side
Showing
9 changed files
with
195 additions
and
17 deletions
+195
-17
RELEASE
RELEASE
+6
-11
VERSION
VERSION
+1
-1
index.ts
apps/web/src/state/index.ts
+1
-1
migrations.test.ts
apps/web/src/state/migrations.test.ts
+1
-1
migrations.ts
apps/web/src/state/migrations.ts
+2
-0
16.test.ts
apps/web/src/state/migrations/16.test.ts
+1
-1
17.test.ts
apps/web/src/state/migrations/17.test.ts
+136
-0
17.ts
apps/web/src/state/migrations/17.ts
+44
-0
utils.ts
packages/uniswap/src/features/search/utils.ts
+3
-2
No files found.
RELEASE
View file @
dd1b5ef4
IPFS hash of the deployment:
- CIDv0: `Qm
NseCQM3gjdY5cnH16fzEDwnaik9pnuLDaAXAWbET2gef
`
- CIDv1: `bafybei
ah6bwq7dezzdlgk22o5nbiel2t73ev5tpo75mqebz5f4p5dw5v5q
`
- CIDv0: `Qm
THCMo5RJfwvTbGVNppipkh5CmXYx9SPkyJM7qzyP4uLM
`
- CIDv1: `bafybei
cjm7s57co32yesjceb5zxpmrmzex4qqxt5ynyw57nov7xo46kwzi
`
The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org).
...
...
@@ -10,15 +10,10 @@ You can also access the Uniswap Interface from an IPFS gateway.
Your Uniswap settings are never remembered across different URLs.
IPFS gateways:
- https://bafybei
ah6bwq7dezzdlgk22o5nbiel2t73ev5tpo75mqebz5f4p5dw5v5q
.ipfs.dweb.link/
- https://bafybei
ah6bwq7dezzdlgk22o5nbiel2t73ev5tpo75mqebz5f4p5dw5v5q
.ipfs.cf-ipfs.com/
- [ipfs://Qm
NseCQM3gjdY5cnH16fzEDwnaik9pnuLDaAXAWbET2gef/](ipfs://QmNseCQM3gjdY5cnH16fzEDwnaik9pnuLDaAXAWbET2gef
/)
- https://bafybei
cjm7s57co32yesjceb5zxpmrmzex4qqxt5ynyw57nov7xo46kwzi
.ipfs.dweb.link/
- https://bafybei
cjm7s57co32yesjceb5zxpmrmzex4qqxt5ynyw57nov7xo46kwzi
.ipfs.cf-ipfs.com/
- [ipfs://Qm
THCMo5RJfwvTbGVNppipkh5CmXYx9SPkyJM7qzyP4uLM/](ipfs://QmTHCMo5RJfwvTbGVNppipkh5CmXYx9SPkyJM7qzyP4uLM
/)
### 5.45.3 (2024-09-05)
### Bug Fixes
* **web:** filter sugessstions if chain is undefined (#11572) f71048d
### 5.45.4 (2024-09-09)
VERSION
View file @
dd1b5ef4
web/5.45.3
\ No newline at end of file
web/5.45.4
\ No newline at end of file
apps/web/src/state/index.ts
View file @
dd1b5ef4
...
...
@@ -13,7 +13,7 @@ import { isDevEnv, isTestEnv } from 'utilities/src/environment'
const
persistConfig
:
PersistConfig
<
InterfaceState
>
=
{
key
:
'
interface
'
,
version
:
1
6
,
// see migrations.ts for more details about this version
version
:
1
7
,
// see migrations.ts for more details about this version
storage
:
localForage
.
createInstance
({
name
:
INDEXED_DB_REDUX_TABLE_NAME
,
driver
:
localForage
.
LOCALSTORAGE
,
...
...
apps/web/src/state/migrations.test.ts
View file @
dd1b5ef4
...
...
@@ -13,7 +13,7 @@ const defaultState = {
user
:
{},
_persist
:
{
rehydrated
:
true
,
version
:
1
6
,
version
:
1
7
,
},
application
:
{
chainId
:
null
,
...
...
apps/web/src/state/migrations.ts
View file @
dd1b5ef4
...
...
@@ -10,6 +10,7 @@ import { migration13 } from 'state/migrations/13'
import
{
migration14
}
from
'
state/migrations/14
'
import
{
migration15
}
from
'
state/migrations/15
'
import
{
migration16
}
from
'
state/migrations/16
'
import
{
migration17
}
from
'
state/migrations/17
'
import
{
migration2
}
from
'
state/migrations/2
'
import
{
migration3
}
from
'
state/migrations/3
'
import
{
migration4
}
from
'
state/migrations/4
'
...
...
@@ -47,6 +48,7 @@ export const migrations: MigrationManifest = {
14
:
migration14
,
15
:
migration15
,
16
:
migration16
,
17
:
migration17
,
}
as
const
export
const
INDEXED_DB_REDUX_TABLE_NAME
=
'
redux
'
...
...
apps/web/src/state/migrations/16.test.ts
View file @
dd1b5ef4
...
...
@@ -58,7 +58,7 @@ const migrator = createMigrate(
{
debug
:
false
},
)
describe
(
'
migration to v1
5
'
,
()
=>
{
describe
(
'
migration to v1
6
'
,
()
=>
{
it
(
'
migrates from user.tokens to shared tokens slice
'
,
async
()
=>
{
const
result
:
any
=
await
migrator
(
previousState
,
16
)
expect
(
result
.
user
.
tokens
).
toBe
(
undefined
)
...
...
apps/web/src/state/migrations/17.test.ts
0 → 100644
View file @
dd1b5ef4
import
{
createMigrate
}
from
'
redux-persist
'
import
{
migration1
}
from
'
state/migrations/1
'
import
{
migration10
}
from
'
state/migrations/10
'
import
{
migration11
}
from
'
state/migrations/11
'
import
{
migration12
}
from
'
state/migrations/12
'
import
{
migration13
}
from
'
state/migrations/13
'
import
{
migration14
}
from
'
state/migrations/14
'
import
{
migration15
}
from
'
state/migrations/15
'
import
{
migration16
}
from
'
state/migrations/16
'
import
{
PersistAppStateV17
,
migration17
}
from
'
state/migrations/17
'
import
{
migration2
}
from
'
state/migrations/2
'
import
{
migration3
}
from
'
state/migrations/3
'
import
{
migration4
}
from
'
state/migrations/4
'
import
{
migration5
}
from
'
state/migrations/5
'
import
{
migration6
}
from
'
state/migrations/6
'
import
{
migration7
}
from
'
state/migrations/7
'
import
{
migration8
}
from
'
state/migrations/8
'
import
{
migration9
}
from
'
state/migrations/9
'
import
{
SafetyLevel
}
from
'
uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks
'
import
{
SearchResultType
}
from
'
uniswap/src/features/search/SearchResult
'
const
previousState
:
PersistAppStateV17
=
{
_persist
:
{
version
:
16
,
rehydrated
:
true
,
},
searchHistory
:
{
results
:
[
// token selector saved native asset
{
type
:
SearchResultType
.
Token
,
chainId
:
1
,
address
:
'
0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
'
,
name
:
'
Ethereum
'
,
symbol
:
'
ETH
'
,
logoUrl
:
'
https://token-icons.s3.amazonaws.com/eth.png
'
,
safetyLevel
:
SafetyLevel
.
Verified
,
searchId
:
'
token-1-0xeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee
'
,
},
// navbar saved native asset
{
type
:
SearchResultType
.
Token
,
chainId
:
1
,
symbol
:
'
ETH
'
,
address
:
null
,
name
:
'
Ethereum
'
,
logoUrl
:
'
https://token-icons.s3.amazonaws.com/eth.png
'
,
safetyLevel
:
SafetyLevel
.
Verified
,
searchId
:
'
token-1-null
'
,
},
// token selector saved token
{
type
:
SearchResultType
.
Token
,
chainId
:
42161
,
symbol
:
'
USDC
'
,
address
:
'
0xaf88d065e77c8cc2239327c5edb3a432268e5831
'
,
name
:
'
USD Coin
'
,
logoUrl
:
'
https://coin-images.coingecko.com/coins/images/6319/large/usdc.png?1696506694
'
,
safetyLevel
:
SafetyLevel
.
Verified
,
searchId
:
'
token-42161-0xaf88d065e77c8cc2239327c5edb3a432268e5831
'
,
},
// navbar saved nft collection
{
type
:
SearchResultType
.
NFTCollection
,
chainId
:
1
,
address
:
'
0xbd3531da5cf5857e7cfaa92426877b022e612cf8
'
,
name
:
'
Pudgy Penguins
'
,
imageUrl
:
'
https://i.seadn.io/gae/yNi-XdGxsgQCPpqSio4o31ygAV6wURdIdInWRcFIl46UjUQ1eV7BEndGe8L661OoG-clRi7EgInLX4LPu9Jfw4fq0bnVYHqg7RFi?w=500&auto=format
'
,
isVerified
:
true
,
searchId
:
'
nftCollection-1-0xbd3531da5cf5857e7cfaa92426877b022e612cf8
'
,
},
],
},
}
const
migrator
=
createMigrate
(
{
1
:
migration1
,
2
:
migration2
,
3
:
migration3
,
4
:
migration4
,
5
:
migration5
,
6
:
migration6
,
7
:
migration7
,
8
:
migration8
,
9
:
migration9
,
10
:
migration10
,
11
:
migration11
,
12
:
migration12
,
13
:
migration13
,
14
:
migration14
,
15
:
migration15
,
16
:
migration16
,
17
:
migration17
,
},
{
debug
:
false
},
)
describe
(
'
migration to v17
'
,
()
=>
{
it
(
'
migrates potentially invalid searchHistory
'
,
async
()
=>
{
const
result
:
any
=
await
migrator
(
previousState
,
17
)
expect
(
result
.
searchHistory
.
results
).
toEqual
([
{
type
:
SearchResultType
.
Token
,
chainId
:
1
,
symbol
:
'
ETH
'
,
address
:
null
,
name
:
'
Ethereum
'
,
logoUrl
:
'
https://token-icons.s3.amazonaws.com/eth.png
'
,
safetyLevel
:
SafetyLevel
.
Verified
,
searchId
:
'
token-1-null
'
,
},
{
type
:
SearchResultType
.
Token
,
chainId
:
42161
,
symbol
:
'
USDC
'
,
address
:
'
0xaf88d065e77c8cc2239327c5edb3a432268e5831
'
,
name
:
'
USD Coin
'
,
logoUrl
:
'
https://coin-images.coingecko.com/coins/images/6319/large/usdc.png?1696506694
'
,
safetyLevel
:
SafetyLevel
.
Verified
,
searchId
:
'
token-42161-0xaf88d065e77c8cc2239327c5edb3a432268e5831
'
,
},
{
type
:
SearchResultType
.
NFTCollection
,
chainId
:
1
,
address
:
'
0xbd3531da5cf5857e7cfaa92426877b022e612cf8
'
,
name
:
'
Pudgy Penguins
'
,
imageUrl
:
'
https://i.seadn.io/gae/yNi-XdGxsgQCPpqSio4o31ygAV6wURdIdInWRcFIl46UjUQ1eV7BEndGe8L661OoG-clRi7EgInLX4LPu9Jfw4fq0bnVYHqg7RFi?w=500&auto=format
'
,
isVerified
:
true
,
searchId
:
'
nftCollection-1-0xbd3531da5cf5857e7cfaa92426877b022e612cf8
'
,
},
])
})
})
apps/web/src/state/migrations/17.ts
0 → 100644
View file @
dd1b5ef4
import
{
PersistState
}
from
'
redux-persist
'
import
{
SearchResult
,
SearchResultType
}
from
'
uniswap/src/features/search/SearchResult
'
import
{
searchResultId
}
from
'
uniswap/src/features/search/searchHistorySlice
'
import
{
tokenAddressOrNativeAddress
}
from
'
uniswap/src/features/search/utils
'
export
type
PersistAppStateV17
=
{
_persist
:
PersistState
searchHistory
?:
{
results
:
SearchResult
[]
}
}
/**
* Move potentially invalid native asset search history items to valid format
*/
export
const
migration17
=
(
state
:
PersistAppStateV17
|
undefined
)
=>
{
if
(
!
state
)
{
return
}
const
newState
:
any
=
{
...
state
}
// amend existing recently searched native assets that were saved with
// an address when they should not have been
newState
.
searchHistory
.
results
.
forEach
((
result
:
SearchResult
)
=>
{
if
(
result
.
type
===
SearchResultType
.
Token
&&
result
.
address
)
{
const
nativeAddress
=
tokenAddressOrNativeAddress
(
result
.
address
,
result
.
chainId
)
if
(
result
.
address
!==
nativeAddress
)
{
result
.
address
=
nativeAddress
result
.
searchId
=
searchResultId
(
result
)
}
}
})
// dedupe search history
const
dedupedSearchHistory
=
newState
.
searchHistory
.
results
.
filter
(
(
result
:
SearchResult
,
index
:
number
,
self
:
SearchResult
[])
=>
self
.
findIndex
((
t
)
=>
t
.
searchId
===
result
.
searchId
)
===
index
,
)
newState
.
searchHistory
.
results
=
dedupedSearchHistory
return
{
...
newState
,
_persist
:
{
...
state
.
_persist
,
version
:
17
}
}
}
packages/uniswap/src/features/search/utils.ts
View file @
dd1b5ef4
...
...
@@ -5,10 +5,11 @@ import { buildCurrencyId, currencyIdToGraphQLAddress } from 'uniswap/src/utils/c
export
const
BACKEND_NATIVE_CHAIN_ADDRESS_STRING
=
'
NATIVE
'
export
function
tokenAddressOrNativeAddress
(
address
:
string
,
chainId
:
UniverseChainId
):
string
|
null
{
if
(
address
!==
BACKEND_NATIVE_CHAIN_ADDRESS_STRING
)
{
const
nativeAddress
=
getNativeAddress
(
chainId
)
if
(
address
!==
BACKEND_NATIVE_CHAIN_ADDRESS_STRING
&&
address
!==
nativeAddress
)
{
return
address
}
const
nativeAddress
=
getNativeAddress
(
chainId
)
return
currencyIdToGraphQLAddress
(
buildCurrencyId
(
chainId
,
nativeAddress
))
}
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment