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
8964cf86
Unverified
Commit
8964cf86
authored
May 12, 2021
by
Moody Salem
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
nit with how we convert percent to negative value
parent
0e9f23ed
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
2 deletions
+2
-2
FormattedPriceImpact.tsx
src/components/swap/FormattedPriceImpact.tsx
+2
-2
No files found.
src/components/swap/FormattedPriceImpact.tsx
View file @
8964cf86
...
@@ -9,7 +9,7 @@ import { ErrorText, ErrorPill } from './styleds'
...
@@ -9,7 +9,7 @@ import { ErrorText, ErrorPill } from './styleds'
export
default
function
FormattedPriceImpact
({
priceImpact
}:
{
priceImpact
?:
Percent
})
{
export
default
function
FormattedPriceImpact
({
priceImpact
}:
{
priceImpact
?:
Percent
})
{
return
(
return
(
<
ErrorText
fontWeight=
{
500
}
fontSize=
{
12
}
severity=
{
warningSeverity
(
priceImpact
)
}
>
<
ErrorText
fontWeight=
{
500
}
fontSize=
{
12
}
severity=
{
warningSeverity
(
priceImpact
)
}
>
{
priceImpact
?
`
-${priceImpact
.toFixed(2)}%`
:
'
-
'
}
{
priceImpact
?
`
${priceImpact.multiply(-1)
.toFixed(2)}%`
:
'
-
'
}
</
ErrorText
>
</
ErrorText
>
)
)
}
}
...
@@ -17,7 +17,7 @@ export default function FormattedPriceImpact({ priceImpact }: { priceImpact?: Pe
...
@@ -17,7 +17,7 @@ export default function FormattedPriceImpact({ priceImpact }: { priceImpact?: Pe
export
function
SmallFormattedPriceImpact
({
priceImpact
}:
{
priceImpact
?:
Percent
})
{
export
function
SmallFormattedPriceImpact
({
priceImpact
}:
{
priceImpact
?:
Percent
})
{
return
(
return
(
<
ErrorPill
fontWeight=
{
500
}
fontSize=
{
12
}
severity=
{
warningSeverity
(
priceImpact
)
}
>
<
ErrorPill
fontWeight=
{
500
}
fontSize=
{
12
}
severity=
{
warningSeverity
(
priceImpact
)
}
>
{
priceImpact
?
`(
-${priceImpact
.toFixed(2)}%)`
:
'
-
'
}
{
priceImpact
?
`(
${priceImpact.multiply(-1)
.toFixed(2)}%)`
:
'
-
'
}
</
ErrorPill
>
</
ErrorPill
>
)
)
}
}
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