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

fix: show thorchain lp warning only if pools are enabled and enable them #8886

Merged
merged 1 commit into from
Feb 19, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .env.base
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ REACT_APP_FEATURE_THORCHAINSWAP_LONGTAIL=true
REACT_APP_FEATURE_THORCHAINSWAP_L1_TO_LONGTAIL=true
REACT_APP_FEATURE_SHAPESHIFT_MOBILE_WALLET=false
REACT_APP_FEATURE_THORCHAIN_LP=true
REACT_APP_FEATURE_THORCHAIN_LP_DEPOSIT=false
REACT_APP_FEATURE_THORCHAIN_LP_DEPOSIT=true
REACT_APP_FEATURE_THORCHAIN_LP_WITHDRAW=true
REACT_APP_FEATURE_ACCOUNT_MANAGEMENT=true
REACT_APP_FEATURE_ACCOUNT_MANAGEMENT_LEDGER=true
Expand Down
3 changes: 2 additions & 1 deletion src/pages/ThorChainLP/Pool/Pool.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -102,6 +102,7 @@ export const Pool = () => {
const translate = useTranslate()
const history = useHistory()
const isThorchainPoolsInstable = useFeatureFlag('ThorchainPoolsInstabilityWarning')
const isThorchainLpDepositEnabled = useFeatureFlag('ThorchainLpDeposit')

const assetId = useMemo(() => {
return poolAssetIdToAssetId(params.poolAssetId ?? '')
Expand Down Expand Up @@ -150,7 +151,7 @@ export const Pool = () => {

return (
<Main headerComponent={headerComponent} isSubPage>
{isThorchainPoolsInstable ? (
{isThorchainPoolsInstable && isThorchainLpDepositEnabled ? (
<Alert status='warning' variant='subtle' mb={4}>
<AlertIcon />
<AlertDescription>{translate('pools.instabilityWarning')}</AlertDescription>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1609,7 +1609,7 @@ export const AddLiquidityInput: React.FC<AddLiquidityInputProps> = ({
{incompleteAlert}
{maybeOpportunityNotSupportedExplainer}
{maybeAlert}
{isThorchainPoolsInstable ? (
{isThorchainPoolsInstable && isThorchainLpDepositEnabled ? (
<Alert status='warning' variant='subtle' mx={-2} width='auto'>
<AlertIcon />
<AlertDescription>{translate('pools.instabilityWarning')}</AlertDescription>
Expand Down
3 changes: 2 additions & 1 deletion src/pages/ThorChainLP/components/PoolsHeader.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -28,6 +28,7 @@ export const PoolsHeader = () => {
const translate = useTranslate()
const history = useHistory()
const isThorchainPoolsInstable = useFeatureFlag('ThorchainPoolsInstabilityWarning')
const isThorchainLpDepositEnabled = useFeatureFlag('ThorchainLpDeposit')
const plusIcon = useMemo(() => <FaPlus />, [])
const NavItems: TabItem[] = useMemo(() => {
return [
Expand Down Expand Up @@ -96,7 +97,7 @@ export const PoolsHeader = () => {
</Container>
</Display.Desktop>
<Container maxWidth='container.4xl'>
{isThorchainPoolsInstable ? (
{isThorchainPoolsInstable && isThorchainLpDepositEnabled ? (
<Alert status='warning' variant='subtle'>
<AlertIcon />
<AlertDescription>{translate('pools.instabilityWarning')}</AlertDescription>
Expand Down