Skip to content

Commit

Permalink
fix: close position
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdt committed Sep 27, 2021
1 parent e3d72a6 commit 69841db
Showing 1 changed file with 17 additions and 43 deletions.
60 changes: 17 additions & 43 deletions src/components/Market/OrderCard/components/Swap/Downgrade.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -181,49 +181,23 @@ const Downgrade = () => {
<Style>
<span>RDM Balance</span> {parseFloat(redeemTokenBalance)}
</Style>
{isRDMApproved() ? (
<>
<Button
disabled={true}
full
size="sm"
onClick={() =>
handleApproval(parseEther('1000000000000').toString())
}
isLoading={submitting}
text="Approve Redeem"
/>
<Button
disabled={false}
full
size="sm"
onClick={safeUnwind}
isLoading={submitting}
text={'Close Position'}
/>
</>
) : (
<>
<Button
disabled={false}
full
size="sm"
onClick={() =>
handleApproval(parseEther('1000000000000').toString())
}
isLoading={submitting}
text="Approve Redeem"
/>
<Button
disabled={true}
full
size="sm"
onClick={safeUnwind}
isLoading={submitting}
text={'Close Position'}
/>
</>
)}

<Button
disabled={false}
full
size="sm"
onClick={() => handleApproval(parseEther('1000000000000').toString())}
isLoading={submitting}
text="Approve Redeem"
/>
<Button
disabled={false}
full
size="sm"
onClick={safeUnwind}
isLoading={submitting}
text={'Close Position'}
/>
</div>
)
}
Expand Down

1 comment on commit 69841db

@vercel
Copy link

@vercel vercel bot commented on 69841db Sep 27, 2021

Choose a reason for hiding this comment

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

Please sign in to comment.