Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: add liquidity tabs2 #223

Merged
merged 53 commits into from
Dec 4, 2024
Merged

feat: add liquidity tabs2 #223

merged 53 commits into from
Dec 4, 2024

Conversation

agualis
Copy link
Collaborator

@agualis agualis commented Dec 2, 2024

No description provided.

!isStandardOrUnderlyingRootToken(pool, token2)
) {
return false
}
Copy link
Contributor

@groninge01 groninge01 Dec 4, 2024

Choose a reason for hiding this comment

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

const token1IsStandard = isStandardOrUnderlyingRootToken(pool, token1)
const token2IsStandard = isStandardOrUnderlyingRootToken(pool, token2)

if (token1IsStandard === token2IsStandard) {
  return false
}

<Box flex="1" key={`button-group-option-${option.value}`}>
<GroupOptionButton
isActive={isActive}
key={`button-group-option-${option.value}`}
Copy link
Contributor

Choose a reason for hiding this comment

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

key is probably not needed here

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

If we had multiple options with no tabTooltipLabel, we would need that key do differentiate the different Box components, wouldn't we?

Copy link
Contributor

@groninge01 groninge01 Dec 4, 2024

Choose a reason for hiding this comment

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

the key is already on the parent Box, so not needed on the child GroupOptionButton

bg="transparent"
id={`button-group-${option.value}`}
isDisabled={option.disabled}
key={`button-group-option-${option.value}`}
Copy link
Contributor

Choose a reason for hiding this comment

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

i think this key is also probably not needed


function IconPopover({ option }: { option: ButtonGroupOption }) {
if (option.tabTooltipLabel) return null
if (!option.iconTooltipLabel) return null
Copy link
Contributor

Choose a reason for hiding this comment

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

if (option.tabTooltipLabel || !option.iconTooltipLabel) return null

let errorMessage = 'Unexpected error. Please ask for support'
let proportionalLabel = 'Please use proportional mode.'

if (!error) return
Copy link
Contributor

Choose a reason for hiding this comment

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

move this to the top of the function

import { BalAlertLink } from '../alerts/BalAlertLink'
import { ErrorAlert } from './ErrorAlert'
import { useAddLiquidity } from '@repo/lib/modules/pool/actions/add-liquidity/AddLiquidityProvider'

type Props = AlertProps & {
error?: Error | null
Copy link
Contributor

Choose a reason for hiding this comment

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

why is error optional?

packages/lib/shared/utils/error-filters.ts Outdated Show resolved Hide resolved
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants