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
920454a2
Commit
920454a2
authored
Sep 12, 2024
by
Uniswap Labs Service Account
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci(release): publish latest release
parent
e2030c5a
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
131 deletions
+19
-131
RELEASE
RELEASE
+7
-32
VERSION
VERSION
+1
-1
index.tsx
apps/web/src/components/NavBar/SearchBar/index.tsx
+1
-3
SearchTokens.ts
apps/web/src/graphql/data/SearchTokens.ts
+10
-95
No files found.
RELEASE
View file @
920454a2
IPFS hash of the deployment:
IPFS hash of the deployment:
- CIDv0: `Qm
UT3C4vpZnekvr6tpufvmko2T9KRR8VfDvMB3ddJhEC8s
`
- CIDv0: `Qm
PJRmYQHgjfL1W5skf8cUmsFMFGBxVmDS8svqWBT81Lew
`
- CIDv1: `bafybei
c2zedotxnbrjgoh3kki7g4oatccgiqwag5xsmcuk33tijqgv2zp
q`
- CIDv1: `bafybei
aojhskjkwp2cbsehkj7fm4cfv6pjsapflwz5eebreopupzbuna6
q`
The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org).
The latest release is always mirrored at [app.uniswap.org](https://app.uniswap.org).
...
@@ -10,40 +10,15 @@ You can also access the Uniswap Interface from an IPFS gateway.
...
@@ -10,40 +10,15 @@ You can also access the Uniswap Interface from an IPFS gateway.
Your Uniswap settings are never remembered across different URLs.
Your Uniswap settings are never remembered across different URLs.
IPFS gateways:
IPFS gateways:
- https://bafybei
c2zedotxnbrjgoh3kki7g4oatccgiqwag5xsmcuk33tijqgv2zp
q.ipfs.dweb.link/
- https://bafybei
aojhskjkwp2cbsehkj7fm4cfv6pjsapflwz5eebreopupzbuna6
q.ipfs.dweb.link/
- https://bafybei
c2zedotxnbrjgoh3kki7g4oatccgiqwag5xsmcuk33tijqgv2zp
q.ipfs.cf-ipfs.com/
- https://bafybei
aojhskjkwp2cbsehkj7fm4cfv6pjsapflwz5eebreopupzbuna6
q.ipfs.cf-ipfs.com/
- [ipfs://Qm
UT3C4vpZnekvr6tpufvmko2T9KRR8VfDvMB3ddJhEC8s/](ipfs://QmUT3C4vpZnekvr6tpufvmko2T9KRR8VfDvMB3ddJhEC8s
/)
- [ipfs://Qm
PJRmYQHgjfL1W5skf8cUmsFMFGBxVmDS8svqWBT81Lew/](ipfs://QmPJRmYQHgjfL1W5skf8cUmsFMFGBxVmDS8svqWBT81Lew
/)
## 5.46.0 (2024-09-11)
### 5.46.1 (2024-09-12)
### Features
* **web:** [multi-explore] disable not hide TX tab on all networks (#11527) 54773e6
* **web:** add info popups to search results (#11588) bc09156
* **web:** memoize most of explore - staging (#11748) fae44d0
* **web:** update the columns in the explore pools tab (#11492) 7fc1c8d
* **web:** use Spore radio button for LP fee selector (#11284) 33c77c8
### Bug Fixes
### Bug Fixes
* **web:** 09 09 fix web remove vote pages staging (#11700) 60b48d3
* **web:** remove frontend global search sorting/filtering logic [prod hotfix] (#11829) a5fcd4e
* **web:** Add unsupported style to Explore Table network options - staging (#11708) 1fd4a47
* **web:** connected account button toggles modal (#11343) 8834682
* **web:** fix missing charts on PDP (#11312) 3dae6a8
* **web:** fix uniswap wallet connect QR code (#11507) cf360ff
* **web:** hide scroll more on midHeight (#11509) d121ce1
* **web:** landing page should also have multichainUX (#11484) 49e7ad9
* **web:** Show all tabs when multichain_explore is disabled (#11532) 1e5febc
* **web:** show share menu over chart (#11513) 20035a7
* **web:** update chart header z index (#11608) c0adb87
* **web:** use onchain instead of swapping (#11779) e0020fd
* **web): Revert "feat(web:** [multi-explore] disable not hide TX tab on all net… (#11775) 5a40308
### Continuous Integration
* **web:** update sitemaps 0fdba92
VERSION
View file @
920454a2
web/5.46.0
web/5.46.1
\ No newline at end of file
\ No newline at end of file
apps/web/src/components/NavBar/SearchBar/index.tsx
View file @
920454a2
...
@@ -7,7 +7,6 @@ import Row from 'components/Row'
...
@@ -7,7 +7,6 @@ import Row from 'components/Row'
import
{
useSearchTokens
}
from
'
graphql/data/SearchTokens
'
import
{
useSearchTokens
}
from
'
graphql/data/SearchTokens
'
import
{
useCollectionSearch
}
from
'
graphql/data/nft/CollectionSearch
'
import
{
useCollectionSearch
}
from
'
graphql/data/nft/CollectionSearch
'
import
{
useScreenSize
}
from
'
hooks/screenSize
'
import
{
useScreenSize
}
from
'
hooks/screenSize
'
import
{
useAccount
}
from
'
hooks/useAccount
'
import
useDebounce
from
'
hooks/useDebounce
'
import
useDebounce
from
'
hooks/useDebounce
'
import
{
useDisableNFTRoutes
}
from
'
hooks/useDisableNFTRoutes
'
import
{
useDisableNFTRoutes
}
from
'
hooks/useDisableNFTRoutes
'
import
{
useIsNftPage
}
from
'
hooks/useIsNftPage
'
import
{
useIsNftPage
}
from
'
hooks/useIsNftPage
'
...
@@ -203,8 +202,7 @@ export const SearchBar = ({
...
@@ -203,8 +202,7 @@ export const SearchBar = ({
const
{
data
:
collections
,
loading
:
collectionsAreLoading
}
=
useCollectionSearch
(
debouncedSearchValue
)
const
{
data
:
collections
,
loading
:
collectionsAreLoading
}
=
useCollectionSearch
(
debouncedSearchValue
)
const
account
=
useAccount
()
const
{
data
:
tokens
,
loading
:
tokensAreLoading
}
=
useSearchTokens
(
debouncedSearchValue
)
const
{
data
:
tokens
,
loading
:
tokensAreLoading
}
=
useSearchTokens
(
debouncedSearchValue
,
account
.
chainId
??
1
)
const
isNFTPage
=
useIsNftPage
()
const
isNFTPage
=
useIsNftPage
()
const
[
reducedTokens
,
reducedCollections
]
=
organizeSearchResults
(
isNFTPage
,
tokens
??
[],
collections
??
[])
const
[
reducedTokens
,
reducedCollections
]
=
organizeSearchResults
(
isNFTPage
,
tokens
??
[],
collections
??
[])
...
...
apps/web/src/graphql/data/SearchTokens.ts
View file @
920454a2
import
{
BACKEND_SUPPORTED_CHAINS
,
SupportedInterfaceChainId
,
chainIdToBackendChain
}
from
'
constants/chains
'
import
{
BACKEND_SUPPORTED_CHAINS
}
from
'
constants/chains
'
import
{
ARB
,
NATIVE_CHAIN_ID
,
WRAPPED_NATIVE_CURRENCY
}
from
'
constants/tokens
'
import
{
useMemo
}
from
'
react
'
import
{
useMemo
}
from
'
react
'
import
invariant
from
'
tiny-invariant
'
import
{
import
{
Chain
,
Chain
,
SearchTokensWebQuery
,
SearchTokensWebQuery
,
...
@@ -9,101 +7,18 @@ import {
...
@@ -9,101 +7,18 @@ import {
useSearchTokensWebQuery
,
useSearchTokensWebQuery
,
}
from
'
uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks
'
}
from
'
uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks
'
const
ARB_ADDRESS
=
ARB
.
address
.
toLowerCase
()
// Filters out results that are undefined, or where the token's chain is not supported in explore.
function
isExploreSupportedToken
(
token
:
GqlSearchToken
|
undefined
):
token
is
Token
{
/* Returns the more relevant cross-chain token based on native status and search chain */
return
token
!==
undefined
&&
(
BACKEND_SUPPORTED_CHAINS
as
ReadonlyArray
<
Chain
>
).
includes
(
token
.
chain
)
function
dedupeCrosschainTokens
(
current
:
GqlSearchToken
,
existing
:
GqlSearchToken
|
undefined
,
searchChain
:
Chain
)
{
if
(
!
existing
)
{
return
current
}
invariant
(
current
.
project
?.
id
===
existing
.
project
?.
id
,
'
Cannot dedupe tokens within different tokenProjects
'
)
// Special case: always prefer Arbitrum ARB over Mainnet ARB
if
(
current
.
address
?.
toLowerCase
()
===
ARB_ADDRESS
)
{
return
current
}
if
(
existing
.
address
?.
toLowerCase
()
===
ARB_ADDRESS
)
{
return
existing
}
// Always prioritize natives, and if both tokens are native, prefer native on current chain (i.e. Matic on Polygon over Matic on Mainnet )
if
(
current
.
standard
===
NATIVE_CHAIN_ID
&&
(
existing
.
standard
!==
NATIVE_CHAIN_ID
||
current
.
chain
===
searchChain
)
)
{
return
current
}
// Prefer tokens on the searched chain, otherwise prefer mainnet tokens
if
(
current
.
chain
===
searchChain
||
(
existing
.
chain
!==
searchChain
&&
current
.
chain
===
Chain
.
Ethereum
))
{
return
current
}
return
existing
}
/* Places natives first, wrapped native on current chain next, then sorts by volume */
function
searchTokenSortFunction
(
searchChain
:
Chain
,
wrappedNativeAddress
:
string
|
undefined
,
a
:
GqlSearchToken
,
b
:
GqlSearchToken
,
)
{
if
(
a
.
standard
===
NATIVE_CHAIN_ID
)
{
if
(
b
.
standard
===
NATIVE_CHAIN_ID
)
{
if
(
a
.
chain
===
searchChain
)
{
return
-
1
}
else
if
(
b
.
chain
===
searchChain
)
{
return
1
}
else
{
return
0
}
}
else
{
return
-
1
}
}
else
if
(
b
.
standard
===
NATIVE_CHAIN_ID
)
{
return
1
}
else
if
(
wrappedNativeAddress
&&
a
.
address
===
wrappedNativeAddress
)
{
return
-
1
}
else
if
(
wrappedNativeAddress
&&
b
.
address
===
wrappedNativeAddress
)
{
return
1
}
else
{
return
(
b
.
market
?.
volume24H
?.
value
??
0
)
-
(
a
.
market
?.
volume24H
?.
value
??
0
)
}
}
}
export
function
useSearchTokens
(
searchQuery
:
string
|
undefined
,
chainId
:
SupportedInterfaceChainId
)
{
export
function
useSearchTokens
(
searchQuery
:
string
=
''
)
{
const
{
data
,
loading
,
error
}
=
useSearchTokensWebQuery
({
const
{
data
,
loading
,
error
}
=
useSearchTokensWebQuery
({
variables
:
{
searchQuery
},
skip
:
searchQuery
===
''
})
variables
:
{
searchQuery
:
searchQuery
??
''
,
},
skip
:
!
searchQuery
,
})
const
sortedTokens
=
useMemo
(()
=>
{
const
searchChain
=
chainIdToBackendChain
({
chainId
,
withFallback
:
true
})
// Stores results, allowing overwriting cross-chain tokens w/ more 'relevant token'
const
selectionMap
:
{
[
projectId
:
string
]:
GqlSearchToken
}
=
{}
const
filteredTokens
=
data
?.
searchTokens
?.
filter
(
(
token
):
token
is
Token
=>
token
!==
undefined
&&
(
BACKEND_SUPPORTED_CHAINS
as
ReadonlyArray
<
Chain
>
).
includes
(
token
.
chain
),
)
filteredTokens
?.
forEach
((
token
)
=>
{
if
(
token
.
project
?.
id
)
{
const
existing
=
selectionMap
[
token
.
project
.
id
]
selectionMap
[
token
.
project
.
id
]
=
dedupeCrosschainTokens
(
token
,
existing
,
searchChain
)
}
})
return
Object
.
values
(
selectionMap
).
sort
(
searchTokenSortFunction
.
bind
(
null
,
searchChain
,
WRAPPED_NATIVE_CURRENCY
[
chainId
]?.
address
),
)
},
[
data
,
chainId
])
return
{
return
useMemo
(()
=>
{
data
:
sortedTokens
,
const
sortedTokens
=
data
?.
searchTokens
?.
filter
(
isExploreSupportedToken
)
??
[]
loading
,
return
{
data
:
sortedTokens
,
loading
,
error
}
error
,
},
[
data
?.
searchTokens
,
loading
,
error
])
}
}
}
export
type
GqlSearchToken
=
NonNullable
<
NonNullable
<
SearchTokensWebQuery
[
'
searchTokens
'
]
>
[
number
]
>
export
type
GqlSearchToken
=
NonNullable
<
NonNullable
<
SearchTokensWebQuery
[
'
searchTokens
'
]
>
[
number
]
>
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