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
41219b43
Unverified
Commit
41219b43
authored
Jun 06, 2023
by
eddie
Committed by
GitHub
Jun 06, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
feat: update content in permit2 flow (#6699)
parent
e1321843
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
permit2.test.ts
cypress/e2e/permit2.test.ts
+3
-3
PendingModalContent.test.tsx
...nts/swap/PendingModalContent/PendingModalContent.test.tsx
+3
-3
index.tsx
src/components/swap/PendingModalContent/index.tsx
+1
-1
No files found.
cypress/e2e/permit2.test.ts
View file @
41219b43
...
@@ -64,7 +64,7 @@ describe('Permit2', () => {
...
@@ -64,7 +64,7 @@ describe('Permit2', () => {
cy
.
spy
(
provider
,
'
send
'
).
as
(
'
permitApprovalSpy
'
)
cy
.
spy
(
provider
,
'
send
'
).
as
(
'
permitApprovalSpy
'
)
})
})
initiateSwap
()
initiateSwap
()
cy
.
contains
(
'
Enable spending
limits for
DAI on Uniswap
'
).
should
(
'
exist
'
)
cy
.
contains
(
'
Enable spending DAI on Uniswap
'
).
should
(
'
exist
'
)
cy
.
contains
(
'
Approved
'
).
should
(
'
exist
'
)
cy
.
contains
(
'
Approved
'
).
should
(
'
exist
'
)
cy
.
contains
(
'
Allow DAI to be used for swapping
'
).
should
(
'
exist
'
)
cy
.
contains
(
'
Allow DAI to be used for swapping
'
).
should
(
'
exist
'
)
...
@@ -101,7 +101,7 @@ describe('Permit2', () => {
...
@@ -101,7 +101,7 @@ describe('Permit2', () => {
})
})
cy
.
get
(
getTestSelector
(
'
confirm-swap-button
'
)).
click
()
cy
.
get
(
getTestSelector
(
'
confirm-swap-button
'
)).
click
()
cy
.
contains
(
'
Enable spending
limits for
DAI on Uniswap
'
).
should
(
'
exist
'
)
cy
.
contains
(
'
Enable spending DAI on Uniswap
'
).
should
(
'
exist
'
)
cy
.
contains
(
'
Approved
'
).
should
(
'
exist
'
)
cy
.
contains
(
'
Approved
'
).
should
(
'
exist
'
)
// permitApprovalStub should reject here, and the modal should revert to the review state.
// permitApprovalStub should reject here, and the modal should revert to the review state.
...
@@ -205,7 +205,7 @@ describe('Permit2', () => {
...
@@ -205,7 +205,7 @@ describe('Permit2', () => {
.
then
(()
=>
{
.
then
(()
=>
{
initiateSwap
()
initiateSwap
()
const
approvalTime
=
Date
.
now
()
const
approvalTime
=
Date
.
now
()
cy
.
contains
(
'
Enable spending
limits for
DAI on Uniswap
'
).
should
(
'
exist
'
)
cy
.
contains
(
'
Enable spending DAI on Uniswap
'
).
should
(
'
exist
'
)
cy
.
contains
(
'
Confirm Swap
'
).
should
(
'
exist
'
)
cy
.
contains
(
'
Confirm Swap
'
).
should
(
'
exist
'
)
cy
.
contains
(
'
Swapped
'
).
should
(
'
exist
'
)
cy
.
contains
(
'
Swapped
'
).
should
(
'
exist
'
)
...
...
src/components/swap/PendingModalContent/PendingModalContent.test.tsx
View file @
41219b43
...
@@ -28,7 +28,7 @@ describe('PendingModalContent', () => {
...
@@ -28,7 +28,7 @@ describe('PendingModalContent', () => {
trade=
{
TEST_TRADE_EXACT_INPUT
}
trade=
{
TEST_TRADE_EXACT_INPUT
}
/>
/>
)
)
expect
(
screen
.
getByText
(
'
Enable spending
limits for
ABC on Uniswap
'
)).
toBeInTheDocument
()
expect
(
screen
.
getByText
(
'
Enable spending ABC on Uniswap
'
)).
toBeInTheDocument
()
expect
(
screen
.
getByText
(
'
Proceed in your wallet
'
)).
toBeInTheDocument
()
expect
(
screen
.
getByText
(
'
Proceed in your wallet
'
)).
toBeInTheDocument
()
expect
(
screen
.
getByText
(
'
Why is this required?
'
)).
toBeInTheDocument
()
expect
(
screen
.
getByText
(
'
Why is this required?
'
)).
toBeInTheDocument
()
})
})
...
@@ -46,7 +46,7 @@ describe('PendingModalContent', () => {
...
@@ -46,7 +46,7 @@ describe('PendingModalContent', () => {
trade=
{
TEST_TRADE_EXACT_INPUT
}
trade=
{
TEST_TRADE_EXACT_INPUT
}
/>
/>
)
)
expect
(
screen
.
getByText
(
'
Enable spending
limits for
ABC on Uniswap
'
)).
toBeInTheDocument
()
expect
(
screen
.
getByText
(
'
Enable spending ABC on Uniswap
'
)).
toBeInTheDocument
()
expect
(
screen
.
getByText
(
'
Proceed in your wallet
'
)).
toBeInTheDocument
()
expect
(
screen
.
getByText
(
'
Proceed in your wallet
'
)).
toBeInTheDocument
()
expect
(
screen
.
getByText
(
'
Why is this required?
'
)).
toBeInTheDocument
()
expect
(
screen
.
getByText
(
'
Why is this required?
'
)).
toBeInTheDocument
()
expect
(
screen
.
queryByText
(
'
Allow ABC to be used for swapping
'
)).
not
.
toBeInTheDocument
()
expect
(
screen
.
queryByText
(
'
Allow ABC to be used for swapping
'
)).
not
.
toBeInTheDocument
()
...
@@ -67,7 +67,7 @@ describe('PendingModalContent', () => {
...
@@ -67,7 +67,7 @@ describe('PendingModalContent', () => {
expect
(
screen
.
getByText
(
'
Allow ABC to be used for swapping
'
)).
toBeInTheDocument
()
expect
(
screen
.
getByText
(
'
Allow ABC to be used for swapping
'
)).
toBeInTheDocument
()
expect
(
screen
.
getByText
(
'
Proceed in your wallet
'
)).
toBeInTheDocument
()
expect
(
screen
.
getByText
(
'
Proceed in your wallet
'
)).
toBeInTheDocument
()
expect
(
screen
.
getByText
(
'
Why is this required?
'
)).
toBeInTheDocument
()
expect
(
screen
.
getByText
(
'
Why is this required?
'
)).
toBeInTheDocument
()
expect
(
screen
.
queryByText
(
'
Enable spending
limits for
ABC on Uniswap
'
)).
not
.
toBeInTheDocument
()
expect
(
screen
.
queryByText
(
'
Enable spending ABC on Uniswap
'
)).
not
.
toBeInTheDocument
()
})
})
})
})
...
...
src/components/swap/PendingModalContent/index.tsx
View file @
41219b43
...
@@ -123,7 +123,7 @@ function getContent(args: ContentArgs): PendingModalStep {
...
@@ -123,7 +123,7 @@ function getContent(args: ContentArgs): PendingModalStep {
switch
(
step
)
{
switch
(
step
)
{
case
ConfirmModalState
.
APPROVING_TOKEN
:
case
ConfirmModalState
.
APPROVING_TOKEN
:
return
{
return
{
title
:
t
`Enable spending
limits for
${
approvalCurrency
?.
symbol
??
'
this token
'
}
on
Uniswap
`,
title
:
t
`Enable spending
${
approvalCurrency
?.
symbol
??
'
this token
'
}
on
Uniswap
`,
subtitle: (
subtitle: (
<ExternalLink href="https://support.uniswap.org/hc/en-us/articles/8120520483085">
<ExternalLink href="https://support.uniswap.org/hc/en-us/articles/8120520483085">
<Trans>Why is this required?</Trans>
<Trans>Why is this required?</Trans>
...
...
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