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
c2fcabde
Commit
c2fcabde
authored
Dec 06, 2024
by
Uniswap Labs Service Account
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
ci(release): publish latest release
parent
156cbe72
Changes
31
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
31 changed files
with
1784 additions
and
1263 deletions
+1784
-1263
RELEASE
RELEASE
+7
-42
VERSION
VERSION
+1
-1
CancelOrdersDialog.tsx
...countDrawer/MiniPortfolio/Activity/CancelOrdersDialog.tsx
+3
-3
OffchainActivityModal.tsx
...ntDrawer/MiniPortfolio/Activity/OffchainActivityModal.tsx
+4
-5
CancelOrdersDialog.test.tsx.snap
...o/Activity/__snapshots__/CancelOrdersDialog.test.tsx.snap
+532
-424
UniwalletModal.tsx
apps/web/src/components/AccountDrawer/UniwalletModal.tsx
+4
-3
index.test.tsx.snap
...omponents/AccountDrawer/__snapshots__/index.test.tsx.snap
+3
-10
Modal.tsx
apps/web/src/components/ConfirmSwapModal/Modal.tsx
+4
-3
index.tsx
apps/web/src/components/ConfirmSwapModal/index.tsx
+2
-1
ConnectedAccountBlocked.tsx
apps/web/src/components/ConnectedAccountBlocked.tsx
+4
-3
Dialog.tsx
apps/web/src/components/Dialog/Dialog.tsx
+5
-4
Dialog.test.tsx.snap
.../src/components/Dialog/__snapshots__/Dialog.test.tsx.snap
+459
-351
FeatureFlagModal.tsx
.../web/src/components/FeatureFlagModal/FeatureFlagModal.tsx
+3
-3
index.tsx
apps/web/src/components/Modal/index.tsx
+200
-0
index.tsx
apps/web/src/components/NavBar/DownloadApp/Modal/index.tsx
+15
-3
PrivacyChoices.tsx
apps/web/src/components/PrivacyChoices.tsx
+4
-3
PrivacyPolicy.tsx
apps/web/src/components/PrivacyPolicy.tsx
+3
-3
TokenSafetyModal.tsx
apps/web/src/components/TokenSafety/TokenSafetyModal.tsx
+3
-3
LaunchModal.tsx
apps/web/src/components/TopLevelModals/LaunchModal.tsx
+6
-5
UkDisclaimerModal.tsx
apps/web/src/components/TopLevelModals/UkDisclaimerModal.tsx
+3
-3
index.tsx
...web/src/components/TransactionConfirmationModal/index.tsx
+3
-3
ConnectionErrorView.tsx
apps/web/src/components/WalletModal/ConnectionErrorView.tsx
+3
-3
AddressClaimModal.tsx
apps/web/src/components/claim/AddressClaimModal.tsx
+4
-3
PriceImpactModal.tsx
apps/web/src/components/swap/PriceImpactModal.tsx
+4
-3
UnsupportedCurrencyFooter.test.tsx
...eb/src/components/swap/UnsupportedCurrencyFooter.test.tsx
+1
-2
UnsupportedCurrencyFooter.tsx
apps/web/src/components/swap/UnsupportedCurrencyFooter.tsx
+5
-5
UnsupportedCurrencyFooter.test.tsx.snap
...wap/__snapshots__/UnsupportedCurrencyFooter.test.tsx.snap
+3
-10
SendReviewModal.tsx
apps/web/src/pages/Swap/Send/SendReviewModal.tsx
+5
-4
NewAddressSpeedBump.test.tsx.snap
...Swap/Send/__snapshots__/NewAddressSpeedBump.test.tsx.snap
+237
-183
SendReviewModal.test.tsx.snap
...ges/Swap/Send/__snapshots__/SendReviewModal.test.tsx.snap
+28
-2
SmartContractSpeedbump.test.tsx.snap
...p/Send/__snapshots__/SmartContractSpeedbump.test.tsx.snap
+226
-172
No files found.
RELEASE
View file @
c2fcabde
IPFS hash of the deployment:
IPFS hash of the deployment:
- CIDv0: `Qm
REL7zj6bMggt5yrx5mfiWCnWzbP1xAoVTYAd2J3uFgtb
`
- CIDv0: `Qm
VMsr8YpWVo2SyEuQwKBNaBDKv7uZcZkN63VTDrMgfsX1
`
- CIDv1: `bafybei
bk6showu2rchiizehaujrhea6a3ebhhapm3ivjdrhnddgbx2u3t
q`
- CIDv1: `bafybei
diki7lac24gv6xgw65hvxrrqfpk2bdgjsj63rl2uuf5yijufqj6
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,50 +10,15 @@ You can also access the Uniswap Interface from an IPFS gateway.
...
@@ -10,50 +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
bk6showu2rchiizehaujrhea6a3ebhhapm3ivjdrhnddgbx2u3t
q.ipfs.dweb.link/
- https://bafybei
diki7lac24gv6xgw65hvxrrqfpk2bdgjsj63rl2uuf5yijufqj6
q.ipfs.dweb.link/
- https://bafybei
bk6showu2rchiizehaujrhea6a3ebhhapm3ivjdrhnddgbx2u3t
q.ipfs.cf-ipfs.com/
- https://bafybei
diki7lac24gv6xgw65hvxrrqfpk2bdgjsj63rl2uuf5yijufqj6
q.ipfs.cf-ipfs.com/
- [ipfs://Qm
REL7zj6bMggt5yrx5mfiWCnWzbP1xAoVTYAd2J3uFgtb/](ipfs://QmREL7zj6bMggt5yrx5mfiWCnWzbP1xAoVTYAd2J3uFgtb
/)
- [ipfs://Qm
VMsr8YpWVo2SyEuQwKBNaBDKv7uZcZkN63VTDrMgfsX1/](ipfs://QmVMsr8YpWVo2SyEuQwKBNaBDKv7uZcZkN63VTDrMgfsX1
/)
## 5.61.0 (2024-12-04)
### 5.61.1 (2024-12-06)
### Features
* **web:** add privacy choices nav and modal (#13703) 87a958d
* **web:** add the range chart into the creation flow (#14008) a0c8c02
* **web:** reset confirmation modal for positions (#14080) 3485968
* **web:** support v4 tick data in range input (#14040) 68211cc
### Bug Fixes
### Bug Fixes
* **web:** [1/n] remove react-spring usage (AnimatedDropdown) (#13891) 9af3573
* **web): Revert "fix(web:** [2/n] remove react-spring usage (modal) (#13904)" (#14314) 28dfe99
* **web:** [2/n] remove react-spring usage (modal) (#13904) b9a0890
* **web:** android keyboard issue (#14266) 7b9834c
* **web:** bunch of v4 ui polish (#14117) d724fcb
* **web:** fix newly created v2 pairs (#14061) 5b30b6f
* **web:** fix refetching and caching issues due to the deadline (#14155) 46856f6
* **web:** handle gql refetch balance for unknown tx types (#14060) 7413d91
* **web:** hotfixing v4 fixes (#14244) f3c9411
* **web:** increase size of pointer target for the filter dropdown (#14068) 2b36a2c
* **web:** op usdc sends (#14205) ecfe6df
* **web:** remove nondefault list tokens from common bases (#14203) 42d8203
* **web:** remove top pools from mweb table (#14053) fa9080a
* **web:** sticky left column create pool (#14122) dcafb2e
* **web:** tiny v4 deposit polish (#14059) 002273a
* **web:** token protection polishes (#14038) fe36c5d
* **web:** update support articles for v4 and lp redesign (#14257) ec4508b
* **web:** v2 loading state (#14050) 79bed9c
* **web:** v4 LP flow cherrypicks (#14196) 0f2dc25
### Continuous Integration
* **web:** update sitemaps ef443f0
### Tests
* **web:** fix wallet connection test (#14047) 123862c
VERSION
View file @
c2fcabde
web/5.61.0
web/5.61.1
\ No newline at end of file
\ No newline at end of file
apps/web/src/components/AccountDrawer/MiniPortfolio/Activity/CancelOrdersDialog.tsx
View file @
c2fcabde
...
@@ -3,6 +3,7 @@ import { ConfirmedIcon, LogoContainer, SubmittedIcon } from 'components/AccountD
...
@@ -3,6 +3,7 @@ import { ConfirmedIcon, LogoContainer, SubmittedIcon } from 'components/AccountD
import
{
useCancelOrdersGasEstimate
}
from
'
components/AccountDrawer/MiniPortfolio/Activity/hooks
'
import
{
useCancelOrdersGasEstimate
}
from
'
components/AccountDrawer/MiniPortfolio/Activity/hooks
'
import
{
Container
,
Dialog
,
DialogButtonType
,
DialogProps
}
from
'
components/Dialog/Dialog
'
import
{
Container
,
Dialog
,
DialogButtonType
,
DialogProps
}
from
'
components/Dialog/Dialog
'
import
{
LoaderV3
}
from
'
components/Icons/LoadingSpinner
'
import
{
LoaderV3
}
from
'
components/Icons/LoadingSpinner
'
import
Modal
from
'
components/Modal
'
import
{
GetHelpHeader
}
from
'
components/Modal/GetHelpHeader
'
import
{
GetHelpHeader
}
from
'
components/Modal/GetHelpHeader
'
import
Column
from
'
components/deprecated/Column
'
import
Column
from
'
components/deprecated/Column
'
import
Row
from
'
components/deprecated/Row
'
import
Row
from
'
components/deprecated/Row
'
...
@@ -11,7 +12,6 @@ import styled, { useTheme } from 'lib/styled-components'
...
@@ -11,7 +12,6 @@ import styled, { useTheme } from 'lib/styled-components'
import
{
Slash
}
from
'
react-feather
'
import
{
Slash
}
from
'
react-feather
'
import
{
SignatureType
,
UniswapXOrderDetails
}
from
'
state/signatures/types
'
import
{
SignatureType
,
UniswapXOrderDetails
}
from
'
state/signatures/types
'
import
{
ExternalLink
,
ThemedText
}
from
'
theme/components
'
import
{
ExternalLink
,
ThemedText
}
from
'
theme/components
'
import
{
AdaptiveWebModal
}
from
'
ui/src
'
import
{
nativeOnChain
}
from
'
uniswap/src/constants/tokens
'
import
{
nativeOnChain
}
from
'
uniswap/src/constants/tokens
'
import
{
UniverseChainId
}
from
'
uniswap/src/features/chains/types
'
import
{
UniverseChainId
}
from
'
uniswap/src/features/chains/types
'
import
{
useUSDCValue
}
from
'
uniswap/src/features/transactions/swap/hooks/useUSDCPrice
'
import
{
useUSDCValue
}
from
'
uniswap/src/features/transactions/swap/hooks/useUSDCPrice
'
...
@@ -100,7 +100,7 @@ export function CancelOrdersDialog(
...
@@ -100,7 +100,7 @@ export function CancelOrdersDialog(
(
cancelState
===
CancellationState
.
CANCELLED
||
cancelState
===
CancellationState
.
PENDING_CONFIRMATION
)
&&
(
cancelState
===
CancellationState
.
CANCELLED
||
cancelState
===
CancellationState
.
PENDING_CONFIRMATION
)
&&
cancelTxHash
cancelTxHash
return
(
return
(
<
AdaptiveWebModal
isOpen
onClose=
{
onCancel
}
maxHeight=
"90vh"
p=
{
0
}
>
<
Modal
isOpen
$scrollOverlay
onDismiss=
{
onCancel
}
maxHeight=
"90vh"
>
<
Container
gap=
"lg"
>
<
Container
gap=
"lg"
>
<
ModalHeader
closeModal=
{
onCancel
}
/>
<
ModalHeader
closeModal=
{
onCancel
}
/>
<
LogoContainer
>
{
icon
}
</
LogoContainer
>
<
LogoContainer
>
{
icon
}
</
LogoContainer
>
...
@@ -122,7 +122,7 @@ export function CancelOrdersDialog(
...
@@ -122,7 +122,7 @@ export function CancelOrdersDialog(
)
}
)
}
</
Row
>
</
Row
>
</
Container
>
</
Container
>
</
AdaptiveWeb
Modal
>
</
Modal
>
)
)
}
else
if
(
cancelState
===
CancellationState
.
REVIEWING_CANCELLATION
)
{
}
else
if
(
cancelState
===
CancellationState
.
REVIEWING_CANCELLATION
)
{
return
(
return
(
...
...
apps/web/src/components/AccountDrawer/MiniPortfolio/Activity/OffchainActivityModal.tsx
View file @
c2fcabde
...
@@ -17,6 +17,7 @@ import { formatTimestamp } from 'components/AccountDrawer/MiniPortfolio/formatTi
...
@@ -17,6 +17,7 @@ import { formatTimestamp } from 'components/AccountDrawer/MiniPortfolio/formatTi
import
{
ButtonEmphasis
,
ButtonSize
,
ThemeButton
}
from
'
components/Button/buttons
'
import
{
ButtonEmphasis
,
ButtonSize
,
ThemeButton
}
from
'
components/Button/buttons
'
import
{
OpacityHoverState
}
from
'
components/Common/styles
'
import
{
OpacityHoverState
}
from
'
components/Common/styles
'
import
AlertTriangleFilled
from
'
components/Icons/AlertTriangleFilled
'
import
AlertTriangleFilled
from
'
components/Icons/AlertTriangleFilled
'
import
Modal
from
'
components/Modal
'
import
Column
,
{
AutoColumn
}
from
'
components/deprecated/Column
'
import
Column
,
{
AutoColumn
}
from
'
components/deprecated/Column
'
import
Row
from
'
components/deprecated/Row
'
import
Row
from
'
components/deprecated/Row
'
import
{
LimitDisclaimer
}
from
'
components/swap/LimitDisclaimer
'
import
{
LimitDisclaimer
}
from
'
components/swap/LimitDisclaimer
'
...
@@ -32,7 +33,6 @@ import { useOrder } from 'state/signatures/hooks'
...
@@ -32,7 +33,6 @@ import { useOrder } from 'state/signatures/hooks'
import
{
SignatureType
,
UniswapXOrderDetails
}
from
'
state/signatures/types
'
import
{
SignatureType
,
UniswapXOrderDetails
}
from
'
state/signatures/types
'
import
{
Divider
,
ThemedText
}
from
'
theme/components
'
import
{
Divider
,
ThemedText
}
from
'
theme/components
'
import
{
UniswapXOrderStatus
}
from
'
types/uniswapx
'
import
{
UniswapXOrderStatus
}
from
'
types/uniswapx
'
import
{
AdaptiveWebModal
}
from
'
ui/src
'
import
{
UniverseChainId
}
from
'
uniswap/src/features/chains/types
'
import
{
UniverseChainId
}
from
'
uniswap/src/features/chains/types
'
import
{
InterfaceEventNameLocal
}
from
'
uniswap/src/features/telemetry/constants
'
import
{
InterfaceEventNameLocal
}
from
'
uniswap/src/features/telemetry/constants
'
import
{
sendAnalyticsEvent
}
from
'
uniswap/src/features/telemetry/send
'
import
{
sendAnalyticsEvent
}
from
'
uniswap/src/features/telemetry/send
'
...
@@ -382,11 +382,10 @@ export function OffchainActivityModal() {
...
@@ -382,11 +382,10 @@ export function OffchainActivityModal() {
cancelTxHash=
{
cancelTxHash
}
cancelTxHash=
{
cancelTxHash
}
/>
/>
)
}
)
}
<
AdaptiveWeb
Modal
<
Modal
maxWidth=
{
375
}
maxWidth=
{
375
}
isOpen=
{
!!
selectedOrderAtomValue
?.
modalOpen
&&
cancelState
===
CancellationState
.
NOT_STARTED
}
isOpen=
{
!!
selectedOrderAtomValue
?.
modalOpen
&&
cancelState
===
CancellationState
.
NOT_STARTED
}
onClose=
{
reset
}
onDismiss=
{
reset
}
p=
{
0
}
>
>
<
Wrapper
data
-
testid=
"offchain-activity-modal"
>
<
Wrapper
data
-
testid=
"offchain-activity-modal"
>
<
Row
justify=
"space-between"
>
<
Row
justify=
"space-between"
>
...
@@ -405,7 +404,7 @@ export function OffchainActivityModal() {
...
@@ -405,7 +404,7 @@ export function OffchainActivityModal() {
/>
/>
)
}
)
}
</
Wrapper
>
</
Wrapper
>
</
AdaptiveWeb
Modal
>
</
Modal
>
</>
</>
)
)
}
}
apps/web/src/components/AccountDrawer/MiniPortfolio/Activity/__snapshots__/CancelOrdersDialog.test.tsx.snap
View file @
c2fcabde
This diff is collapsed.
Click to expand it.
apps/web/src/components/AccountDrawer/UniwalletModal.tsx
View file @
c2fcabde
import
{
InterfaceElementName
,
InterfaceEventName
}
from
'
@uniswap/analytics-events
'
import
{
InterfaceElementName
,
InterfaceEventName
}
from
'
@uniswap/analytics-events
'
import
MobileAppLogo
from
'
assets/svg/uniswap_app_logo.svg
'
import
MobileAppLogo
from
'
assets/svg/uniswap_app_logo.svg
'
import
Modal
from
'
components/Modal
'
import
{
useConnect
}
from
'
hooks/useConnect
'
import
{
useConnect
}
from
'
hooks/useConnect
'
import
{
useCallback
,
useEffect
,
useState
}
from
'
react
'
import
{
useCallback
,
useEffect
,
useState
}
from
'
react
'
import
{
CloseIcon
}
from
'
theme/components
'
import
{
CloseIcon
}
from
'
theme/components
'
import
{
AdaptiveWebModal
,
Button
,
Flex
,
Image
,
QRCodeDisplay
,
Separator
,
Text
,
useSporeColors
}
from
'
ui/src
'
import
{
Button
,
Flex
,
Image
,
QRCodeDisplay
,
Separator
,
Text
,
useSporeColors
}
from
'
ui/src
'
import
{
sendAnalyticsEvent
}
from
'
uniswap/src/features/telemetry/send
'
import
{
sendAnalyticsEvent
}
from
'
uniswap/src/features/telemetry/send
'
import
{
useTranslation
}
from
'
uniswap/src/i18n
'
import
{
useTranslation
}
from
'
uniswap/src/i18n
'
import
{
isWebAndroid
,
isWebIOS
}
from
'
utilities/src/platform
'
import
{
isWebAndroid
,
isWebIOS
}
from
'
utilities/src/platform
'
...
@@ -47,7 +48,7 @@ export default function UniwalletModal() {
...
@@ -47,7 +48,7 @@ export default function UniwalletModal() {
const
colors
=
useSporeColors
()
const
colors
=
useSporeColors
()
return
(
return
(
<
AdaptiveWebModal
isOpen=
{
open
}
onClose=
{
close
}
p=
{
0
}
>
<
Modal
isOpen=
{
open
}
onDismiss=
{
close
}
>
<
Flex
shrink
grow
p=
"$spacing20"
>
<
Flex
shrink
grow
p=
"$spacing20"
>
<
Flex
row
justifyContent=
"space-between"
>
<
Flex
row
justifyContent=
"space-between"
>
<
Text
variant=
"subheading1"
>
{
t
(
'
account.drawer.modal.scan
'
)
}
</
Text
>
<
Text
variant=
"subheading1"
>
{
t
(
'
account.drawer.modal.scan
'
)
}
</
Text
>
...
@@ -87,6 +88,6 @@ export default function UniwalletModal() {
...
@@ -87,6 +88,6 @@ export default function UniwalletModal() {
</
Button
>
</
Button
>
</
Flex
>
</
Flex
>
</
Flex
>
</
Flex
>
</
AdaptiveWeb
Modal
>
</
Modal
>
)
)
}
}
apps/web/src/components/AccountDrawer/__snapshots__/index.test.tsx.snap
View file @
c2fcabde
...
@@ -730,16 +730,9 @@ exports[`AccountDrawer tests AccountDrawer default styles 1`] = `
...
@@ -730,16 +730,9 @@ exports[`AccountDrawer tests AccountDrawer default styles 1`] = `
class="c6"
class="c6"
data-testid="wallet-modal"
data-testid="wallet-modal"
>
>
<span
<div
class="font_unset _display-inline _boxSizing-border-box _wordWrap-break-word _whiteSpace-pre-wrap _position-absolute _width-1px _height-1px _mt--1px _mr--1px _mb--1px _ml--1px _zIndex--10000 _overflowX-hidden _overflowY-hidden _opacity-1e-8 _pointerEvents-none"
tabindex="0"
>
/>
<h2
class="is_DialogTitle font_heading _display-inline _boxSizing-border-box _wordWrap-break-word _fontFamily-f-family _color-color _fontWeight-f-weight-me3083741 _fontSize-f-size-medi3736 _lineHeight-f-lineHeigh507465454 _userSelect-auto _whiteSpace-normal _mt-0px _mr-0px _mb-0px _ml-0px"
data-disable-theme="true"
id="title-:r0:"
role="heading"
/>
</span>
<div
<div
class="c7 c8 c9"
class="c7 c8 c9"
width="100%"
width="100%"
...
...
apps/web/src/components/ConfirmSwapModal/Modal.tsx
View file @
c2fcabde
import
{
InterfaceModalName
}
from
'
@uniswap/analytics-events
'
import
{
InterfaceModalName
}
from
'
@uniswap/analytics-events
'
import
Modal
from
'
components/Modal
'
import
{
AutoColumn
}
from
'
components/deprecated/Column
'
import
{
AutoColumn
}
from
'
components/deprecated/Column
'
import
styled
from
'
lib/styled-components
'
import
styled
from
'
lib/styled-components
'
import
{
PropsWithChildren
}
from
'
react
'
import
{
PropsWithChildren
}
from
'
react
'
import
{
AdaptiveWebModal
,
HeightAnimator
}
from
'
ui/src
'
import
{
HeightAnimator
}
from
'
ui/src
'
import
Trace
from
'
uniswap/src/features/telemetry/Trace
'
import
Trace
from
'
uniswap/src/features/telemetry/Trace
'
const
Content
=
styled
(
AutoColumn
)
`
const
Content
=
styled
(
AutoColumn
)
`
...
@@ -20,7 +21,7 @@ export function SwapModal({
...
@@ -20,7 +21,7 @@ export function SwapModal({
}
>
)
{
}
>
)
{
return
(
return
(
<
Trace
modal=
{
InterfaceModalName
.
CONFIRM_SWAP
}
>
<
Trace
modal=
{
InterfaceModalName
.
CONFIRM_SWAP
}
>
<
AdaptiveWebModal
isOpen
onClose=
{
onDismiss
}
maxHeight=
"90vh"
p=
{
0
}
>
<
Modal
isOpen
$scrollOverlay
onDismiss=
{
onDismiss
}
maxHeight=
"90vh"
slideIn
>
<
HeightAnimator
<
HeightAnimator
open=
{
true
}
open=
{
true
}
width=
"100%"
width=
"100%"
...
@@ -35,7 +36,7 @@ export function SwapModal({
...
@@ -35,7 +36,7 @@ export function SwapModal({
>
>
<
Content
>
{
children
}
</
Content
>
<
Content
>
{
children
}
</
Content
>
</
HeightAnimator
>
</
HeightAnimator
>
</
AdaptiveWeb
Modal
>
</
Modal
>
</
Trace
>
</
Trace
>
)
)
}
}
apps/web/src/components/ConfirmSwapModal/index.tsx
View file @
c2fcabde
...
@@ -5,6 +5,7 @@ import { SwapHead } from 'components/ConfirmSwapModal/Head'
...
@@ -5,6 +5,7 @@ import { SwapHead } from 'components/ConfirmSwapModal/Head'
import
{
SwapModal
}
from
'
components/ConfirmSwapModal/Modal
'
import
{
SwapModal
}
from
'
components/ConfirmSwapModal/Modal
'
import
{
Pending
}
from
'
components/ConfirmSwapModal/Pending
'
import
{
Pending
}
from
'
components/ConfirmSwapModal/Pending
'
import
SwapProgressIndicator
from
'
components/ConfirmSwapModal/ProgressIndicator
'
import
SwapProgressIndicator
from
'
components/ConfirmSwapModal/ProgressIndicator
'
import
{
MODAL_TRANSITION_DURATION
}
from
'
components/Modal
'
import
{
AutoColumn
}
from
'
components/deprecated/Column
'
import
{
AutoColumn
}
from
'
components/deprecated/Column
'
import
{
SwapDetails
}
from
'
components/swap/SwapDetails
'
import
{
SwapDetails
}
from
'
components/swap/SwapDetails
'
import
{
SwapPreview
}
from
'
components/swap/SwapPreview
'
import
{
SwapPreview
}
from
'
components/swap/SwapPreview
'
...
@@ -185,7 +186,7 @@ export function ConfirmSwapModal({
...
@@ -185,7 +186,7 @@ export function ConfirmSwapModal({
setTimeout(() => {
setTimeout(() => {
// Reset local state after the modal dismiss animation finishes, to avoid UI flicker as it dismisses
// Reset local state after the modal dismiss animation finishes, to avoid UI flicker as it dismisses
onCancel()
onCancel()
},
200
)
},
MODAL_TRANSITION_DURATION
)
// Popups are suppressed when modal is open; re-enable them on dismissal
// Popups are suppressed when modal is open; re-enable them on dismissal
unsuppressPopups()
unsuppressPopups()
}, [confirmModalState, doesTradeDiffer, onCancel, onDismiss, priceUpdate, unsuppressPopups, trade])
}, [confirmModalState, doesTradeDiffer, onCancel, onDismiss, priceUpdate, unsuppressPopups, trade])
...
...
apps/web/src/components/ConnectedAccountBlocked.tsx
View file @
c2fcabde
import
Column
from
'
components/deprecated/Column
'
import
Column
from
'
components/deprecated/Column
'
import
Modal
from
'
components/Modal
'
import
styled
,
{
useTheme
}
from
'
lib/styled-components
'
import
styled
,
{
useTheme
}
from
'
lib/styled-components
'
import
{
Slash
}
from
'
react-feather
'
import
{
Slash
}
from
'
react-feather
'
import
{
CopyHelper
,
ExternalLink
,
ThemedText
}
from
'
theme/components
'
import
{
CopyHelper
,
ExternalLink
,
ThemedText
}
from
'
theme/components
'
import
{
AdaptiveWebModal
,
Flex
,
Text
}
from
'
ui/src
'
import
{
Flex
,
Text
}
from
'
ui/src
'
import
{
Trans
}
from
'
uniswap/src/i18n
'
import
{
Trans
}
from
'
uniswap/src/i18n
'
const
ContentWrapper
=
styled
(
Column
)
`
const
ContentWrapper
=
styled
(
Column
)
`
...
@@ -19,7 +20,7 @@ interface ConnectedAccountBlockedProps {
...
@@ -19,7 +20,7 @@ interface ConnectedAccountBlockedProps {
export
default
function
ConnectedAccountBlocked
(
props
:
ConnectedAccountBlockedProps
)
{
export
default
function
ConnectedAccountBlocked
(
props
:
ConnectedAccountBlockedProps
)
{
const
theme
=
useTheme
()
const
theme
=
useTheme
()
return
(
return
(
<
AdaptiveWebModal
isOpen=
{
props
.
isOpen
}
onClose=
{
Function
.
prototype
()
}
p=
{
0
}
>
<
Modal
isOpen=
{
props
.
isOpen
}
onDismiss=
{
Function
.
prototype
()
}
>
<
ContentWrapper
>
<
ContentWrapper
>
<
Slash
size=
"22px"
color=
{
theme
.
neutral2
}
/>
<
Slash
size=
"22px"
color=
{
theme
.
neutral2
}
/>
<
ThemedText
.
DeprecatedLargeHeader
lineHeight=
{
2
}
marginBottom=
{
1
}
marginTop=
{
1
}
>
<
ThemedText
.
DeprecatedLargeHeader
lineHeight=
{
2
}
marginBottom=
{
1
}
marginTop=
{
1
}
>
...
@@ -55,6 +56,6 @@ export default function ConnectedAccountBlocked(props: ConnectedAccountBlockedPr
...
@@ -55,6 +56,6 @@ export default function ConnectedAccountBlocked(props: ConnectedAccountBlockedPr
/>
/>
</
ThemedText
.
DeprecatedMain
>
</
ThemedText
.
DeprecatedMain
>
</
ContentWrapper
>
</
ContentWrapper
>
</
AdaptiveWeb
Modal
>
</
Modal
>
)
)
}
}
apps/web/src/components/Dialog/Dialog.tsx
View file @
c2fcabde
import
{
ButtonEmphasis
,
ButtonSize
,
ThemeButton
}
from
'
components/Button/buttons
'
import
{
ButtonEmphasis
,
ButtonSize
,
ThemeButton
}
from
'
components/Button/buttons
'
import
Modal
from
'
components/Modal
'
import
{
GetHelpHeader
}
from
'
components/Modal/GetHelpHeader
'
import
{
GetHelpHeader
}
from
'
components/Modal/GetHelpHeader
'
import
{
ColumnCenter
}
from
'
components/deprecated/Column
'
import
{
ColumnCenter
}
from
'
components/deprecated/Column
'
import
Row
from
'
components/deprecated/Row
'
import
Row
from
'
components/deprecated/Row
'
...
@@ -6,11 +7,11 @@ import styled, { DefaultTheme } from 'lib/styled-components'
...
@@ -6,11 +7,11 @@ import styled, { DefaultTheme } from 'lib/styled-components'
import
{
ReactNode
}
from
'
react
'
import
{
ReactNode
}
from
'
react
'
import
{
Gap
}
from
'
theme
'
import
{
Gap
}
from
'
theme
'
import
{
ThemedText
}
from
'
theme/components
'
import
{
ThemedText
}
from
'
theme/components
'
import
{
AdaptiveWebModal
}
from
'
ui/src
'
export
const
Container
=
styled
(
ColumnCenter
)
`
export
const
Container
=
styled
(
ColumnCenter
)
`
background-color:
${({
theme
})
=>
theme
.
surface1
}
;
background-color:
${({
theme
})
=>
theme
.
surface1
}
;
border-radius: 16px;
outline: 1px solid
${({
theme
})
=>
theme
.
surface3
}
;
border-radius: 20px;
padding: 16px 24px 24px 24px;
padding: 16px 24px 24px 24px;
width: 100%;
width: 100%;
`
`
...
@@ -160,11 +161,11 @@ export function DialogContent({ icon, title, description, body, buttonsConfig }:
...
@@ -160,11 +161,11 @@ export function DialogContent({ icon, title, description, body, buttonsConfig }:
*/
*/
export
function
Dialog
(
props
:
DialogProps
)
{
export
function
Dialog
(
props
:
DialogProps
)
{
return
(
return
(
<
AdaptiveWebModal
isOpen=
{
props
.
isVisible
}
onClose=
{
props
.
onCancel
}
p=
{
0
}
>
<
Modal
$scrollOverlay
isOpen=
{
props
.
isVisible
}
onDismiss=
{
props
.
onCancel
}
>
<
Container
gap=
"lg"
>
<
Container
gap=
"lg"
>
<
DialogHeader
closeModal=
{
props
.
onCancel
}
closeDataTestId=
"Dialog-closeButton"
/>
<
DialogHeader
closeModal=
{
props
.
onCancel
}
closeDataTestId=
"Dialog-closeButton"
/>
<
DialogContent
{
...
props
}
/>
<
DialogContent
{
...
props
}
/>
</
Container
>
</
Container
>
</
AdaptiveWeb
Modal
>
</
Modal
>
)
)
}
}
apps/web/src/components/Dialog/__snapshots__/Dialog.test.tsx.snap
View file @
c2fcabde
This diff is collapsed.
Click to expand it.
apps/web/src/components/FeatureFlagModal/FeatureFlagModal.tsx
View file @
c2fcabde
import
{
SmallButtonPrimary
}
from
'
components/Button/buttons
'
import
{
SmallButtonPrimary
}
from
'
components/Button/buttons
'
import
Modal
from
'
components/Modal
'
import
Column
from
'
components/deprecated/Column
'
import
Column
from
'
components/deprecated/Column
'
import
Row
from
'
components/deprecated/Row
'
import
Row
from
'
components/deprecated/Row
'
import
{
useQuickRouteChains
}
from
'
featureFlags/dynamicConfig/quickRouteChains
'
import
{
useQuickRouteChains
}
from
'
featureFlags/dynamicConfig/quickRouteChains
'
...
@@ -8,7 +9,6 @@ import { X } from 'react-feather'
...
@@ -8,7 +9,6 @@ import { X } from 'react-feather'
import
{
useCloseModal
,
useModalIsOpen
}
from
'
state/application/hooks
'
import
{
useCloseModal
,
useModalIsOpen
}
from
'
state/application/hooks
'
import
{
ApplicationModal
}
from
'
state/application/reducer
'
import
{
ApplicationModal
}
from
'
state/application/reducer
'
import
{
BREAKPOINTS
}
from
'
theme
'
import
{
BREAKPOINTS
}
from
'
theme
'
import
{
AdaptiveWebModal
}
from
'
ui/src
'
import
{
SUPPORTED_CHAIN_IDS
}
from
'
uniswap/src/features/chains/types
'
import
{
SUPPORTED_CHAIN_IDS
}
from
'
uniswap/src/features/chains/types
'
import
{
import
{
DynamicConfigKeys
,
DynamicConfigKeys
,
...
@@ -203,7 +203,7 @@ export default function FeatureFlagModal() {
...
@@ -203,7 +203,7 @@ export default function FeatureFlagModal() {
const
closeModal
=
useCloseModal
()
const
closeModal
=
useCloseModal
()
return
(
return
(
<
AdaptiveWebModal
isOpen=
{
open
}
onClose=
{
closeModal
}
p=
{
0
}
>
<
Modal
isOpen=
{
open
}
onDismiss=
{
closeModal
}
>
<
Wrapper
>
<
Wrapper
>
<
Header
>
<
Header
>
<
Row
width=
"100%"
justify=
"space-between"
>
<
Row
width=
"100%"
justify=
"space-between"
>
...
@@ -291,6 +291,6 @@ export default function FeatureFlagModal() {
...
@@ -291,6 +291,6 @@ export default function FeatureFlagModal() {
</
FlagsColumn
>
</
FlagsColumn
>
<
SaveButton
onClick=
{
()
=>
window
.
location
.
reload
()
}
>
Reload
</
SaveButton
>
<
SaveButton
onClick=
{
()
=>
window
.
location
.
reload
()
}
>
Reload
</
SaveButton
>
</
Wrapper
>
</
Wrapper
>
</
AdaptiveWeb
Modal
>
</
Modal
>
)
)
}
}
apps/web/src/components/Modal/index.tsx
0 → 100644
View file @
c2fcabde
//
// @deprecated Prefer Modal from packages/uniswap/src/components/modals/Modal.tsx
//
// TODO(WEB-4886): Remove this
//
import
{
DialogContent
,
DialogOverlay
}
from
'
@reach/dialog
'
import
{
useOnClickOutside
}
from
'
hooks/useOnClickOutside
'
import
styled
from
'
lib/styled-components
'
import
React
,
{
KeyboardEvent
,
useCallback
,
useRef
}
from
'
react
'
import
{
animated
,
easings
,
useSpring
,
useTransition
}
from
'
react-spring
'
import
{
useGesture
}
from
'
react-use-gesture
'
import
{
Z_INDEX
}
from
'
theme/zIndex
'
import
{
isMobileWeb
}
from
'
utilities/src/platform
'
export
const
MODAL_TRANSITION_DURATION
=
200
const
AnimatedDialogOverlay
=
animated
(
DialogOverlay
)
const
StyledDialogOverlay
=
styled
(
AnimatedDialogOverlay
)
<
{
$scrollOverlay
?:
boolean
}
>
`
will-change: transform, opacity;
&[data-reach-dialog-overlay] {
z-index:
${
Z_INDEX
.
modalBackdrop
}
;
background-color: transparent;
overflow: hidden;
display: flex;
align-items: center;
@media screen and (max-width:
${({
theme
})
=>
theme
.
breakpoint
.
sm
}
px) {
align-items: flex-end;
}
overflow-y:
${({
$scrollOverlay
})
=>
$scrollOverlay
&&
'
scroll
'
}
;
justify-content: center;
background-color:
${({
theme
})
=>
theme
.
scrim
}
;
}
`
type
Dimension
=
number
|
string
function
dimensionsToCss
(
dimensions
:
Dimension
)
{
if
(
typeof
dimensions
===
'
number
'
)
{
return
`
${
dimensions
}
px`
}
return
dimensions
}
type
StyledDialogProps
=
{
$height
?:
Dimension
$minHeight
?:
Dimension
$maxHeight
?:
Dimension
$scrollOverlay
?:
boolean
$hideBorder
?:
boolean
$maxWidth
:
Dimension
}
const
AnimatedDialogContent
=
animated
(
DialogContent
)
const
StyledDialogContent
=
styled
(
AnimatedDialogContent
)
<
StyledDialogProps
>
`
overflow-y: auto;
&[data-reach-dialog-content] {
margin: auto;
background-color:
${({
theme
})
=>
theme
.
surface2
}
;
border:
${({
theme
,
$hideBorder
})
=>
!
$hideBorder
&&
`1px solid
${
theme
.
surface3
}
`
}
;
box-shadow:
${({
theme
})
=>
theme
.
deprecated_deepShadow
}
;
padding: 0px;
width: 50vw;
overflow-y: auto;
overflow-x: hidden;
${({
$height
})
=>
$height
&&
`height:
${
dimensionsToCss
(
$height
)}
;`
}
${({
$maxHeight
})
=>
$maxHeight
&&
`max-height:
${
dimensionsToCss
(
$maxHeight
)}
;`
}
${({
$minHeight
})
=>
$minHeight
&&
`min-height:
${
dimensionsToCss
(
$minHeight
)}
;`
}
${({
$maxWidth
})
=>
$maxWidth
&&
`max-width:
${
dimensionsToCss
(
$maxWidth
)}
;`
}
display:
${({
$scrollOverlay
})
=>
(
$scrollOverlay
?
'
inline-table
'
:
'
flex
'
)}
;
border-radius: 20px;
@media screen and (max-width:
${({
theme
})
=>
theme
.
breakpoint
.
md
}
px) {
width: 65vw;
}
@media screen and (max-width:
${({
theme
})
=>
theme
.
breakpoint
.
sm
}
px) {
margin: 0;
width: 100vw;
border-radius: 20px;
border-bottom-left-radius: 0;
border-bottom-right-radius: 0;
}
}
`
interface
ModalProps
{
isOpen
:
boolean
onDismiss
?:
()
=>
void
onSwipe
?:
()
=>
void
height
?:
Dimension
minHeight
?:
Dimension
maxHeight
?:
Dimension
maxWidth
?:
Dimension
initialFocusRef
?:
React
.
RefObject
<
any
>
children
?:
React
.
ReactNode
$scrollOverlay
?:
boolean
hideBorder
?:
boolean
slideIn
?:
boolean
}
export
default
function
Modal
({
isOpen
,
onDismiss
,
minHeight
,
maxHeight
=
'
90vh
'
,
maxWidth
=
420
,
height
,
initialFocusRef
,
children
,
onSwipe
=
onDismiss
,
$scrollOverlay
,
hideBorder
=
false
,
slideIn
,
}:
ModalProps
)
{
const
ref
=
useRef
<
HTMLDivElement
>
(
null
)
useOnClickOutside
(
ref
,
()
=>
(
isOpen
&&
onDismiss
?
onDismiss
()
:
undefined
))
const
handleEscape
=
useCallback
(
(
e
:
KeyboardEvent
<
HTMLDivElement
>
)
=>
{
if
(
e
.
key
===
'
Escape
'
&&
isOpen
&&
onDismiss
)
{
onDismiss
()
}
},
[
isOpen
,
onDismiss
],
)
const
fadeTransition
=
useTransition
(
isOpen
,
{
config
:
{
duration
:
MODAL_TRANSITION_DURATION
},
from
:
{
opacity
:
0
},
enter
:
{
opacity
:
1
},
leave
:
{
opacity
:
0
},
})
const
slideTransition
=
useTransition
(
isOpen
,
{
config
:
{
duration
:
MODAL_TRANSITION_DURATION
,
easing
:
easings
.
easeInOutCubic
},
from
:
{
transform
:
'
translateY(40px)
'
},
enter
:
{
transform
:
'
translateY(0px)
'
},
leave
:
{
transform
:
'
translateY(40px)
'
},
})
const
[{
y
},
set
]
=
useSpring
(()
=>
({
y
:
0
,
config
:
{
mass
:
1
,
tension
:
210
,
friction
:
20
}
}))
const
bind
=
useGesture
({
onDrag
:
(
state
)
=>
{
set
({
y
:
state
.
down
?
state
.
movement
[
1
]
:
0
,
})
if
(
state
.
movement
[
1
]
>
300
||
(
state
.
velocity
>
3
&&
state
.
direction
[
1
]
>
0
))
{
onSwipe
?.()
}
},
})
return
(
<
div
tabIndex=
{
0
}
onKeyUp=
{
handleEscape
}
>
{
fadeTransition
(
({
opacity
},
item
)
=>
item
&&
(
<
StyledDialogOverlay
style=
{
{
opacity
:
opacity
.
to
({
range
:
[
0.0
,
1.0
],
output
:
[
0
,
1
]
})
}
}
onDismiss=
{
onDismiss
}
initialFocusRef=
{
initialFocusRef
}
unstable_lockFocusAcrossFrames=
{
false
}
$scrollOverlay=
{
$scrollOverlay
}
>
{
slideTransition
(
(
styles
,
item
)
=>
item
&&
(
<
StyledDialogContent
ref=
{
ref
}
{
...
(
isMobileWeb
?
{
...
bind
(),
style
:
{
transform
:
y
.
interpolate
((
y
)
=
>
`translateY($
{
(
y
as
number
)
>
0
?
y
:
0
}
px)`) },
}
: slideIn
?
{
style
:
styles
}
:
{}
)}
aria-label="dialog"
$height=
{
height
}
$minHeight=
{
minHeight
}
$maxHeight=
{
maxHeight
}
$scrollOverlay=
{
$scrollOverlay
}
$hideBorder=
{
hideBorder
}
$maxWidth=
{
maxWidth
}
>
{
/* prevents the automatic focusing of inputs on mobile by the reach dialog */
}
{
!
initialFocusRef
&&
isMobileWeb
?
<
div
tabIndex=
{
1
}
/>
:
null
}
{
children
}
</
StyledDialogContent
>
),
)
}
</
StyledDialogOverlay
>
),
)
}
</
div
>
)
}
apps/web/src/components/NavBar/DownloadApp/Modal/index.tsx
View file @
c2fcabde
import
{
InterfaceModalName
}
from
'
@uniswap/analytics-events
'
import
{
InterfaceModalName
}
from
'
@uniswap/analytics-events
'
import
{
useAccountDrawer
}
from
'
components/AccountDrawer/MiniPortfolio/hooks
'
import
{
useAccountDrawer
}
from
'
components/AccountDrawer/MiniPortfolio/hooks
'
import
Modal
from
'
components/Modal
'
import
{
useIsAccountCTAExperimentControl
}
from
'
components/NavBar/accountCTAsExperimentUtils
'
import
{
useIsAccountCTAExperimentControl
}
from
'
components/NavBar/accountCTAsExperimentUtils
'
import
{
GetStarted
}
from
'
components/NavBar/DownloadApp/Modal/GetStarted
'
import
{
GetStarted
}
from
'
components/NavBar/DownloadApp/Modal/GetStarted
'
import
{
GetTheApp
}
from
'
components/NavBar/DownloadApp/Modal/GetTheApp
'
import
{
GetTheApp
}
from
'
components/NavBar/DownloadApp/Modal/GetTheApp
'
import
styled
from
'
lib/styled-components
'
import
{
useCallback
,
useState
}
from
'
react
'
import
{
useCallback
,
useState
}
from
'
react
'
import
{
ArrowLeft
,
X
}
from
'
react-feather
'
import
{
ArrowLeft
,
X
}
from
'
react-feather
'
import
{
useCloseModal
,
useModalIsOpen
}
from
'
state/application/hooks
'
import
{
useCloseModal
,
useModalIsOpen
}
from
'
state/application/hooks
'
import
{
ApplicationModal
}
from
'
state/application/reducer
'
import
{
ApplicationModal
}
from
'
state/application/reducer
'
import
{
ClickableTamaguiStyle
}
from
'
theme/components
'
import
{
ClickableTamaguiStyle
}
from
'
theme/components
'
import
{
A
daptiveWebModal
,
A
nimateTransition
,
Flex
,
styled
as
tamaguiStyled
}
from
'
ui/src
'
import
{
AnimateTransition
,
Flex
,
styled
as
tamaguiStyled
}
from
'
ui/src
'
import
{
iconSizes
,
zIndices
}
from
'
ui/src/theme
'
import
{
iconSizes
,
zIndices
}
from
'
ui/src/theme
'
import
Trace
from
'
uniswap/src/features/telemetry/Trace
'
import
Trace
from
'
uniswap/src/features/telemetry/Trace
'
const
StyledModal
=
styled
(
Modal
)
`
display: block;
`
const
HeaderActionIcon
=
{
const
HeaderActionIcon
=
{
margin
:
4
,
margin
:
4
,
color
:
'
$neutral1
'
,
color
:
'
$neutral1
'
,
...
@@ -61,7 +67,13 @@ export function GetTheAppModal() {
...
@@ -61,7 +67,13 @@ export function GetTheAppModal() {
return
(
return
(
<
Trace
modal=
{
InterfaceModalName
.
GETTING_STARTED_MODAL
}
>
<
Trace
modal=
{
InterfaceModalName
.
GETTING_STARTED_MODAL
}
>
<
AdaptiveWebModal
isOpen=
{
isOpen
}
maxWidth=
{
isAccountCTAExperimentControl
?
620
:
700
}
onClose=
{
closeModal
}
p=
{
0
}
>
<
StyledModal
isOpen=
{
isOpen
}
maxWidth=
{
isAccountCTAExperimentControl
?
620
:
700
}
slideIn
onDismiss=
{
closeModal
}
hideBorder
>
<
Flex
<
Flex
row
row
position=
"absolute"
position=
"absolute"
...
@@ -100,7 +112,7 @@ export function GetTheAppModal() {
...
@@ -100,7 +112,7 @@ export function GetTheAppModal() {
<
GetTheApp
/>
<
GetTheApp
/>
</
AnimateTransition
>
</
AnimateTransition
>
</
Flex
>
</
Flex
>
</
AdaptiveWeb
Modal
>
</
Styled
Modal
>
</
Trace
>
</
Trace
>
)
)
}
}
apps/web/src/components/PrivacyChoices.tsx
View file @
c2fcabde
import
{
InterfaceElementName
}
from
'
@uniswap/analytics-events
'
import
{
InterfaceElementName
}
from
'
@uniswap/analytics-events
'
import
Modal
from
'
components/Modal
'
import
{
useAtom
}
from
'
jotai
'
import
{
useAtom
}
from
'
jotai
'
import
{
atomWithStorage
}
from
'
jotai/utils
'
import
{
atomWithStorage
}
from
'
jotai/utils
'
import
{
useCallback
,
useState
}
from
'
react
'
import
{
useCallback
,
useState
}
from
'
react
'
import
{
useCloseModal
,
useModalIsOpen
}
from
'
state/application/hooks
'
import
{
useCloseModal
,
useModalIsOpen
}
from
'
state/application/hooks
'
import
{
A
daptiveWebModal
,
A
nchor
,
Button
,
Checkbox
,
Flex
,
Text
,
TouchableArea
}
from
'
ui/src
'
import
{
Anchor
,
Button
,
Checkbox
,
Flex
,
Text
,
TouchableArea
}
from
'
ui/src
'
import
{
Lock
}
from
'
ui/src/components/icons/Lock
'
import
{
Lock
}
from
'
ui/src/components/icons/Lock
'
import
{
X
}
from
'
ui/src/components/icons/X
'
import
{
X
}
from
'
ui/src/components/icons/X
'
import
{
uniswapUrls
}
from
'
uniswap/src/constants/urls
'
import
{
uniswapUrls
}
from
'
uniswap/src/constants/urls
'
...
@@ -33,7 +34,7 @@ export function PrivacyChoicesModal() {
...
@@ -33,7 +34,7 @@ export function PrivacyChoicesModal() {
},
[
isOptOutChecked
,
closeModal
,
setPrivacySharingOptOut
])
},
[
isOptOutChecked
,
closeModal
,
setPrivacySharingOptOut
])
return
(
return
(
<
AdaptiveWebModal
isOpen=
{
open
}
onClose
=
{
closeAndResetModal
}
>
<
Modal
isOpen=
{
open
}
onDismiss
=
{
closeAndResetModal
}
>
<
Flex
fill
>
<
Flex
fill
>
<
Flex
py=
"$spacing20"
px=
"$spacing24"
gap=
"$spacing24"
>
<
Flex
py=
"$spacing20"
px=
"$spacing24"
gap=
"$spacing24"
>
<
Flex
row
justifyContent=
"flex-end"
>
<
Flex
row
justifyContent=
"flex-end"
>
...
@@ -90,6 +91,6 @@ export function PrivacyChoicesModal() {
...
@@ -90,6 +91,6 @@ export function PrivacyChoicesModal() {
</
Button
>
</
Button
>
</
Flex
>
</
Flex
>
</
Flex
>
</
Flex
>
</
AdaptiveWeb
Modal
>
</
Modal
>
)
)
}
}
apps/web/src/components/PrivacyPolicy.tsx
View file @
c2fcabde
import
{
SharedEventName
}
from
'
@uniswap/analytics-events
'
import
{
SharedEventName
}
from
'
@uniswap/analytics-events
'
import
Card
,
{
DarkGrayCard
}
from
'
components/Card/cards
'
import
Card
,
{
DarkGrayCard
}
from
'
components/Card/cards
'
import
Modal
from
'
components/Modal
'
import
{
AutoColumn
}
from
'
components/deprecated/Column
'
import
{
AutoColumn
}
from
'
components/deprecated/Column
'
import
Row
,
{
AutoRow
,
RowBetween
}
from
'
components/deprecated/Row
'
import
Row
,
{
AutoRow
,
RowBetween
}
from
'
components/deprecated/Row
'
import
styled
from
'
lib/styled-components
'
import
styled
from
'
lib/styled-components
'
...
@@ -8,7 +9,6 @@ import { ArrowDown, Info, X } from 'react-feather'
...
@@ -8,7 +9,6 @@ import { ArrowDown, Info, X } from 'react-feather'
import
{
useCloseModal
,
useModalIsOpen
}
from
'
state/application/hooks
'
import
{
useCloseModal
,
useModalIsOpen
}
from
'
state/application/hooks
'
import
{
ApplicationModal
}
from
'
state/application/reducer
'
import
{
ApplicationModal
}
from
'
state/application/reducer
'
import
{
ExternalLink
,
ThemedText
}
from
'
theme/components
'
import
{
ExternalLink
,
ThemedText
}
from
'
theme/components
'
import
{
AdaptiveWebModal
}
from
'
ui/src
'
import
{
ModalName
}
from
'
uniswap/src/features/telemetry/constants
'
import
{
ModalName
}
from
'
uniswap/src/features/telemetry/constants
'
import
{
sendAnalyticsEvent
}
from
'
uniswap/src/features/telemetry/send
'
import
{
sendAnalyticsEvent
}
from
'
uniswap/src/features/telemetry/send
'
import
{
Trans
}
from
'
uniswap/src/i18n
'
import
{
Trans
}
from
'
uniswap/src/i18n
'
...
@@ -89,7 +89,7 @@ export function PrivacyPolicyModal() {
...
@@ -89,7 +89,7 @@ export function PrivacyPolicyModal() {
},
[
open
])
},
[
open
])
return
(
return
(
<
AdaptiveWebModal
isOpen=
{
open
}
onClose=
{
()
=>
closeModal
()
}
p=
{
0
}
>
<
Modal
isOpen=
{
open
}
onDismiss=
{
()
=>
closeModal
()
}
>
<
AutoColumn
gap=
"md"
ref=
{
node
as
any
}
>
<
AutoColumn
gap=
"md"
ref=
{
node
as
any
}
>
<
RowBetween
padding=
"1rem 1rem 0.5rem 1rem"
>
<
RowBetween
padding=
"1rem 1rem 0.5rem 1rem"
>
<
ThemedText
.
DeprecatedMediumHeader
>
<
ThemedText
.
DeprecatedMediumHeader
>
...
@@ -101,7 +101,7 @@ export function PrivacyPolicyModal() {
...
@@ -101,7 +101,7 @@ export function PrivacyPolicyModal() {
</
RowBetween
>
</
RowBetween
>
<
PrivacyPolicy
/>
<
PrivacyPolicy
/>
</
AutoColumn
>
</
AutoColumn
>
</
AdaptiveWeb
Modal
>
</
Modal
>
)
)
}
}
...
...
apps/web/src/components/TokenSafety/TokenSafetyModal.tsx
View file @
c2fcabde
import
{
AdaptiveWebModal
}
from
'
ui/src
'
import
Modal
from
'
components/Modal
'
import
{
FeatureFlags
}
from
'
uniswap/src/features/gating/flags
'
import
{
FeatureFlags
}
from
'
uniswap/src/features/gating/flags
'
import
{
useFeatureFlag
}
from
'
uniswap/src/features/gating/hooks
'
import
{
useFeatureFlag
}
from
'
uniswap/src/features/gating/hooks
'
import
TokenWarningModal
from
'
uniswap/src/features/tokens/TokenWarningModal
'
import
TokenWarningModal
from
'
uniswap/src/features/tokens/TokenWarningModal
'
...
@@ -47,7 +47,7 @@ export default function TokenSafetyModal({
...
@@ -47,7 +47,7 @@ export default function TokenSafetyModal({
onToken1BlockAcknowledged=
{
onToken1BlockAcknowledged
}
onToken1BlockAcknowledged=
{
onToken1BlockAcknowledged
}
/>
/>
)
:
(
)
:
(
<
AdaptiveWebModal
isOpen=
{
isOpen
}
onClose=
{
onReject
??
closeModalOnly
}
maxHeight=
{
400
}
p=
{
0
}
>
<
Modal
isOpen=
{
isOpen
}
onDismiss=
{
onReject
??
closeModalOnly
}
maxHeight=
{
40
0
}
>
<
TokenSafety
<
TokenSafety
token0=
{
token0
}
token0=
{
token0
}
token1=
{
token1
}
token1=
{
token1
}
...
@@ -60,6 +60,6 @@ export default function TokenSafetyModal({
...
@@ -60,6 +60,6 @@ export default function TokenSafetyModal({
closeModalOnly=
{
onReject
??
closeModalOnly
}
closeModalOnly=
{
onReject
??
closeModalOnly
}
showCancel=
{
showCancel
}
showCancel=
{
showCancel
}
/>
/>
</
AdaptiveWeb
Modal
>
</
Modal
>
)
)
}
}
apps/web/src/components/TopLevelModals/LaunchModal.tsx
View file @
c2fcabde
// Remove the following line when LaunchModal is used again:
// Remove the following line when LaunchModal is used again:
/* eslint-disable import/no-unused-modules */
/* eslint-disable import/no-unused-modules */
import
{
InterfaceElementName
}
from
'
@uniswap/analytics-events
'
import
{
InterfaceElementName
}
from
'
@uniswap/analytics-events
'
import
Modal
from
'
components/Modal
'
import
{
import
{
LAUNCH_MODAL_DESKTOP_MAX_HEIGHT
,
LAUNCH_MODAL_DESKTOP_MAX_HEIGHT
,
LAUNCH_MODAL_DESKTOP_MAX_WIDTH
,
LAUNCH_MODAL_DESKTOP_MAX_WIDTH
,
...
@@ -11,7 +12,7 @@ import { useIsLandingPage } from 'hooks/useIsLandingPage'
...
@@ -11,7 +12,7 @@ import { useIsLandingPage } from 'hooks/useIsLandingPage'
import
{
useAtom
}
from
'
jotai
'
import
{
useAtom
}
from
'
jotai
'
import
{
atomWithStorage
}
from
'
jotai/utils
'
import
{
atomWithStorage
}
from
'
jotai/utils
'
import
{
useMemo
}
from
'
react
'
import
{
useMemo
}
from
'
react
'
import
{
AdaptiveWebModal
,
Button
,
Flex
,
Image
,
ImageProps
,
Text
,
TouchableArea
,
useMedia
}
from
'
ui/src
'
import
{
Button
,
Flex
,
Image
,
ImageProps
,
Text
,
TouchableArea
,
useMedia
}
from
'
ui/src
'
import
{
X
}
from
'
ui/src/components/icons/X
'
import
{
X
}
from
'
ui/src/components/icons/X
'
import
{
iconSizes
}
from
'
ui/src/theme
'
import
{
iconSizes
}
from
'
ui/src/theme
'
import
Trace
from
'
uniswap/src/features/telemetry/Trace
'
import
Trace
from
'
uniswap/src/features/telemetry/Trace
'
...
@@ -46,12 +47,12 @@ export function LaunchModal({
...
@@ -46,12 +47,12 @@ export function LaunchModal({
return
(
return
(
<
Trace
modal=
{
interfaceModalName
}
>
<
Trace
modal=
{
interfaceModalName
}
>
<
AdaptiveWeb
Modal
<
Modal
maxWidth=
{
media
.
md
?
undefined
:
LAUNCH_MODAL_DESKTOP_MAX_WIDTH
}
maxWidth=
{
media
.
md
?
undefined
:
LAUNCH_MODAL_DESKTOP_MAX_WIDTH
}
height=
{
media
.
md
?
LAUNCH_MODAL_MOBILE_MAX_HEIGHT
:
LAUNCH_MODAL_DESKTOP_MAX_HEIGHT
}
height=
{
media
.
md
?
LAUNCH_MODAL_MOBILE_MAX_HEIGHT
:
LAUNCH_MODAL_DESKTOP_MAX_HEIGHT
}
isOpen=
{
showModal
&&
!
isOnLandingPage
}
isOpen=
{
showModal
&&
!
isOnLandingPage
}
on
Close
=
{
()
=>
setShowModal
(
false
)
}
on
Dismiss
=
{
()
=>
setShowModal
(
false
)
}
p=
{
0
}
hideBorder
>
>
<
Flex
flexDirection=
{
media
.
md
?
'
column
'
:
'
row
'
}
fill
>
<
Flex
flexDirection=
{
media
.
md
?
'
column
'
:
'
row
'
}
fill
>
<
Flex
<
Flex
...
@@ -101,7 +102,7 @@ export function LaunchModal({
...
@@ -101,7 +102,7 @@ export function LaunchModal({
</
Flex
>
</
Flex
>
</
Flex
>
</
Flex
>
</
Flex
>
</
Flex
>
</
AdaptiveWeb
Modal
>
</
Modal
>
</
Trace
>
</
Trace
>
)
)
}
}
apps/web/src/components/TopLevelModals/UkDisclaimerModal.tsx
View file @
c2fcabde
import
{
ButtonEmphasis
,
ButtonSize
,
ThemeButton
}
from
'
components/Button/buttons
'
import
{
ButtonEmphasis
,
ButtonSize
,
ThemeButton
}
from
'
components/Button/buttons
'
import
Column
from
'
components/deprecated/Column
'
import
Column
from
'
components/deprecated/Column
'
import
Modal
from
'
components/Modal
'
import
{
bannerText
}
from
'
components/TopLevelBanners/UkBanner
'
import
{
bannerText
}
from
'
components/TopLevelBanners/UkBanner
'
import
styled
from
'
lib/styled-components
'
import
styled
from
'
lib/styled-components
'
import
{
X
}
from
'
react-feather
'
import
{
X
}
from
'
react-feather
'
import
{
useCloseModal
,
useModalIsOpen
}
from
'
state/application/hooks
'
import
{
useCloseModal
,
useModalIsOpen
}
from
'
state/application/hooks
'
import
{
ApplicationModal
}
from
'
state/application/reducer
'
import
{
ApplicationModal
}
from
'
state/application/reducer
'
import
{
ButtonText
,
ThemedText
}
from
'
theme/components
'
import
{
ButtonText
,
ThemedText
}
from
'
theme/components
'
import
{
AdaptiveWebModal
}
from
'
ui/src
'
import
{
Trans
}
from
'
uniswap/src/i18n
'
import
{
Trans
}
from
'
uniswap/src/i18n
'
const
Wrapper
=
styled
(
Column
)
`
const
Wrapper
=
styled
(
Column
)
`
...
@@ -37,7 +37,7 @@ export function UkDisclaimerModal() {
...
@@ -37,7 +37,7 @@ export function UkDisclaimerModal() {
const
closeModal
=
useCloseModal
()
const
closeModal
=
useCloseModal
()
return
(
return
(
<
AdaptiveWebModal
isOpen=
{
isOpen
}
onClose=
{
closeModal
}
p=
{
0
}
>
<
Modal
isOpen=
{
isOpen
}
onDismiss=
{
closeModal
}
>
<
Wrapper
gap=
"md"
>
<
Wrapper
gap=
"md"
>
<
CloseIconWrapper
onClick=
{
()
=>
closeModal
()
}
>
<
CloseIconWrapper
onClick=
{
()
=>
closeModal
()
}
>
<
X
size=
{
24
}
/>
<
X
size=
{
24
}
/>
...
@@ -56,6 +56,6 @@ export function UkDisclaimerModal() {
...
@@ -56,6 +56,6 @@ export function UkDisclaimerModal() {
</
StyledThemeButton
>
</
StyledThemeButton
>
</
ButtonContainer
>
</
ButtonContainer
>
</
Wrapper
>
</
Wrapper
>
</
AdaptiveWeb
Modal
>
</
Modal
>
)
)
}
}
apps/web/src/components/TransactionConfirmationModal/index.tsx
View file @
c2fcabde
...
@@ -5,6 +5,7 @@ import { TransactionSummary } from 'components/AccountDetails/TransactionSummary
...
@@ -5,6 +5,7 @@ import { TransactionSummary } from 'components/AccountDetails/TransactionSummary
import
Badge
from
'
components/Badge/Badge
'
import
Badge
from
'
components/Badge/Badge
'
import
{
ButtonLight
,
ButtonPrimary
}
from
'
components/Button/buttons
'
import
{
ButtonLight
,
ButtonPrimary
}
from
'
components/Button/buttons
'
import
{
ChainLogo
}
from
'
components/Logo/ChainLogo
'
import
{
ChainLogo
}
from
'
components/Logo/ChainLogo
'
import
Modal
from
'
components/Modal
'
import
AnimatedConfirmation
from
'
components/TransactionConfirmationModal/AnimatedConfirmation
'
import
AnimatedConfirmation
from
'
components/TransactionConfirmationModal/AnimatedConfirmation
'
import
{
AutoColumn
,
ColumnCenter
}
from
'
components/deprecated/Column
'
import
{
AutoColumn
,
ColumnCenter
}
from
'
components/deprecated/Column
'
import
Row
,
{
RowBetween
,
RowFixed
}
from
'
components/deprecated/Row
'
import
Row
,
{
RowBetween
,
RowFixed
}
from
'
components/deprecated/Row
'
...
@@ -16,7 +17,6 @@ import { AlertCircle, ArrowUpCircle, CheckCircle } from 'react-feather'
...
@@ -16,7 +17,6 @@ import { AlertCircle, ArrowUpCircle, CheckCircle } from 'react-feather'
import
{
useTransaction
}
from
'
state/transactions/hooks
'
import
{
useTransaction
}
from
'
state/transactions/hooks
'
import
{
isConfirmedTx
}
from
'
state/transactions/utils
'
import
{
isConfirmedTx
}
from
'
state/transactions/utils
'
import
{
CloseIcon
,
CustomLightSpinner
,
ExternalLink
,
ThemedText
}
from
'
theme/components
'
import
{
CloseIcon
,
CustomLightSpinner
,
ExternalLink
,
ThemedText
}
from
'
theme/components
'
import
{
AdaptiveWebModal
}
from
'
ui/src
'
import
{
TransactionStatus
}
from
'
uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks
'
import
{
TransactionStatus
}
from
'
uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks
'
import
{
getChainInfo
}
from
'
uniswap/src/features/chains/chainInfo
'
import
{
getChainInfo
}
from
'
uniswap/src/features/chains/chainInfo
'
import
{
useIsSupportedChainId
}
from
'
uniswap/src/features/chains/hooks/useSupportedChainId
'
import
{
useIsSupportedChainId
}
from
'
uniswap/src/features/chains/hooks/useSupportedChainId
'
...
@@ -340,7 +340,7 @@ export default function TransactionConfirmationModal({
...
@@ -340,7 +340,7 @@ export default function TransactionConfirmationModal({
// confirmation screen
// confirmation screen
return
(
return
(
<
AdaptiveWebModal
isOpen=
{
isOpen
}
onClose=
{
onDismiss
}
maxHeight=
"90vh"
p=
{
0
}
>
<
Modal
isOpen=
{
isOpen
}
$scrollOverlay=
{
true
}
onDismiss=
{
onDismiss
}
maxHeight=
"90vh"
>
{
isL2ChainId
(
chainId
)
&&
(
hash
||
attemptingTxn
)
?
(
{
isL2ChainId
(
chainId
)
&&
(
hash
||
attemptingTxn
)
?
(
<
L2Content
chainId=
{
chainId
}
hash=
{
hash
}
onDismiss=
{
onDismiss
}
pendingText=
{
pendingText
}
/>
<
L2Content
chainId=
{
chainId
}
hash=
{
hash
}
onDismiss=
{
onDismiss
}
pendingText=
{
pendingText
}
/>
)
:
attemptingTxn
?
(
)
:
attemptingTxn
?
(
...
@@ -355,6 +355,6 @@ export default function TransactionConfirmationModal({
...
@@ -355,6 +355,6 @@ export default function TransactionConfirmationModal({
)
:
(
)
:
(
reviewContent
()
reviewContent
()
)
}
)
}
</
AdaptiveWeb
Modal
>
</
Modal
>
)
)
}
}
apps/web/src/components/WalletModal/ConnectionErrorView.tsx
View file @
c2fcabde
import
{
ButtonEmpty
,
ButtonPrimary
}
from
'
components/Button/buttons
'
import
{
ButtonEmpty
,
ButtonPrimary
}
from
'
components/Button/buttons
'
import
Modal
from
'
components/Modal
'
import
{
useConnect
}
from
'
hooks/useConnect
'
import
{
useConnect
}
from
'
hooks/useConnect
'
import
styled
from
'
lib/styled-components
'
import
styled
from
'
lib/styled-components
'
import
{
useCallback
}
from
'
react
'
import
{
useCallback
}
from
'
react
'
import
{
AlertTriangle
}
from
'
react-feather
'
import
{
AlertTriangle
}
from
'
react-feather
'
import
{
ThemedText
}
from
'
theme/components
'
import
{
ThemedText
}
from
'
theme/components
'
import
{
flexColumnNoWrap
}
from
'
theme/styles
'
import
{
flexColumnNoWrap
}
from
'
theme/styles
'
import
{
AdaptiveWebModal
}
from
'
ui/src
'
import
{
Trans
}
from
'
uniswap/src/i18n
'
import
{
Trans
}
from
'
uniswap/src/i18n
'
const
Wrapper
=
styled
.
div
`
const
Wrapper
=
styled
.
div
`
...
@@ -39,7 +39,7 @@ export default function ConnectionErrorView() {
...
@@ -39,7 +39,7 @@ export default function ConnectionErrorView() {
},
[
connection
])
},
[
connection
])
return
(
return
(
<
AdaptiveWebModal
isOpen=
{
Boolean
(
connection
?.
error
)
}
onClose=
{
connection
?.
reset
}
p=
{
0
}
>
<
Modal
isOpen=
{
Boolean
(
connection
?.
error
)
}
onDismiss=
{
connection
?.
reset
}
>
<
Wrapper
>
<
Wrapper
>
<
AlertTriangleIcon
/>
<
AlertTriangleIcon
/>
<
ThemedText
.
HeadlineSmall
marginBottom=
"8px"
>
<
ThemedText
.
HeadlineSmall
marginBottom=
"8px"
>
...
@@ -57,6 +57,6 @@ export default function ConnectionErrorView() {
...
@@ -57,6 +57,6 @@ export default function ConnectionErrorView() {
</
ThemedText
.
BodySecondary
>
</
ThemedText
.
BodySecondary
>
</
ButtonEmpty
>
</
ButtonEmpty
>
</
Wrapper
>
</
Wrapper
>
</
AdaptiveWeb
Modal
>
</
Modal
>
)
)
}
}
apps/web/src/components/claim/AddressClaimModal.tsx
View file @
c2fcabde
...
@@ -4,6 +4,7 @@ import Circle from 'assets/images/blue-loader.svg'
...
@@ -4,6 +4,7 @@ import Circle from 'assets/images/blue-loader.svg'
import
tokenLogo
from
'
assets/images/token-logo.png
'
import
tokenLogo
from
'
assets/images/token-logo.png
'
import
AddressInputPanel
from
'
components/AddressInputPanel
'
import
AddressInputPanel
from
'
components/AddressInputPanel
'
import
{
ButtonPrimary
}
from
'
components/Button/buttons
'
import
{
ButtonPrimary
}
from
'
components/Button/buttons
'
import
Modal
from
'
components/Modal
'
import
{
AutoColumn
,
ColumnCenter
}
from
'
components/deprecated/Column
'
import
{
AutoColumn
,
ColumnCenter
}
from
'
components/deprecated/Column
'
import
{
RowBetween
}
from
'
components/deprecated/Row
'
import
{
RowBetween
}
from
'
components/deprecated/Row
'
import
{
Break
,
CardBGImage
,
CardBGImageSmaller
,
CardNoise
,
CardSection
,
DataCard
}
from
'
components/earn/styled
'
import
{
Break
,
CardBGImage
,
CardBGImageSmaller
,
CardNoise
,
CardSection
,
DataCard
}
from
'
components/earn/styled
'
...
@@ -14,7 +15,7 @@ import { useState } from 'react'
...
@@ -14,7 +15,7 @@ import { useState } from 'react'
import
{
useClaimCallback
,
useUserHasAvailableClaim
,
useUserUnclaimedAmount
}
from
'
state/claim/hooks
'
import
{
useClaimCallback
,
useUserHasAvailableClaim
,
useUserUnclaimedAmount
}
from
'
state/claim/hooks
'
import
{
useIsTransactionPending
}
from
'
state/transactions/hooks
'
import
{
useIsTransactionPending
}
from
'
state/transactions/hooks
'
import
{
CloseIcon
,
CustomLightSpinner
,
ExternalLink
,
ThemedText
,
UniTokenAnimated
}
from
'
theme/components
'
import
{
CloseIcon
,
CustomLightSpinner
,
ExternalLink
,
ThemedText
,
UniTokenAnimated
}
from
'
theme/components
'
import
{
AdaptiveWebModal
,
Text
}
from
'
ui/src
'
import
{
Text
}
from
'
ui/src
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
uniswap/src/utils/linking
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
uniswap/src/utils/linking
'
import
{
shortenAddress
}
from
'
utilities/src/addresses
'
import
{
shortenAddress
}
from
'
utilities/src/addresses
'
import
{
logger
}
from
'
utilities/src/logger/logger
'
import
{
logger
}
from
'
utilities/src/logger/logger
'
...
@@ -97,7 +98,7 @@ export default function AddressClaimModal({ isOpen, onDismiss }: { isOpen: boole
...
@@ -97,7 +98,7 @@ export default function AddressClaimModal({ isOpen, onDismiss }: { isOpen: boole
// Avoiding translating because the structure for "Claiming UNI for address" is wrong but this modal is rarely used
// Avoiding translating because the structure for "Claiming UNI for address" is wrong but this modal is rarely used
// and ran into difficulties with testing it
// and ran into difficulties with testing it
return
(
return
(
<
AdaptiveWebModal
isOpen=
{
isOpen
}
onClose=
{
wrappedOnDismiss
}
maxHeight=
"90vh"
p=
{
0
}
>
<
Modal
isOpen=
{
isOpen
}
onDismiss=
{
wrappedOnDismiss
}
maxHeight=
"90vh"
>
{
!
attempting
&&
(
{
!
attempting
&&
(
<
ContentWrapper
gap=
"lg"
>
<
ContentWrapper
gap=
"lg"
>
<
ModalUpper
>
<
ModalUpper
>
...
@@ -193,6 +194,6 @@ export default function AddressClaimModal({ isOpen, onDismiss }: { isOpen: boole
...
@@ -193,6 +194,6 @@ export default function AddressClaimModal({ isOpen, onDismiss }: { isOpen: boole
</
AutoColumn
>
</
AutoColumn
>
</
ConfirmOrLoadingWrapper
>
</
ConfirmOrLoadingWrapper
>
)
}
)
}
</
AdaptiveWeb
Modal
>
</
Modal
>
)
)
}
}
apps/web/src/components/swap/PriceImpactModal.tsx
View file @
c2fcabde
import
{
Percent
}
from
'
@uniswap/sdk-core
'
import
{
Percent
}
from
'
@uniswap/sdk-core
'
import
Modal
from
'
components/Modal
'
import
{
GetHelpHeader
}
from
'
components/Modal/GetHelpHeader
'
import
{
GetHelpHeader
}
from
'
components/Modal/GetHelpHeader
'
import
{
AdaptiveWebModal
,
Button
,
Flex
,
Text
}
from
'
ui/src
'
import
{
Button
,
Flex
,
Text
}
from
'
ui/src
'
import
{
AlertTriangleFilled
}
from
'
ui/src/components/icons/AlertTriangleFilled
'
import
{
AlertTriangleFilled
}
from
'
ui/src/components/icons/AlertTriangleFilled
'
import
{
Trans
}
from
'
uniswap/src/i18n
'
import
{
Trans
}
from
'
uniswap/src/i18n
'
import
{
useFormatter
}
from
'
utils/formatNumbers
'
import
{
useFormatter
}
from
'
utils/formatNumbers
'
...
@@ -16,7 +17,7 @@ export default function PriceImpactModal({ priceImpact, onDismiss, onContinue }:
...
@@ -16,7 +17,7 @@ export default function PriceImpactModal({ priceImpact, onDismiss, onContinue }:
const
impact
=
`
${
formatPercent
(
priceImpact
)}
`
const
impact
=
`
${
formatPercent
(
priceImpact
)}
`
return
(
return
(
<
AdaptiveWebModal
isOpen
onClose=
{
onDismiss
}
p=
{
0
}
>
<
Modal
isOpen
onDismiss=
{
onDismiss
}
>
<
Flex
width=
"100%"
px=
"$spacing24"
py=
"$spacing16"
rowGap=
"$spacing24"
backgroundColor=
"$surface1"
>
<
Flex
width=
"100%"
px=
"$spacing24"
py=
"$spacing16"
rowGap=
"$spacing24"
backgroundColor=
"$surface1"
>
<
GetHelpHeader
closeModal=
{
onDismiss
}
/>
<
GetHelpHeader
closeModal=
{
onDismiss
}
/>
<
Flex
rowGap=
"$spacing16"
alignItems=
"center"
>
<
Flex
rowGap=
"$spacing16"
alignItems=
"center"
>
...
@@ -78,6 +79,6 @@ export default function PriceImpactModal({ priceImpact, onDismiss, onContinue }:
...
@@ -78,6 +79,6 @@ export default function PriceImpactModal({ priceImpact, onDismiss, onContinue }:
</
Button
>
</
Button
>
</
Flex
>
</
Flex
>
</
Flex
>
</
Flex
>
</
AdaptiveWeb
Modal
>
</
Modal
>
)
)
}
}
apps/web/src/components/swap/UnsupportedCurrencyFooter.test.tsx
View file @
c2fcabde
...
@@ -9,7 +9,6 @@ import { act, render, screen, waitForElementToBeRemoved, within } from 'test-uti
...
@@ -9,7 +9,6 @@ import { act, render, screen, waitForElementToBeRemoved, within } from 'test-uti
import
{
SafetyLevel
}
from
'
uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks
'
import
{
SafetyLevel
}
from
'
uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks
'
import
{
TestID
}
from
'
uniswap/src/test/fixtures/testIDs
'
import
{
TestID
}
from
'
uniswap/src/test/fixtures/testIDs
'
import
{
getExplorerLink
}
from
'
uniswap/src/utils/linking
'
import
{
getExplorerLink
}
from
'
uniswap/src/utils/linking
'
import
{
shortenAddress
}
from
'
utilities/src/addresses
'
const
unsupportedTokenAddress
=
'
0x4e83b6287588a96321B2661c5E041845fF7814af
'
const
unsupportedTokenAddress
=
'
0x4e83b6287588a96321B2661c5E041845fF7814af
'
const
unsupportedTokenSymbol
=
'
ALTDOM-MAR2021
'
const
unsupportedTokenSymbol
=
'
ALTDOM-MAR2021
'
...
@@ -45,7 +44,7 @@ describe('UnsupportedCurrencyFooter.tsx with unsupported tokens', () => {
...
@@ -45,7 +44,7 @@ describe('UnsupportedCurrencyFooter.tsx with unsupported tokens', () => {
expect
(
screen
.
getAllByTestId
(
'
unsupported-token-card
'
).
length
).
toBe
(
1
)
expect
(
screen
.
getAllByTestId
(
'
unsupported-token-card
'
).
length
).
toBe
(
1
)
const
unsupportedCard
=
screen
.
getByTestId
(
'
unsupported-token-card
'
)
const
unsupportedCard
=
screen
.
getByTestId
(
'
unsupported-token-card
'
)
expect
(
within
(
unsupportedCard
).
getByText
(
unsupportedTokenSymbol
)).
toBeInTheDocument
()
expect
(
within
(
unsupportedCard
).
getByText
(
unsupportedTokenSymbol
)).
toBeInTheDocument
()
expect
(
within
(
unsupportedCard
).
getByText
(
shortenAddress
(
unsupportedTokenAddress
)
).
closest
(
'
a
'
)).
toHaveAttribute
(
expect
(
within
(
unsupportedCard
).
getByText
(
unsupportedTokenAddress
).
closest
(
'
a
'
)).
toHaveAttribute
(
'
href
'
,
'
href
'
,
unsupportedTokenExplorerLink
,
unsupportedTokenExplorerLink
,
)
)
...
...
apps/web/src/components/swap/UnsupportedCurrencyFooter.tsx
View file @
c2fcabde
...
@@ -2,6 +2,7 @@ import { Currency, Token } from '@uniswap/sdk-core'
...
@@ -2,6 +2,7 @@ import { Currency, Token } from '@uniswap/sdk-core'
import
{
ButtonEmpty
}
from
'
components/Button/buttons
'
import
{
ButtonEmpty
}
from
'
components/Button/buttons
'
import
Card
,
{
OutlineCard
}
from
'
components/Card/cards
'
import
Card
,
{
OutlineCard
}
from
'
components/Card/cards
'
import
CurrencyLogo
from
'
components/Logo/CurrencyLogo
'
import
CurrencyLogo
from
'
components/Logo/CurrencyLogo
'
import
Modal
from
'
components/Modal
'
import
{
AutoColumn
}
from
'
components/deprecated/Column
'
import
{
AutoColumn
}
from
'
components/deprecated/Column
'
import
{
AutoRow
,
RowBetween
}
from
'
components/deprecated/Row
'
import
{
AutoRow
,
RowBetween
}
from
'
components/deprecated/Row
'
import
{
useCurrencyInfo
}
from
'
hooks/Tokens
'
import
{
useCurrencyInfo
}
from
'
hooks/Tokens
'
...
@@ -10,12 +11,11 @@ import styled from 'lib/styled-components'
...
@@ -10,12 +11,11 @@ import styled from 'lib/styled-components'
import
{
useState
}
from
'
react
'
import
{
useState
}
from
'
react
'
import
{
CloseIcon
,
ExternalLink
,
ThemedText
}
from
'
theme/components
'
import
{
CloseIcon
,
ExternalLink
,
ThemedText
}
from
'
theme/components
'
import
{
Z_INDEX
}
from
'
theme/zIndex
'
import
{
Z_INDEX
}
from
'
theme/zIndex
'
import
{
AdaptiveWebModal
,
Text
}
from
'
ui/src
'
import
{
Text
}
from
'
ui/src
'
import
{
SafetyLevel
}
from
'
uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks
'
import
{
SafetyLevel
}
from
'
uniswap/src/data/graphql/uniswap-data-api/__generated__/types-and-hooks
'
import
{
UniverseChainId
}
from
'
uniswap/src/features/chains/types
'
import
{
UniverseChainId
}
from
'
uniswap/src/features/chains/types
'
import
{
Trans
}
from
'
uniswap/src/i18n
'
import
{
Trans
}
from
'
uniswap/src/i18n
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
uniswap/src/utils/linking
'
import
{
ExplorerDataType
,
getExplorerLink
}
from
'
uniswap/src/utils/linking
'
import
{
shortenAddress
}
from
'
utilities/src/addresses
'
const
DetailsFooter
=
styled
.
div
<
{
show
:
boolean
}
>
`
const
DetailsFooter
=
styled
.
div
<
{
show
:
boolean
}
>
`
padding-top: calc(16px + 2rem);
padding-top: calc(16px + 2rem);
...
@@ -68,7 +68,7 @@ export default function UnsupportedCurrencyFooter({
...
@@ -68,7 +68,7 @@ export default function UnsupportedCurrencyFooter({
return
(
return
(
<
DetailsFooter
show=
{
show
}
>
<
DetailsFooter
show=
{
show
}
>
<
AdaptiveWebModal
isOpen=
{
showDetails
}
onClose=
{
()
=>
setShowDetails
(
false
)
}
p=
{
0
}
>
<
Modal
isOpen=
{
showDetails
}
onDismiss=
{
()
=>
setShowDetails
(
false
)
}
>
<
Card
padding=
"2rem"
>
<
Card
padding=
"2rem"
>
<
AutoColumn
gap=
"lg"
>
<
AutoColumn
gap=
"lg"
>
<
RowBetween
>
<
RowBetween
>
...
@@ -89,7 +89,7 @@ export default function UnsupportedCurrencyFooter({
...
@@ -89,7 +89,7 @@ export default function UnsupportedCurrencyFooter({
</
AutoColumn
>
</
AutoColumn
>
</
AutoColumn
>
</
AutoColumn
>
</
Card
>
</
Card
>
</
AdaptiveWeb
Modal
>
</
Modal
>
<
StyledButtonEmpty
padding=
"0"
onClick=
{
()
=>
setShowDetails
(
true
)
}
data
-
testid=
"read-more-button"
>
<
StyledButtonEmpty
padding=
"0"
onClick=
{
()
=>
setShowDetails
(
true
)
}
data
-
testid=
"read-more-button"
>
<
Text
color=
"$accent1"
>
<
Text
color=
"$accent1"
>
<
Trans
i18nKey=
"swap.unsupportedAssets.readMore"
/>
<
Trans
i18nKey=
"swap.unsupportedAssets.readMore"
/>
...
@@ -115,7 +115,7 @@ function UnsupportedTokenCard({ token, chainId }: { token?: Token; chainId?: Uni
...
@@ -115,7 +115,7 @@ function UnsupportedTokenCard({ token, chainId }: { token?: Token; chainId?: Uni
</
AutoRow
>
</
AutoRow
>
{
chainId
&&
(
{
chainId
&&
(
<
ExternalLink
href=
{
getExplorerLink
(
chainId
,
token
.
address
,
ExplorerDataType
.
ADDRESS
)
}
>
<
ExternalLink
href=
{
getExplorerLink
(
chainId
,
token
.
address
,
ExplorerDataType
.
ADDRESS
)
}
>
<
AddressText
>
{
shortenAddress
(
token
.
address
)
}
</
AddressText
>
<
AddressText
>
{
token
.
address
}
</
AddressText
>
</
ExternalLink
>
</
ExternalLink
>
)
}
)
}
</
AutoColumn
>
</
AutoColumn
>
...
...
apps/web/src/components/swap/__snapshots__/UnsupportedCurrencyFooter.test.tsx.snap
View file @
c2fcabde
...
@@ -160,16 +160,9 @@ exports[`UnsupportedCurrencyFooter.tsx with unsupported tokens renders 1`] = `
...
@@ -160,16 +160,9 @@ exports[`UnsupportedCurrencyFooter.tsx with unsupported tokens renders 1`] = `
<div
<div
class="c0"
class="c0"
>
>
<span
<div
class="font_unset _display-inline _boxSizing-border-box _wordWrap-break-word _whiteSpace-pre-wrap _position-absolute _width-1px _height-1px _mt--1px _mr--1px _mb--1px _ml--1px _zIndex--10000 _overflowX-hidden _overflowY-hidden _opacity-1e-8 _pointerEvents-none"
tabindex="0"
>
/>
<h2
class="is_DialogTitle font_heading _display-inline _boxSizing-border-box _wordWrap-break-word _fontFamily-f-family _color-color _fontWeight-f-weight-me3083741 _fontSize-f-size-medi3736 _lineHeight-f-lineHeigh507465454 _userSelect-auto _whiteSpace-normal _mt-0px _mr-0px _mb-0px _ml-0px"
data-disable-theme="true"
id="title-:r0:"
role="heading"
/>
</span>
<button
<button
class="c1 c2 c3 c4"
class="c1 c2 c3 c4"
data-testid="read-more-button"
data-testid="read-more-button"
...
...
apps/web/src/pages/Swap/Send/SendReviewModal.tsx
View file @
c2fcabde
...
@@ -3,6 +3,7 @@ import { PortfolioLogo } from 'components/AccountDrawer/MiniPortfolio/PortfolioL
...
@@ -3,6 +3,7 @@ import { PortfolioLogo } from 'components/AccountDrawer/MiniPortfolio/PortfolioL
import
{
ButtonPrimary
}
from
'
components/Button/buttons
'
import
{
ButtonPrimary
}
from
'
components/Button/buttons
'
import
Identicon
from
'
components/Identicon
'
import
Identicon
from
'
components/Identicon
'
import
{
ChainLogo
}
from
'
components/Logo/ChainLogo
'
import
{
ChainLogo
}
from
'
components/Logo/ChainLogo
'
import
Modal
from
'
components/Modal
'
import
{
GetHelpHeader
}
from
'
components/Modal/GetHelpHeader
'
import
{
GetHelpHeader
}
from
'
components/Modal/GetHelpHeader
'
import
Column
,
{
ColumnCenter
}
from
'
components/deprecated/Column
'
import
Column
,
{
ColumnCenter
}
from
'
components/deprecated/Column
'
import
Row
from
'
components/deprecated/Row
'
import
Row
from
'
components/deprecated/Row
'
...
@@ -12,7 +13,6 @@ import { useMultichainContext } from 'state/multichain/useMultichainContext'
...
@@ -12,7 +13,6 @@ import { useMultichainContext } from 'state/multichain/useMultichainContext'
import
{
useSendContext
}
from
'
state/send/SendContext
'
import
{
useSendContext
}
from
'
state/send/SendContext
'
import
{
Separator
,
ThemedText
}
from
'
theme/components
'
import
{
Separator
,
ThemedText
}
from
'
theme/components
'
import
{
capitalize
}
from
'
tsafe
'
import
{
capitalize
}
from
'
tsafe
'
import
{
AdaptiveWebModal
}
from
'
ui/src
'
import
{
Unitag
}
from
'
ui/src/components/icons/Unitag
'
import
{
Unitag
}
from
'
ui/src/components/icons/Unitag
'
import
{
UniverseChainId
}
from
'
uniswap/src/features/chains/types
'
import
{
UniverseChainId
}
from
'
uniswap/src/features/chains/types
'
import
Trace
from
'
uniswap/src/features/telemetry/Trace
'
import
Trace
from
'
uniswap/src/features/telemetry/Trace
'
...
@@ -23,7 +23,8 @@ import { NumberType, useFormatter } from 'utils/formatNumbers'
...
@@ -23,7 +23,8 @@ import { NumberType, useFormatter } from 'utils/formatNumbers'
const
ModalWrapper
=
styled
(
ColumnCenter
)
`
const
ModalWrapper
=
styled
(
ColumnCenter
)
`
background-color:
${({
theme
})
=>
theme
.
surface1
}
;
background-color:
${({
theme
})
=>
theme
.
surface1
}
;
border-radius: 16px;
border-radius: 20px;
outline: 1px solid
${({
theme
})
=>
theme
.
surface3
}
;
width: 100%;
width: 100%;
padding: 8px;
padding: 8px;
`
`
...
@@ -96,7 +97,7 @@ export function SendReviewModal({ onConfirm, onDismiss }: { onConfirm: () => voi
...
@@ -96,7 +97,7 @@ export function SendReviewModal({ onConfirm, onDismiss }: { onConfirm: () => voi
: [currencySymbolAmount, formattedFiatInputAmount]
: [currencySymbolAmount, formattedFiatInputAmount]
return (
return (
<
AdaptiveWebModal isOpen onClose={onDismiss} maxHeight="90vh" p={0}
>
<
Modal $scrollOverlay isOpen onDismiss={onDismiss} maxHeight="90vh"
>
<ModalWrapper data-testid="send-review-modal" gap="md">
<ModalWrapper data-testid="send-review-modal" gap="md">
<ModalHeader title={<Trans i18nKey="sendReviewModal.title" />} closeModal={onDismiss} />
<ModalHeader title={<Trans i18nKey="sendReviewModal.title" />} closeModal={onDismiss} />
<ReviewContentContainer>
<ReviewContentContainer>
...
@@ -142,6 +143,6 @@ export function SendReviewModal({ onConfirm, onDismiss }: { onConfirm: () => voi
...
@@ -142,6 +143,6 @@ export function SendReviewModal({ onConfirm, onDismiss }: { onConfirm: () => voi
</ButtonPrimary>
</ButtonPrimary>
</Trace>
</Trace>
</ModalWrapper>
</ModalWrapper>
</
AdaptiveWeb
Modal>
</Modal>
)
)
}
}
apps/web/src/pages/Swap/Send/__snapshots__/NewAddressSpeedBump.test.tsx.snap
View file @
c2fcabde
This diff is collapsed.
Click to expand it.
apps/web/src/pages/Swap/Send/__snapshots__/SendReviewModal.test.tsx.snap
View file @
c2fcabde
...
@@ -394,7 +394,8 @@ exports[`SendCurrencyInputform should render input in fiat correctly 1`] = `
...
@@ -394,7 +394,8 @@ exports[`SendCurrencyInputform should render input in fiat correctly 1`] = `
.c2 {
.c2 {
background-color: #FFFFFF;
background-color: #FFFFFF;
border-radius: 16px;
border-radius: 20px;
outline: 1px solid #22222212;
width: 100%;
width: 100%;
padding: 8px;
padding: 8px;
}
}
...
@@ -409,6 +410,18 @@ exports[`SendCurrencyInputform should render input in fiat correctly 1`] = `
...
@@ -409,6 +410,18 @@ exports[`SendCurrencyInputform should render input in fiat correctly 1`] = `
gap: 16px;
gap: 16px;
}
}
@media screen and (max-width:640px) {
}
@media screen and (max-width:768px) {
}
@media screen and (max-width:640px) {
}
<div
<div
class="c0 c1 c2"
class="c0 c1 c2"
data-testid="send-review-modal"
data-testid="send-review-modal"
...
@@ -1020,7 +1033,8 @@ exports[`SendCurrencyInputform should render input in token amount correctly 1`]
...
@@ -1020,7 +1033,8 @@ exports[`SendCurrencyInputform should render input in token amount correctly 1`]
.c2 {
.c2 {
background-color: #FFFFFF;
background-color: #FFFFFF;
border-radius: 16px;
border-radius: 20px;
outline: 1px solid #22222212;
width: 100%;
width: 100%;
padding: 8px;
padding: 8px;
}
}
...
@@ -1035,6 +1049,18 @@ exports[`SendCurrencyInputform should render input in token amount correctly 1`]
...
@@ -1035,6 +1049,18 @@ exports[`SendCurrencyInputform should render input in token amount correctly 1`]
gap: 16px;
gap: 16px;
}
}
@media screen and (max-width:640px) {
}
@media screen and (max-width:768px) {
}
@media screen and (max-width:640px) {
}
<div
<div
class="c0 c1 c2"
class="c0 c1 c2"
data-testid="send-review-modal"
data-testid="send-review-modal"
...
...
apps/web/src/pages/Swap/Send/__snapshots__/SmartContractSpeedbump.test.tsx.snap
View file @
c2fcabde
This diff is collapsed.
Click to expand it.
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