diff --git a/projects/sdk/src/constants/actions.ts b/projects/sdk/src/constants/actions.ts index 332f8e22f8..bc239605cf 100644 --- a/projects/sdk/src/constants/actions.ts +++ b/projects/sdk/src/constants/actions.ts @@ -16,7 +16,7 @@ export enum ActionType { /// FIELD BUY_BEANS, - BURN_BEANS, + SOW_BEANS, RECEIVE_PODS, HARVEST, RECEIVE_BEANS, diff --git a/projects/ui/src/components/Analytics/Bean/Crosses.tsx b/projects/ui/src/components/Analytics/Bean/Crosses.tsx index bd25879403..43b04c3036 100644 --- a/projects/ui/src/components/Analytics/Bean/Crosses.tsx +++ b/projects/ui/src/components/Analytics/Bean/Crosses.tsx @@ -17,7 +17,7 @@ const getValue = (season: SnapshotData) => season.crosses; const formatValue = (value: number) => `${value}`; const statProps = { title: 'Peg Crosses', - titleTooltip: 'The number of times Bean has crossed its peg. Does not include peg crosses due to ETH price movement.', + titleTooltip: 'The total number of times Bean has crossed its peg at the beginning of every Season.', gap: 0.25, sx: { ml: 0 }, }; diff --git a/projects/ui/src/components/Analytics/Bean/DeltaB.tsx b/projects/ui/src/components/Analytics/Bean/DeltaB.tsx index 5c9a239635..8105ce0fdf 100644 --- a/projects/ui/src/components/Analytics/Bean/DeltaB.tsx +++ b/projects/ui/src/components/Analytics/Bean/DeltaB.tsx @@ -20,7 +20,7 @@ const formatValue = (value: number) => `${value.toLocaleString('en-us', { maximumFractionDigits: 2 })}`; const statProps = { title: 'deltaB', - titleTooltip: 'The liquidity and time weighted average shortage of Beans in liquidity pools on the Oracle Whitelist at the end of every Season.', + titleTooltip: 'The liquidity and time weighted average shortage of Beans in liquidity pools on the Oracle Whitelist at the beginning of every Season.', gap: 0.25, }; diff --git a/projects/ui/src/components/Analytics/Bean/Liquidity.tsx b/projects/ui/src/components/Analytics/Bean/Liquidity.tsx index 1ab475a657..2a9897d290 100644 --- a/projects/ui/src/components/Analytics/Bean/Liquidity.tsx +++ b/projects/ui/src/components/Analytics/Bean/Liquidity.tsx @@ -18,8 +18,7 @@ const formatValue = (value: number) => `$${value.toLocaleString('en-US', { maximumFractionDigits: 0 })}`; const statProps = { title: 'Liquidity', - titleTooltip: - 'The USD value of the tokens in the BEAN:3CRV and BEAN:ETH pools at the end of every Season.', + titleTooltip: 'The total USD value of tokens in liquidity pools on the Oracle Whitelist at the beginning of every Season.', gap: 0.25, }; const queryConfig = { diff --git a/projects/ui/src/components/Analytics/Bean/LiquiditySupplyRatio.tsx b/projects/ui/src/components/Analytics/Bean/LiquiditySupplyRatio.tsx index 296269089e..fe312ab7e3 100644 --- a/projects/ui/src/components/Analytics/Bean/LiquiditySupplyRatio.tsx +++ b/projects/ui/src/components/Analytics/Bean/LiquiditySupplyRatio.tsx @@ -15,9 +15,9 @@ const getValue = (season: LiquiditySupplyRatioQuery['seasons'][number]) => const formatValue = (value: number) => `${value.toFixed(4)}%`; const statProps = { - title: 'Liquidity:Supply Ratio', + title: 'Liquidity to Supply Ratio', titleTooltip: - `The ratio of Beans in liquidity pools on the Oracle Whitelist per Bean, displayed as a percentage. The Liquidity:Supply Ratio is a useful indicator of Beanstalk's health.`, + `The ratio of Beans in liquidity pools on the Oracle Whitelist per Bean, displayed as a percentage, at the beginning of every Season. The Liquidity to Supply Ratio is a useful indicator of Beanstalk's health.`, gap: 0.25, }; const queryConfig = { diff --git a/projects/ui/src/components/Analytics/Bean/MarketCap.tsx b/projects/ui/src/components/Analytics/Bean/MarketCap.tsx index bea9859d59..6eb48e5a72 100644 --- a/projects/ui/src/components/Analytics/Bean/MarketCap.tsx +++ b/projects/ui/src/components/Analytics/Bean/MarketCap.tsx @@ -15,7 +15,7 @@ const formatValue = (value: number) => const statProps = { title: 'Market Cap', titleTooltip: - 'The USD value of the total Bean supply at the end of every Season.', + 'The USD value of the Bean supply at the beginning of every Season.', gap: 0.25, }; const lineChartProps: Partial = { diff --git a/projects/ui/src/components/Analytics/Bean/Price.tsx b/projects/ui/src/components/Analytics/Bean/Price.tsx index b48f78acb3..49b6fc5ad1 100644 --- a/projects/ui/src/components/Analytics/Bean/Price.tsx +++ b/projects/ui/src/components/Analytics/Bean/Price.tsx @@ -15,7 +15,7 @@ const getValue = (season: Season) => parseFloat(season.price); const formatValue = (value: number) => `$${value.toFixed(4)}`; const statProps = { title: 'Bean Price', - titleTooltip: 'The price at the end of every Season.', + titleTooltip: 'The USD price of 1 Bean at the beginning of every Season.', gap: 0.25, }; const lineChartProps: Partial = { diff --git a/projects/ui/src/components/Analytics/Bean/Supply.tsx b/projects/ui/src/components/Analytics/Bean/Supply.tsx index 7f28173786..b98f2f4693 100644 --- a/projects/ui/src/components/Analytics/Bean/Supply.tsx +++ b/projects/ui/src/components/Analytics/Bean/Supply.tsx @@ -25,7 +25,7 @@ const useStatProps = () => { const isTiny = useMediaQuery(theme.breakpoints.down('md')); return { title: isTiny ? 'Supply' : 'Bean Supply', - titleTooltip: 'The total Bean supply at the end of every Season.', + titleTooltip: 'The total Bean supply at the beginning of every Season.', gap: 0.25, }; }; diff --git a/projects/ui/src/components/Analytics/Bean/Volume.tsx b/projects/ui/src/components/Analytics/Bean/Volume.tsx index 59def95cfb..f45d54f508 100644 --- a/projects/ui/src/components/Analytics/Bean/Volume.tsx +++ b/projects/ui/src/components/Analytics/Bean/Volume.tsx @@ -18,7 +18,7 @@ const formatValue = (value: number) => `$${value.toLocaleString('en-US', { maximumFractionDigits: 0 })}`; const statProps = { title: 'Volume', - titleTooltip: 'The total volume in the BEAN:3CRV and BEAN:ETH pools in every Season.', + titleTooltip: 'The total USD volume in liquidity pools on the Oracle Whitelist every Season.', gap: 0.25, }; const queryConfig = { context: { subgraph: 'bean' } }; diff --git a/projects/ui/src/components/Analytics/Bean/VolumeChart.tsx b/projects/ui/src/components/Analytics/Bean/VolumeChart.tsx index 09746eb7d9..c337e74016 100644 --- a/projects/ui/src/components/Analytics/Bean/VolumeChart.tsx +++ b/projects/ui/src/components/Analytics/Bean/VolumeChart.tsx @@ -112,7 +112,7 @@ const VolumeChart: FC<{ width?: number; height: number }> = ({ > = () => { - + {/* TODO: The height prop currently *only* reflects in the chart height. However, the full component diff --git a/projects/ui/src/components/Analytics/Field/HarvestedPods.tsx b/projects/ui/src/components/Analytics/Field/HarvestedPods.tsx index 46328339c8..b839a43a13 100644 --- a/projects/ui/src/components/Analytics/Field/HarvestedPods.tsx +++ b/projects/ui/src/components/Analytics/Field/HarvestedPods.tsx @@ -19,8 +19,8 @@ const getValue = (season: SnapshotData) => const formatValue = (value: number) => `${value.toLocaleString('en-US', { maximumFractionDigits: 0 })}`; const StatProps = { - title: 'Harvested Pods', - titleTooltip: 'The total number of Pods Harvested at the end of each Season.', + title: 'Pods Harvested', + titleTooltip: 'The total number of Pods Harvested at the beginning of every Season.', gap: 0.5, }; const lineChartProps: Partial = { diff --git a/projects/ui/src/components/Analytics/Field/PodRate.tsx b/projects/ui/src/components/Analytics/Field/PodRate.tsx index 174a45a11f..a7321dd65d 100644 --- a/projects/ui/src/components/Analytics/Field/PodRate.tsx +++ b/projects/ui/src/components/Analytics/Field/PodRate.tsx @@ -20,7 +20,7 @@ const formatValue = (value: number) => `${value.toFixed(2)}%`; const statProps = { title: 'Pod Rate', titleTooltip: - 'The ratio of outstanding Pods per Bean, displayed as a percentage. The Pod Rate is used by Beanstalk as a proxy for its health.', + 'The ratio of Unharvestable Pods per Bean, displayed as a percentage, at the beginning of every Season. The Pod Rate is used by Beanstalk as a proxy for its health.', gap: 0.25, sx: { ml: 0 }, }; diff --git a/projects/ui/src/components/Analytics/Field/Pods.tsx b/projects/ui/src/components/Analytics/Field/Pods.tsx index c8587e7e09..b80a19676a 100644 --- a/projects/ui/src/components/Analytics/Field/Pods.tsx +++ b/projects/ui/src/components/Analytics/Field/Pods.tsx @@ -17,7 +17,7 @@ const formatValue = (value: number) => `${value.toLocaleString('en-US', { maximumFractionDigits: 0 })}`; const statProps = { title: 'Pods', - titleTooltip: 'The total number of Pods at the end of each Season.', + titleTooltip: 'The total number of Unharvestable Pods at the beginning of every Season.', gap: 0.5, }; const lineChartProps: Partial = { diff --git a/projects/ui/src/components/Analytics/Field/RRoR.tsx b/projects/ui/src/components/Analytics/Field/RRoR.tsx index 2a3d976c3a..8e3ffb002f 100644 --- a/projects/ui/src/components/Analytics/Field/RRoR.tsx +++ b/projects/ui/src/components/Analytics/Field/RRoR.tsx @@ -15,7 +15,7 @@ const formatValue = (value: number) => `${value.toFixed(2)}%`; const statProps = { title: 'Real Rate of Return', titleTooltip: - 'The return for Sowing Beans at the beginning of each Season, accounting for the Bean price. RRoR = (1 + Temperature) / TWAP.', + 'The return for Sowing Beans at the beginning of every Season, accounting for the Bean price. RRoR = (1 + Temperature) / TWAP.', gap: 0.5, }; const lineChartProps: Partial = { diff --git a/projects/ui/src/components/Analytics/Field/Sown.tsx b/projects/ui/src/components/Analytics/Field/Sown.tsx index b1e8d81d27..ee8eedc26c 100644 --- a/projects/ui/src/components/Analytics/Field/Sown.tsx +++ b/projects/ui/src/components/Analytics/Field/Sown.tsx @@ -18,7 +18,7 @@ const formatValue = (value: number) => `${value.toLocaleString('en-US', { maximumFractionDigits: 0 })}`; const statProps = { title: 'Beans Sown', - titleTooltip: 'The total number of Beans Sown at the end of each Season.', + titleTooltip: 'The total number of Beans Sown at the beginning of every Season.', gap: 0.25, sx: { ml: 0 }, }; diff --git a/projects/ui/src/components/Analytics/Field/Temperature.tsx b/projects/ui/src/components/Analytics/Field/Temperature.tsx index fa59d15584..7f15a3a683 100644 --- a/projects/ui/src/components/Analytics/Field/Temperature.tsx +++ b/projects/ui/src/components/Analytics/Field/Temperature.tsx @@ -20,7 +20,7 @@ const getValue = (snapshot: SnapshotData) => const formatValue = (value: number) => `${value.toFixed(0)}%`; const statProps = { title: 'Max Temperature', - titleTooltip: 'The maximum interest rate for Sowing Beans each Season.', + titleTooltip: 'The maximum interest rate for Sowing Beans every Season.', gap: 0.5, }; const lineChartProps: Partial = { diff --git a/projects/ui/src/components/Analytics/Field/TotalSowers.tsx b/projects/ui/src/components/Analytics/Field/TotalSowers.tsx index b0e768140f..5102845919 100644 --- a/projects/ui/src/components/Analytics/Field/TotalSowers.tsx +++ b/projects/ui/src/components/Analytics/Field/TotalSowers.tsx @@ -18,7 +18,7 @@ const getValue = (season: SnapshotData) => const formatValue = (value: number) => `${value}`; const statProps = { title: 'Total Sowers', - titleTooltip: 'The total number of unique Sowers at the end of each Season.', + titleTooltip: 'The total number of unique Sowers at the beginning of every Season.', gap: 0.25, sx: { ml: 0 }, }; diff --git a/projects/ui/src/components/Analytics/Silo/DepositedAsset.tsx b/projects/ui/src/components/Analytics/Silo/DepositedAsset.tsx index a136b6ef23..51e6e84300 100644 --- a/projects/ui/src/components/Analytics/Silo/DepositedAsset.tsx +++ b/projects/ui/src/components/Analytics/Silo/DepositedAsset.tsx @@ -39,7 +39,7 @@ const DepositedAsset: FC<{ : asset.symbol === 'urBEAN' ? 'Unripe Beans' : asset.name - } at the end of each Season.`, + } at the beginning of every Season.`, gap: 0.5, }), [asset] diff --git a/projects/ui/src/components/Analytics/Silo/Seeds.tsx b/projects/ui/src/components/Analytics/Silo/Seeds.tsx index 459c4d1f3c..8c212dd257 100644 --- a/projects/ui/src/components/Analytics/Silo/Seeds.tsx +++ b/projects/ui/src/components/Analytics/Silo/Seeds.tsx @@ -17,7 +17,7 @@ const formatValue = (value: number) => `${value.toLocaleString('en-US', { maximumFractionDigits: 0 })}`; const statProps = { title: 'Seeds', - titleTooltip: 'The total number of Seeds at the end of each Season.', + titleTooltip: 'The total number of Seeds at the beginning of every Season.', gap: 0.5, }; const queryConfig = { diff --git a/projects/ui/src/components/Analytics/Silo/Stalk.tsx b/projects/ui/src/components/Analytics/Silo/Stalk.tsx index 6f3200bc79..26fae909e9 100644 --- a/projects/ui/src/components/Analytics/Silo/Stalk.tsx +++ b/projects/ui/src/components/Analytics/Silo/Stalk.tsx @@ -17,7 +17,7 @@ const formatValue = (value: number) => `${value.toLocaleString('en-US', { maximumFractionDigits: 0 })}`; const statProps = { title: 'Stalk', - titleTooltip: 'The total number of Stalk at the end of each Season.', + titleTooltip: 'The total number of Stalk at the beginning of every Season.', gap: 0.5, }; const queryConfig = { diff --git a/projects/ui/src/components/App/index.tsx b/projects/ui/src/components/App/index.tsx index 5ad909b9ff..f58a4f89b7 100644 --- a/projects/ui/src/components/App/index.tsx +++ b/projects/ui/src/components/App/index.tsx @@ -204,6 +204,7 @@ export default function App() { } /> } /> + {/* - + */} + ); diff --git a/projects/ui/src/components/Balances/SiloBalances.tsx b/projects/ui/src/components/Balances/SiloBalances.tsx index e691069db7..c445f77385 100644 --- a/projects/ui/src/components/Balances/SiloBalances.tsx +++ b/projects/ui/src/components/Balances/SiloBalances.tsx @@ -443,7 +443,7 @@ const SiloBalances: React.FC<{}> = () => { {displayFullBN( token.getSeeds(deposits?.bdv ?? ZERO_BN), - 0 + 2 )} diff --git a/projects/ui/src/components/Balances/SiloBalancesHistory.tsx b/projects/ui/src/components/Balances/SiloBalancesHistory.tsx index 6a323c5c47..3924cb0c28 100644 --- a/projects/ui/src/components/Balances/SiloBalancesHistory.tsx +++ b/projects/ui/src/components/Balances/SiloBalancesHistory.tsx @@ -53,13 +53,21 @@ const SiloBalancesHistory: React.FC<{}> = () => { }; return ( - + {account !== undefined ? ( + The historical USD value of your Silo Deposits at the beginning of every Season.
+ + Note: Unripe assets are valued based on the current Chop Rate. Earned Beans are shown upon Plant. + + + , gap: 0.25, }} timeTabParams={timeTabParams} diff --git a/projects/ui/src/components/Balances/TokenBalanceTable.tsx b/projects/ui/src/components/Balances/TokenBalanceTable.tsx index 61fb66acf1..cbf1e8af01 100644 --- a/projects/ui/src/components/Balances/TokenBalanceTable.tsx +++ b/projects/ui/src/components/Balances/TokenBalanceTable.tsx @@ -97,7 +97,7 @@ const TokenBalanceTable: React.FC<{ ) : ( - {`You don't have any tokens in your ${pageName} Balance`} + {`You don't have any tokens in your ${pageName} Balance.`} )} diff --git a/projects/ui/src/components/Barn/Actions/Buy.tsx b/projects/ui/src/components/Barn/Actions/Buy.tsx index a9a50db4f6..d2f6a0f69b 100644 --- a/projects/ui/src/components/Barn/Actions/Buy.tsx +++ b/projects/ui/src/components/Barn/Actions/Buy.tsx @@ -43,7 +43,7 @@ import useFarmerBalances from '~/hooks/farmer/useFarmerBalances'; import usePreferredToken, { PreferredToken, } from '~/hooks/farmer/usePreferredToken'; -import { getTokenIndex, normaliseTV, tokenValueToBN } from '~/util'; +import { displayTokenAmount, getTokenIndex, normaliseTV, tokenValueToBN } from '~/util'; import { useFetchFarmerAllowances } from '~/state/farmer/allowances/updater'; import { FarmerBalances } from '~/state/farmer/balances'; import FertilizerItem from '../FertilizerItem'; @@ -206,7 +206,7 @@ const BuyForm: FC< balanceFrom={values.balanceFrom} params={quoteProviderParams} /> - + {/* Outputs */} {fert?.gt(0) ? ( <> @@ -229,10 +229,34 @@ const BuyForm: FC<
The amount of Fertilizer received is:
- {values.tokens[0].amount?.toFixed(2)}{' '} - {values.tokens[0].token.symbol} + {values.tokens[0].amount?.gt(0) && ( + <> + {displayTokenAmount( + values.tokens[0].amount || BigNumber(0), + values.tokens[0].token, + { showName: false, showSymbol: true } + )} + + )}{' '} + {values.claimableBeans.amount?.gt(0) && ( + <> + {values.tokens[0].amount?.gt(0) && (<>+ )} + {displayTokenAmount( + values.claimableBeans.amount, + sdk.tokens.BEAN, + { showName: false, showSymbol: true } + )} + + )}{' '} {values.tokens[0].token.symbol !== 'WETH' && ( - <> → {values.tokens[0].amountOut?.toFixed(2)} WETH + <> + →{' '} + {displayTokenAmount( + values.tokens[0].amountOut?.plus(values.claimableBeans.amountOut || BigNumber(0)) || BigNumber(0), + sdk.tokens.WETH, + { showName: false, showSymbol: true } + )} + )}{' '} * ${ethPrice.toHuman('short')} = {fert.toFixed(0)} Fertilizer
@@ -287,7 +311,7 @@ const BuyForm: FC< Buy - + quoteProviderProps={{ tokenOut: token, diff --git a/projects/ui/src/components/Common/Balances/BeanstalkBalances.tsx b/projects/ui/src/components/Common/Balances/BeanstalkBalances.tsx index db80b92820..858d69fce3 100644 --- a/projects/ui/src/components/Common/Balances/BeanstalkBalances.tsx +++ b/projects/ui/src/components/Common/Balances/BeanstalkBalances.tsx @@ -205,6 +205,7 @@ const BeanstalkBalances: FC<{ WHITELIST[address], breakdown.tokens[address].amount )} + amountTooltipLocation="right" /> ))} diff --git a/projects/ui/src/components/Common/Balances/TokenRow.tsx b/projects/ui/src/components/Common/Balances/TokenRow.tsx index 8b365f9ed4..f096e098af 100644 --- a/projects/ui/src/components/Common/Balances/TokenRow.tsx +++ b/projects/ui/src/components/Common/Balances/TokenRow.tsx @@ -24,6 +24,8 @@ const TokenRow: FC<{ amount?: string | JSX.Element; /* Display a tooltip when hovering over the amount */ amountTooltip?: string | JSX.Element; + /* Override the default tooltip location */ + amountTooltipLocation?: any; /* The USD value of the amount of Token */ value?: string | JSX.Element; /* Fade this row out when others are selected */ @@ -42,6 +44,7 @@ const TokenRow: FC<{ token, amount, amountTooltip, + amountTooltipLocation, value, isFaded = false, isSelected = false, @@ -90,7 +93,7 @@ const TokenRow: FC<{ )} - +
{token && } diff --git a/projects/ui/src/components/Common/Charts/ChartPropProvider.tsx b/projects/ui/src/components/Common/Charts/ChartPropProvider.tsx index bd06ef5b84..cc1787b51e 100644 --- a/projects/ui/src/components/Common/Charts/ChartPropProvider.tsx +++ b/projects/ui/src/components/Common/Charts/ChartPropProvider.tsx @@ -200,6 +200,11 @@ const defaultChartStyles: ChartMultiStyles = { fillPrimary: chartColors.yellowLight, strokeWidth: 2, }, + 4: { + stroke: chartColors.blue, + fillPrimary: chartColors.blueLight, + strokeWidth: 2, + }, }; /** diff --git a/projects/ui/src/components/Common/Form/FormTxn/AddPlantTxnToggle.tsx b/projects/ui/src/components/Common/Form/FormTxn/AddPlantTxnToggle.tsx index 25807d6a77..dc85371c4a 100644 --- a/projects/ui/src/components/Common/Form/FormTxn/AddPlantTxnToggle.tsx +++ b/projects/ui/src/components/Common/Form/FormTxn/AddPlantTxnToggle.tsx @@ -53,7 +53,8 @@ const sx = { */ const AddPlantTxnToggle: React.FC<{ plantAndDoX: PlantAndDoX | undefined; -}> = ({ plantAndDoX }) => { + actionText?: string; +}> = ({ plantAndDoX, actionText }) => { /// Local State const [open, show, hide] = useToggle(); @@ -123,10 +124,10 @@ const AddPlantTxnToggle: React.FC<{ /> - Use Earned Beans + {`${actionText || 'Use'} Earned Beans`} - Toggle to claim Earned Beans in your transaction + {`Toggle to ${actionText || 'Claim'} Earned Beans in this transaction.`} @@ -149,7 +150,7 @@ const AddPlantTxnToggle: React.FC<{ > - You will Plant to claim these Silo rewards + You will claim these Silo rewards: {items.map((item, i) => ( diff --git a/projects/ui/src/components/Common/Form/FormTxn/AdditionalTxnsAccordion.tsx b/projects/ui/src/components/Common/Form/FormTxn/AdditionalTxnsAccordion.tsx index 187fe5d526..6773b3ccb6 100644 --- a/projects/ui/src/components/Common/Form/FormTxn/AdditionalTxnsAccordion.tsx +++ b/projects/ui/src/components/Common/Form/FormTxn/AdditionalTxnsAccordion.tsx @@ -170,8 +170,9 @@ const AdditionalTxnsAccordion: React.FC = ({ filter }) => { useEffect(() => { if (!farmActions.secondary) { setLocal(impliedOptions); + setFieldValue('farmActions.secondary', impliedOptions); } - }, [farmActions.secondary, impliedOptions]); + }, [farmActions.secondary, setFieldValue, impliedOptions]); if (!allOptions?.length) return null; diff --git a/projects/ui/src/components/Common/Form/FormTxn/ClaimBeanDrawerContent.tsx b/projects/ui/src/components/Common/Form/FormTxn/ClaimBeanDrawerContent.tsx index ef0c9b6a46..e108c5c9f2 100644 --- a/projects/ui/src/components/Common/Form/FormTxn/ClaimBeanDrawerContent.tsx +++ b/projects/ui/src/components/Common/Form/FormTxn/ClaimBeanDrawerContent.tsx @@ -208,7 +208,7 @@ export default function ClaimBeanDrawerContent({ - Amount of Claimable Beans to use in this transaction + Amount of Claimable Beans to use in this transaction: name={name} diff --git a/projects/ui/src/components/Common/Form/FormTxn/ClaimBeanDrawerToggle.tsx b/projects/ui/src/components/Common/Form/FormTxn/ClaimBeanDrawerToggle.tsx index 2c14ace0a8..4e4d8eb75e 100644 --- a/projects/ui/src/components/Common/Form/FormTxn/ClaimBeanDrawerToggle.tsx +++ b/projects/ui/src/components/Common/Form/FormTxn/ClaimBeanDrawerToggle.tsx @@ -35,7 +35,7 @@ const actionsToIconMap = { }, }; -const ClaimBeanDrawerToggle: React.FC<{}> = () => { +const ClaimBeanDrawerToggle: React.FC<{ actionText?: string }> = ({ actionText }) => { /// Formik const { values } = useFormikContext(); @@ -94,10 +94,10 @@ const ClaimBeanDrawerToggle: React.FC<{}> = () => { /> - Use Claimable Beans + {`${actionText || 'Use'} Claimable Beans`} - Select assets to use in this transaction + Select additional assets to use in this transaction. diff --git a/projects/ui/src/components/Common/Form/TokenOutput.tsx b/projects/ui/src/components/Common/Form/TokenOutput.tsx index 41e8fc1dee..234431a7e5 100644 --- a/projects/ui/src/components/Common/Form/TokenOutput.tsx +++ b/projects/ui/src/components/Common/Form/TokenOutput.tsx @@ -59,7 +59,10 @@ type TokenOutputRowProps = { const formatBN = (value?: BigNumber, _decimals?: number, suffix?: string) => { if (!value) return ''; const decimals = value.abs().gt(new BigNumber(1000000)) ? 0 : _decimals || 2; - const prefix = value ? (value.gte(0) ? '+' : '-') : ''; + const prefix = value ? (value.gt(0) ? '+' : value.lt(0) ? '-' : '') : ''; + if (value.abs().lt(0.01) && value.abs().gt(0)) { + return `${prefix} <0.01${suffix || ''}`; + }; return `${prefix} ${displayFullBN(value.abs(), decimals, decimals)}${ suffix || '' }`; diff --git a/projects/ui/src/components/Common/Form/TxnPreview.tsx b/projects/ui/src/components/Common/Form/TxnPreview.tsx index ed407c3677..05789bd309 100644 --- a/projects/ui/src/components/Common/Form/TxnPreview.tsx +++ b/projects/ui/src/components/Common/Form/TxnPreview.tsx @@ -213,7 +213,7 @@ const TxnStep: FC<{ ); break; - case ActionType.BURN_BEANS: + case ActionType.SOW_BEANS: step = ( @@ -386,7 +386,7 @@ const EXECUTION_STEPS = [ ActionType.CREATE_ORDER, ActionType.TRANSFER, ActionType.BUY_BEANS, - ActionType.BURN_BEANS, + ActionType.SOW_BEANS, ActionType.TRANSFER_PODS, ActionType.TRANSFER_MULTIPLE_PLOTS, ActionType.SELL_PODS, diff --git a/projects/ui/src/components/Field/Actions/Sow.tsx b/projects/ui/src/components/Field/Actions/Sow.tsx index b0014b675a..a1cf600c58 100644 --- a/projects/ui/src/components/Field/Actions/Sow.tsx +++ b/projects/ui/src/components/Field/Actions/Sow.tsx @@ -268,7 +268,7 @@ const SowForm: FC< balanceFrom={values.balanceFrom} disableTokenSelect={!hasSoil || !maxAmountIn} /> - {hasSoil && } + {hasSoil && } {!hasSoil ? ( @@ -308,13 +308,13 @@ const SowForm: FC< actions={[ { type: ActionType.BUY_BEANS, - beanAmount: totalBeansAmount, + beanAmount: beans, beanPrice: beanPrice, token: getNewToOldToken(tokenIn), tokenAmount: amountIn || ZERO_BN, }, { - type: ActionType.BURN_BEANS, + type: ActionType.SOW_BEANS, amount: totalBeansAmount, }, { @@ -366,7 +366,7 @@ const SowForm: FC< Sow - + = () => { amount={displayFullBN(normalizeBN(podLine), 0)} subtitle={ - The total number of outstanding Pods. + The total number of Unharvestable Pods. } /> diff --git a/projects/ui/src/components/Forecast/LiquidityByState.tsx b/projects/ui/src/components/Forecast/LiquidityByState.tsx index 70e1f88b5a..f5e2c3326a 100644 --- a/projects/ui/src/components/Forecast/LiquidityByState.tsx +++ b/projects/ui/src/components/Forecast/LiquidityByState.tsx @@ -33,7 +33,7 @@ const LiquidityByState: FC = ({ sx }) => { { title: 'Stalk', tooltip: - 'This is the total Stalk supply. Stalk is the governance token of the Beanstalk DAO. Stalk entitles holders to passive interest in the form of a share of future Bean mints, and the right to propose and vote on BIPs.', + 'The total Stalk supply. Stalk is the governance token of the Beanstalk DAO. Stalk entitles holders to passive interest in the form of a share of future Bean mints, and the right to propose and vote on BIPs.', token: STALK, amount: beanstalkSilo.stalk.total, }, @@ -47,14 +47,14 @@ const LiquidityByState: FC = ({ sx }) => { { title: 'Pods', tooltip: - 'This is the total Pod supply. Pods become Harvestable on a FIFO basis.', + 'The total number of Unharvestable Pods. Pods become Harvestable on a FIFO basis.', token: PODS, amount: beanstalkField.podLine, }, { title: 'Sprouts', tooltip: - 'This is the total Sprout supply. Sprouts are the number of Beans left to be earned from Active Fertilizer. Sprouts become Rinsable on a pari passu basis.', + 'The total number of Unrinsable Sprouts. Sprouts are the number of Beans left to be earned from Active Fertilizer. Sprouts become Rinsable on a pari passu basis.', token: SPROUTS, amount: beanstalkBarn.unfertilized, }, diff --git a/projects/ui/src/components/Forecast/LiquidityOverTime.tsx b/projects/ui/src/components/Forecast/LiquidityOverTime.tsx index ef867ed820..6adc5f8deb 100644 --- a/projects/ui/src/components/Forecast/LiquidityOverTime.tsx +++ b/projects/ui/src/components/Forecast/LiquidityOverTime.tsx @@ -22,6 +22,7 @@ const formatValue = (value: number) => ( ); const StatProps = { title: 'Liquidity', + titleTooltip: 'The total USD value of tokens in liquidity pools on the Oracle Whitelist at the beginning of every Season.', gap: 0.25, color: 'primary', sx: { ml: 0 }, diff --git a/projects/ui/src/components/Governance/Proposals/Proposals.graphql b/projects/ui/src/components/Governance/Proposals/Proposals.graphql index 2a05d0aa02..80e226495b 100644 --- a/projects/ui/src/components/Governance/Proposals/Proposals.graphql +++ b/projects/ui/src/components/Governance/Proposals/Proposals.graphql @@ -3,10 +3,12 @@ query Proposals($space_in: [String!]!, $state: String) { proposals ( where: { space_in: $space_in, - state: $state + state: $state, + start_gte: 1660292003, }, orderBy: "created", - orderDirection: desc + orderDirection: desc, + first: 1000 ) { ...Proposal } diff --git a/projects/ui/src/components/Nav/Buttons/AboutButton.tsx b/projects/ui/src/components/Nav/Buttons/AboutButton.tsx index 5d2575f994..49599d2075 100644 --- a/projects/ui/src/components/Nav/Buttons/AboutButton.tsx +++ b/projects/ui/src/components/Nav/Buttons/AboutButton.tsx @@ -76,7 +76,7 @@ const AboutButton: FC = ({ sx }) => { @@ -229,7 +229,7 @@ const SettingsDialog: FC<{ open: boolean; onClose?: () => void }> = ({ Dev Controls - Set season timer + Set Season timer