Skip to content

Commit

Permalink
Merge pull request #458 from primitivefinance/develop
Browse files Browse the repository at this point in the history
fix(removeLP): repaired allowances
  • Loading branch information
zachdt authored Jan 29, 2021
2 parents 854d5e6 + 5917959 commit 4d86f12
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

1 comment on commit 4d86f12

@vercel
Copy link

@vercel vercel bot commented on 4d86f12 Jan 29, 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.