From 10d54886f9be5464705c72ae370aeb1c59fe5cc6 Mon Sep 17 00:00:00 2001 From: Noah Saso Date: Fri, 24 Jan 2025 15:20:22 +0100 Subject: [PATCH] link to rebalancer user guide --- packages/i18n/locales/en/translation.json | 1 + .../ConfigureRebalancer/Component.stories.tsx | 2 ++ .../actions/ConfigureRebalancer/Component.tsx | 23 +++++++++++++++++++ .../actions/ConfigureRebalancer/index.tsx | 2 ++ 4 files changed, 28 insertions(+) diff --git a/packages/i18n/locales/en/translation.json b/packages/i18n/locales/en/translation.json index cdc21291e9..0b6de9fd0f 100644 --- a/packages/i18n/locales/en/translation.json +++ b/packages/i18n/locales/en/translation.json @@ -1392,6 +1392,7 @@ "realVotingVaultDescription": "Deposit {{tokenSymbol}} to get voting power.", "rebalancerDescription": "The Rebalancer enables automated treasury management. Use the Rebalancer to efficiently convert tokens for scheduled payments or manage your asset portfolio.", "rebalancerGraphTooltip": "The graph below shows the historical balances of the rebalanced tokens, which are displayed directly underneath the graph.", + "rebalancerMainDescription": "The Rebalancer enables automated balance sheet and treasury management. Use the Rebalancer to efficiently convert tokens for scheduled payments or manage your asset portfolio. The Rebalancer is custom-built to address the needs of blockchains, protocols, and DAOs. Check out the <2>user guide for more information.", "rebalancerProjectionExplanation": "This projection displays the expected behavior of the system assuming prices remain constant. In reality, prices will fluctuate.", "recognizeSubDaoDescription": "{{name}} is a legitimate SubDAO. This adds it to the SubDAOs tab.", "redelegate": "Redelegate", diff --git a/packages/stateful/actions/core/actions/ConfigureRebalancer/Component.stories.tsx b/packages/stateful/actions/core/actions/ConfigureRebalancer/Component.stories.tsx index e095c2c080..f26530b624 100644 --- a/packages/stateful/actions/core/actions/ConfigureRebalancer/Component.stories.tsx +++ b/packages/stateful/actions/core/actions/ConfigureRebalancer/Component.stories.tsx @@ -9,6 +9,7 @@ import { import { ChainId, TokenType } from '@dao-dao/types' import { getNativeIbcUsdc, getNativeTokenForChainId } from '@dao-dao/utils' +import { Trans } from '../../../../components' import { ConfigureRebalancerComponent, ConfigureRebalancerData, @@ -264,6 +265,7 @@ Default.args = { }, minBalanceToken: undefined, AddressInput, + Trans, }, isCreating: true, errors: {}, diff --git a/packages/stateful/actions/core/actions/ConfigureRebalancer/Component.tsx b/packages/stateful/actions/core/actions/ConfigureRebalancer/Component.tsx index e0967920f4..653ac715f3 100644 --- a/packages/stateful/actions/core/actions/ConfigureRebalancer/Component.tsx +++ b/packages/stateful/actions/core/actions/ConfigureRebalancer/Component.tsx @@ -7,6 +7,7 @@ import { useTranslation } from 'react-i18next' import { HugeDecimal } from '@dao-dao/math' import { Button, + ButtonLink, ErrorPage, FormCheckbox, IconButton, @@ -32,6 +33,7 @@ import { GenericTokenWithUsdPrice, LoadingData, LoadingDataWithError, + TransProps, } from '@dao-dao/types' import { ActionComponent } from '@dao-dao/types/actions' import { TargetOverrideStrategy } from '@dao-dao/types/contracts/ValenceRebalancer' @@ -114,6 +116,7 @@ export type ConfigureRebalancerOptions = { prices: LoadingDataWithError minBalanceToken: GenericToken | undefined AddressInput: ComponentType> + Trans: ComponentType } export const ConfigureRebalancerComponent: ActionComponent< @@ -131,6 +134,7 @@ export const ConfigureRebalancerComponent: ActionComponent< prices, minBalanceToken, AddressInput, + Trans, }, }) => { const { t } = useTranslation() @@ -269,6 +273,25 @@ export const ConfigureRebalancerComponent: ActionComponent< return ( <> +

+ + The Rebalancer enables automated balance sheet and treasury + management. Use the Rebalancer to efficiently convert tokens for + scheduled payments or manage your asset portfolio. The Rebalancer is + custom-built to address the needs of blockchains, protocols, and DAOs. + Check out the{' '} + + user guide + {' '} + for more information. + +

+ {creatingNewValenceAccount && (
diff --git a/packages/stateful/actions/core/actions/ConfigureRebalancer/index.tsx b/packages/stateful/actions/core/actions/ConfigureRebalancer/index.tsx index d0b2b20b0e..25a1424db6 100644 --- a/packages/stateful/actions/core/actions/ConfigureRebalancer/index.tsx +++ b/packages/stateful/actions/core/actions/ConfigureRebalancer/index.tsx @@ -63,6 +63,7 @@ import { tokensEqual, } from '@dao-dao/utils' +import { Trans } from '../../../../components' import { AddressInput } from '../../../../components/AddressInput' import { useQueryLoadingDataWithError } from '../../../../hooks' import { useTokenBalances } from '../../../hooks/useTokenBalances' @@ -252,6 +253,7 @@ const Component: ActionComponent = ( ? undefined : minBalanceToken.data, AddressInput, + Trans, }} />