Skip to content

Commit

Permalink
fix: show error when present (not approval) (#337)
Browse files Browse the repository at this point in the history
  • Loading branch information
zzmp authored Dec 12, 2022
1 parent 318426b commit 57ecbae
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/components/Swap/SwapActionButton/SwapButton.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -107,11 +107,11 @@ export default function SwapButton({
}, [onReviewSwapClick])

if (permit2Enabled) {
if (permit.state === PermitState.PERMIT_NEEDED) {
if (!disabled && permit.state === PermitState.PERMIT_NEEDED) {
return <PermitButton color={color} onSubmit={onSubmit} trade={trade} {...permit} />
}
} else {
if (approval.state !== SwapApprovalState.APPROVED && !disabled) {
if (!disabled && approval.state !== SwapApprovalState.APPROVED) {
return <ApproveButton color={color} onSubmit={onSubmit} trade={trade} {...approval} />
}
}
Expand Down

1 comment on commit 57ecbae

@vercel
Copy link

@vercel vercel bot commented on 57ecbae Dec 12, 2022

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Successfully deployed to the following URLs:

widgets – ./

widgets-git-main-uniswap.vercel.app
widgets-seven-tau.vercel.app
widgets-uniswap.vercel.app

Please sign in to comment.