Commit d9a0aa3f authored by Zach Pomerantz's avatar Zach Pomerantz Committed by GitHub

fix: use non-warning colors for allowance button (#5851)

parent e9e5d2e4
......@@ -39,7 +39,7 @@ import invariant from 'tiny-invariant'
import { currencyAmountToPreciseFloat, formatTransactionAmount } from 'utils/formatNumbers'
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 { AutoColumn } from '../../components/Column'
import SwapCurrencyInputPanel from '../../components/CurrencyInputPanel/SwapCurrencyInputPanel'
......@@ -786,31 +786,25 @@ export default function Swap({ className }: { className?: string }) {
</AutoColumn>
</AutoRow>
) : isValid && allowance.state === AllowanceState.REQUIRED ? (
<ButtonYellow
<ButtonPrimary
onClick={updateAllowance}
disabled={isAllowancePending || isApprovalLoading}
style={{ gap: 14 }}
>
{isAllowancePending ? (
<>
<Loader size="20px" stroke={theme.accentWarning} />
<ThemedText.SubHeader color="accentWarning">
<Loader size="20px" />
<Trans>Approve in your wallet</Trans>
</ThemedText.SubHeader>
</>
) : isAllowanceFailed ? (
<>
<AlertTriangle size={20} stroke={theme.accentWarning} />
<ThemedText.SubHeader color="accentWarning">
<AlertTriangle size={20} />
<Trans>Approval failed. Try again.</Trans>
</ThemedText.SubHeader>
</>
) : isApprovalLoading ? (
<>
<Loader size="20px" stroke={theme.accentWarning} />
<ThemedText.SubHeader color="accentWarning">
<Loader size="20px" />
<Trans>Approval pending</Trans>
</ThemedText.SubHeader>
</>
) : (
<>
......@@ -823,15 +817,13 @@ export default function Swap({ className }: { className?: string }) {
</Trans>
}
>
<Info size={20} color={theme.accentWarning} />
<Info size={20} />
</MouseoverTooltip>
</div>
<ThemedText.SubHeader color="accentWarning">
<Trans>Approve use of {currencies[Field.INPUT]?.symbol}</Trans>
</ThemedText.SubHeader>
</>
)}
</ButtonYellow>
</ButtonPrimary>
) : (
<ButtonError
onClick={() => {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment