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
0aa5727c
Unverified
Commit
0aa5727c
authored
Nov 15, 2023
by
cartcrom
Committed by
GitHub
Nov 15, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: don't format wrap input amount (#7592)
* fix: don't format wrap input amount * lint
parent
79e74e1d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
1 addition
and
10 deletions
+1
-10
ConfirmSwapModal.tsx
src/components/swap/ConfirmSwapModal.tsx
+1
-10
No files found.
src/components/swap/ConfirmSwapModal.tsx
View file @
0aa5727c
...
@@ -31,7 +31,6 @@ import { ThemedText } from 'theme/components'
...
@@ -31,7 +31,6 @@ import { ThemedText } from 'theme/components'
import
invariant
from
'
tiny-invariant
'
import
invariant
from
'
tiny-invariant
'
import
{
isL2ChainId
}
from
'
utils/chains
'
import
{
isL2ChainId
}
from
'
utils/chains
'
import
{
SignatureExpiredError
}
from
'
utils/errors
'
import
{
SignatureExpiredError
}
from
'
utils/errors
'
import
{
NumberType
,
useFormatter
}
from
'
utils/formatNumbers
'
import
{
formatSwapPriceUpdatedEventProperties
}
from
'
utils/loggingFormatters
'
import
{
formatSwapPriceUpdatedEventProperties
}
from
'
utils/loggingFormatters
'
import
{
didUserReject
}
from
'
utils/swapErrorToUserReadableMessage
'
import
{
didUserReject
}
from
'
utils/swapErrorToUserReadableMessage
'
import
{
tradeMeaningfullyDiffers
}
from
'
utils/tradeMeaningFullyDiffer
'
import
{
tradeMeaningfullyDiffers
}
from
'
utils/tradeMeaningFullyDiffer
'
...
@@ -82,7 +81,6 @@ function useConfirmModalState({
...
@@ -82,7 +81,6 @@ function useConfirmModalState({
const
[
confirmModalState
,
setConfirmModalState
]
=
useState
<
ConfirmModalState
>
(
ConfirmModalState
.
REVIEWING
)
const
[
confirmModalState
,
setConfirmModalState
]
=
useState
<
ConfirmModalState
>
(
ConfirmModalState
.
REVIEWING
)
const
[
approvalError
,
setApprovalError
]
=
useState
<
PendingModalError
>
()
const
[
approvalError
,
setApprovalError
]
=
useState
<
PendingModalError
>
()
const
[
pendingModalSteps
,
setPendingModalSteps
]
=
useState
<
PendingConfirmModalState
[]
>
([])
const
[
pendingModalSteps
,
setPendingModalSteps
]
=
useState
<
PendingConfirmModalState
[]
>
([])
const
{
formatCurrencyAmount
}
=
useFormatter
()
// This is a function instead of a memoized value because we do _not_ want it to update as the allowance changes.
// This is a function instead of a memoized value because we do _not_ want it to update as the allowance changes.
// For example, if the user needs to complete 3 steps initially, we should always show 3 step indicators
// For example, if the user needs to complete 3 steps initially, we should always show 3 step indicators
...
@@ -117,14 +115,7 @@ function useConfirmModalState({
...
@@ -117,14 +115,7 @@ function useConfirmModalState({
const
nativeCurrency
=
useNativeCurrency
(
chainId
)
const
nativeCurrency
=
useNativeCurrency
(
chainId
)
const
[
wrapTxHash
,
setWrapTxHash
]
=
useState
<
string
>
()
const
[
wrapTxHash
,
setWrapTxHash
]
=
useState
<
string
>
()
const
{
execute
:
onWrap
}
=
useWrapCallback
(
const
{
execute
:
onWrap
}
=
useWrapCallback
(
nativeCurrency
,
trade
.
inputAmount
.
currency
,
trade
.
inputAmount
.
toExact
())
nativeCurrency
,
trade
.
inputAmount
.
currency
,
formatCurrencyAmount
({
amount
:
trade
.
inputAmount
,
type
:
NumberType
.
SwapTradeAmount
,
})
)
const
wrapConfirmed
=
useIsTransactionConfirmed
(
wrapTxHash
)
const
wrapConfirmed
=
useIsTransactionConfirmed
(
wrapTxHash
)
const
prevWrapConfirmed
=
usePrevious
(
wrapConfirmed
)
const
prevWrapConfirmed
=
usePrevious
(
wrapConfirmed
)
const
catchUserReject
=
async
(
e
:
any
,
errorType
:
PendingModalError
)
=>
{
const
catchUserReject
=
async
(
e
:
any
,
errorType
:
PendingModalError
)
=>
{
...
...
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