Skip to content

Commit

Permalink
link to rebalancer user guide
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahSaso committed Jan 24, 2025
1 parent e1e7f61 commit 10d5488
Show file tree
Hide file tree
Showing 4 changed files with 28 additions and 0 deletions.
1 change: 1 addition & 0 deletions packages/i18n/locales/en/translation.json
Original file line number Diff line number Diff line change
Expand Up @@ -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</2> 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",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -264,6 +265,7 @@ Default.args = {
},
minBalanceToken: undefined,
AddressInput,
Trans,
},
isCreating: true,
errors: {},
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import { useTranslation } from 'react-i18next'
import { HugeDecimal } from '@dao-dao/math'
import {
Button,
ButtonLink,
ErrorPage,
FormCheckbox,
IconButton,
Expand All @@ -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'
Expand Down Expand Up @@ -114,6 +116,7 @@ export type ConfigureRebalancerOptions = {
prices: LoadingDataWithError<GenericTokenWithUsdPrice[]>
minBalanceToken: GenericToken | undefined
AddressInput: ComponentType<AddressInputProps<ConfigureRebalancerData>>
Trans: ComponentType<TransProps>
}

export const ConfigureRebalancerComponent: ActionComponent<
Expand All @@ -131,6 +134,7 @@ export const ConfigureRebalancerComponent: ActionComponent<
prices,
minBalanceToken,
AddressInput,
Trans,
},
}) => {
const { t } = useTranslation()
Expand Down Expand Up @@ -269,6 +273,25 @@ export const ConfigureRebalancerComponent: ActionComponent<

return (
<>
<p className="secondary-text max-w-prose">
<Trans i18nKey="info.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{' '}
<ButtonLink
containerClassName="inline-block"
href="https://github.com/timewave-computer/rebalancer/blob/main/guides/daodao_rebalancer_user_guide.md"
size="none"
variant="underline"
>
user guide
</ButtonLink>{' '}
for more information.
</Trans>
</p>

{creatingNewValenceAccount && (
<div className="flex flex-col gap-2 mb-2">
<InputLabel name={t('form.initialBalances')} primary />
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down Expand Up @@ -252,6 +253,7 @@ const Component: ActionComponent<undefined, ConfigureRebalancerData> = (
? undefined
: minBalanceToken.data,
AddressInput,
Trans,
}}
/>
</ChainProvider>
Expand Down

0 comments on commit 10d5488

Please sign in to comment.