Skip to content

Commit

Permalink
fix(removeLP): repaird allowances
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdt committed Jan 29, 2021
1 parent 9b15503 commit 5917959
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -487,6 +487,8 @@ const AddLiquidity: React.FC = () => {
<Box column alignItems="center" justifyContent="center">
<Button
disabled={true}
isLoading={true}
variant="secondary"
full
size="sm"
onClick={() => {}}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -430,10 +430,11 @@ const RemoveLiquidity: React.FC = () => {
{loading ? (
<Button
disabled={loading}
variant="secondary"
full
size="sm"
onClick={() => {}}
isLoading={false}
isLoading={true}
text="Confirm"
/>
) : (
Expand Down
7 changes: 5 additions & 2 deletions src/state/order/hooks.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,11 @@ export const useUpdateItem = (): ((
)
return
}
if (orderType === Operation.REMOVE_LIQUIDITY_CLOSE && lpPair) {
const lpToken = lpPair.liquidityToken.address
if (
orderType === Operation.REMOVE_LIQUIDITY_CLOSE &&
item.market.liquidityToken
) {
const lpToken = item.market.liquidityToken.address
const optionAllowance = await getAllowance(
item.entity.address,
spender
Expand Down

0 comments on commit 5917959

Please sign in to comment.