Skip to content

Commit

Permalink
fix: various
Browse files Browse the repository at this point in the history
  • Loading branch information
zachdt committed Jan 27, 2021
1 parent 3b02044 commit 8f19b4a
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 83 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,19 @@ const RemoveLiqButton: React.FC<any> = () => {
<>
<Button
variant={
orderType === Operation.REMOVE_LIQUIDITY ? 'transparent' : 'secondary'
orderType === Operation.REMOVE_LIQUIDITY_CLOSE
? 'transparent'
: 'secondary'
}
onClick={() => {
if (orderType === Operation.REMOVE_LIQUIDITY) {
if (orderType === Operation.REMOVE_LIQUIDITY_CLOSE) {
updateItem(item, Operation.NONE)
} else {
updateItem(item, Operation.REMOVE_LIQUIDITY)
updateItem(item, Operation.REMOVE_LIQUIDITY_CLOSE)
}
}}
>
{orderType === Operation.REMOVE_LIQUIDITY
{orderType === Operation.REMOVE_LIQUIDITY_CLOSE
? 'Close'
: 'Remove Liquidity'}
</Button>
Expand Down Expand Up @@ -347,7 +349,7 @@ const LiquidityTableRow: React.FC<LiquidityTableRowProps> = ({
LP Balance - {numeral(lp).format('0.00')}
<RemoveLiqButton />
</StyledTitle>
{orderType === Operation.REMOVE_LIQUIDITY ? (
{orderType === Operation.REMOVE_LIQUIDITY_CLOSE ? (
<RemoveLiquidity />
) : null}
</Choice>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -366,9 +366,9 @@ const AddLiquidity: React.FC = () => {

const noLiquidityTitle = {
text:
'This pair has no liquidity, adding liquidity will initialize this market and set an initial token ratio',
'This pair has no liquidity, adding liquidity will initialize this market and set an initial token ratio.',
tip:
'Providing liquidity to this pair will set the ratio between the tokens',
'Providing liquidity to this pair will set the ratio between the tokens.',
}

return (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -318,107 +318,36 @@ const RemoveLiquidity: React.FC = () => {
onChange={handleRatioChange}
/>
<Spacer size="sm" />
<Box row justifyContent="flex-start">
<Box row justifyContent="space-around">
<Button
variant="secondary"
variant="transparent"
text="25%"
onClick={() => {
handleRatio(250)
}}
/>
<div style={{ width: '5px' }} />
<Button
variant="secondary"
variant="transparent"
text="50%"
onClick={() => {
handleRatio(500)
}}
/>
<div style={{ width: '5px' }} />
<Button
variant="secondary"
variant="transparent"
text="75%"
onClick={() => {
handleRatio(750)
}}
/>
<div style={{ width: '5px' }} />
<Button
variant="secondary"
variant="transparent"
text="100%"
onClick={() => {
handleRatio(1000)
}}
/>
</Box>

{/* <Toggle>
<ToggleButton
active={orderType === Operation.REMOVE_LIQUIDITY_CLOSE}
onClick={() =>
updateItem(item, Operation.REMOVE_LIQUIDITY_CLOSE, item.market)
}
text="Exit & Close"
/>
<ToggleButton
active={orderType === Operation.REMOVE_LIQUIDITY}
onClick={() =>
updateItem(item, Operation.REMOVE_LIQUIDITY, item.market)
}
text="Exit"
/>
</Toggle> */}
<Spacer />

{/* <LineItem
label={'Amount'}
data={Math.round(10 * (ratio / 10)) / 10 + '%'}
units={'%'}
></LineItem>
<Spacer size="sm" />
<Slider
min={1}
max={1000}
step={1}
value={ratio}
onChange={handleRatioChange}
/>
<Spacer size="sm" />
<Box row justifyContent="flex-start">
<Button
variant="secondary"
text="25%"
onClick={() => {
handleRatio(250)
}}
/>
<div style={{ width: '5px' }} />
<Button
variant="secondary"
text="50%"
onClick={() => {
handleRatio(500)
}}
/>
<div style={{ width: '5px' }} />
<Button
variant="secondary"
text="75%"
onClick={() => {
handleRatio(750)
}}
/>
<div style={{ width: '5px' }} />
<Button
variant="secondary"
text="100%"
onClick={() => {
handleRatio(1000)
}}
/>
</Box> */}

<Spacer size="sm" />

<LineItem
Expand Down

0 comments on commit 8f19b4a

Please sign in to comment.