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
d9a0aa3f
Unverified
Commit
d9a0aa3f
authored
Jan 18, 2023
by
Zach Pomerantz
Committed by
GitHub
Jan 18, 2023
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix: use non-warning colors for allowance button (#5851)
parent
e9e5d2e4
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
19 deletions
+11
-19
index.tsx
src/pages/Swap/index.tsx
+11
-19
No files found.
src/pages/Swap/index.tsx
View file @
d9a0aa3f
...
@@ -39,7 +39,7 @@ import invariant from 'tiny-invariant'
...
@@ -39,7 +39,7 @@ import invariant from 'tiny-invariant'
import
{
currencyAmountToPreciseFloat
,
formatTransactionAmount
}
from
'
utils/formatNumbers
'
import
{
currencyAmountToPreciseFloat
,
formatTransactionAmount
}
from
'
utils/formatNumbers
'
import
AddressInputPanel
from
'
../../components/AddressInputPanel
'
import
AddressInputPanel
from
'
../../components/AddressInputPanel
'
import
{
ButtonConfirmed
,
ButtonError
,
ButtonLight
,
ButtonPrimary
,
ButtonYellow
}
from
'
../../components/Button
'
import
{
ButtonConfirmed
,
ButtonError
,
ButtonLight
,
ButtonPrimary
}
from
'
../../components/Button
'
import
{
GrayCard
}
from
'
../../components/Card
'
import
{
GrayCard
}
from
'
../../components/Card
'
import
{
AutoColumn
}
from
'
../../components/Column
'
import
{
AutoColumn
}
from
'
../../components/Column
'
import
SwapCurrencyInputPanel
from
'
../../components/CurrencyInputPanel/SwapCurrencyInputPanel
'
import
SwapCurrencyInputPanel
from
'
../../components/CurrencyInputPanel/SwapCurrencyInputPanel
'
...
@@ -786,31 +786,25 @@ export default function Swap({ className }: { className?: string }) {
...
@@ -786,31 +786,25 @@ export default function Swap({ className }: { className?: string }) {
</
AutoColumn
>
</
AutoColumn
>
</
AutoRow
>
</
AutoRow
>
)
:
isValid
&&
allowance
.
state
===
AllowanceState
.
REQUIRED
?
(
)
:
isValid
&&
allowance
.
state
===
AllowanceState
.
REQUIRED
?
(
<
Button
Yellow
<
Button
Primary
onClick=
{
updateAllowance
}
onClick=
{
updateAllowance
}
disabled=
{
isAllowancePending
||
isApprovalLoading
}
disabled=
{
isAllowancePending
||
isApprovalLoading
}
style=
{
{
gap
:
14
}
}
style=
{
{
gap
:
14
}
}
>
>
{
isAllowancePending
?
(
{
isAllowancePending
?
(
<>
<>
<
Loader
size=
"20px"
stroke=
{
theme
.
accentWarning
}
/>
<
Loader
size=
"20px"
/>
<
ThemedText
.
SubHeader
color=
"accentWarning"
>
<
Trans
>
Approve in your wallet
</
Trans
>
<
Trans
>
Approve in your wallet
</
Trans
>
</
ThemedText
.
SubHeader
>
</>
</>
)
:
isAllowanceFailed
?
(
)
:
isAllowanceFailed
?
(
<>
<>
<
AlertTriangle
size=
{
20
}
stroke=
{
theme
.
accentWarning
}
/>
<
AlertTriangle
size=
{
20
}
/>
<
ThemedText
.
SubHeader
color=
"accentWarning"
>
<
Trans
>
Approval failed. Try again.
</
Trans
>
<
Trans
>
Approval failed. Try again.
</
Trans
>
</
ThemedText
.
SubHeader
>
</>
</>
)
:
isApprovalLoading
?
(
)
:
isApprovalLoading
?
(
<>
<>
<
Loader
size=
"20px"
stroke=
{
theme
.
accentWarning
}
/>
<
Loader
size=
"20px"
/>
<
ThemedText
.
SubHeader
color=
"accentWarning"
>
<
Trans
>
Approval pending
</
Trans
>
<
Trans
>
Approval pending
</
Trans
>
</
ThemedText
.
SubHeader
>
</>
</>
)
:
(
)
:
(
<>
<>
...
@@ -823,15 +817,13 @@ export default function Swap({ className }: { className?: string }) {
...
@@ -823,15 +817,13 @@ export default function Swap({ className }: { className?: string }) {
</
Trans
>
</
Trans
>
}
}
>
>
<
Info
size=
{
20
}
color=
{
theme
.
accentWarning
}
/>
<
Info
size=
{
20
}
/>
</
MouseoverTooltip
>
</
MouseoverTooltip
>
</
div
>
</
div
>
<
ThemedText
.
SubHeader
color=
"accentWarning"
>
<
Trans
>
Approve use of
{
currencies
[
Field
.
INPUT
]?.
symbol
}
</
Trans
>
<
Trans
>
Approve use of
{
currencies
[
Field
.
INPUT
]?.
symbol
}
</
Trans
>
</
ThemedText
.
SubHeader
>
</>
</>
)
}
)
}
</
Button
Yellow
>
</
Button
Primary
>
)
:
(
)
:
(
<
ButtonError
<
ButtonError
onClick=
{
()
=>
{
onClick=
{
()
=>
{
...
...
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