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
642a4177
Unverified
Commit
642a4177
authored
Dec 15, 2021
by
Barry G
Committed by
GitHub
Dec 15, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: extend transaction deadline to 3 days (#2982)
parent
37e08576
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
2 deletions
+5
-2
index.tsx
src/components/TransactionSettings/index.tsx
+5
-2
No files found.
src/components/TransactionSettings/index.tsx
View file @
642a4177
...
...
@@ -3,6 +3,7 @@ import { Percent } from '@uniswap/sdk-core'
import
{
L2_CHAIN_IDS
}
from
'
constants/chains
'
import
{
DEFAULT_DEADLINE_FROM_NOW
}
from
'
constants/misc
'
import
{
useActiveWeb3React
}
from
'
hooks/web3
'
import
ms
from
'
ms.macro
'
import
{
darken
}
from
'
polished
'
import
{
useContext
,
useState
}
from
'
react
'
import
{
useSetUserSlippageTolerance
,
useUserSlippageTolerance
,
useUserTransactionTTL
}
from
'
state/user/hooks
'
...
...
@@ -85,7 +86,7 @@ const OptionCustom = styled(FancyButton)<{ active?: boolean; warning?: boolean }
const
SlippageEmojiContainer
=
styled
.
span
`
color: #f3841e;
${({
theme
})
=>
theme
.
mediaWidth
.
upToSmall
`
display: none;
display: none;
`
}
`
...
...
@@ -93,6 +94,8 @@ interface TransactionSettingsProps {
placeholderSlippage
:
Percent
// varies according to the context in which the settings dialog is placed
}
const
THREE_DAYS_IN_SECONDS
=
ms
`3 days`
/
1000
export
default
function
TransactionSettings
({
placeholderSlippage
}:
TransactionSettingsProps
)
{
const
{
chainId
}
=
useActiveWeb3React
()
const
theme
=
useContext
(
ThemeContext
)
...
...
@@ -142,7 +145,7 @@ export default function TransactionSettings({ placeholderSlippage }: Transaction
}
else
{
try
{
const
parsed
:
number
=
Math
.
floor
(
Number
.
parseFloat
(
value
)
*
60
)
if
(
!
Number
.
isInteger
(
parsed
)
||
parsed
<
60
||
parsed
>
180
*
60
)
{
if
(
!
Number
.
isInteger
(
parsed
)
||
parsed
<
60
||
parsed
>
THREE_DAYS_IN_SECONDS
)
{
setDeadlineError
(
DeadlineError
.
InvalidInput
)
}
else
{
setDeadline
(
parsed
)
...
...
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