Skip to content

Commit

Permalink
Merge pull request #3234 from OlympusDAO/develop
Browse files Browse the repository at this point in the history
[Release] - RBS Capacity when wall is inactive
  • Loading branch information
brightiron authored Nov 20, 2024
2 parents 75a18bd + 8c957c3 commit cd73b0c
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/views/Governance/Proposals/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -91,7 +91,7 @@ export const ProposalPage = () => {
)}
<Typography fontSize={"18px"} fontWeight={600}>
{pending && proposalDetails.startDate ? (
`Voting Starts in ${DateTime.fromJSDate(proposalDetails.startDate).toRelative({
`Voting Starts ${DateTime.fromJSDate(proposalDetails.startDate).toRelative({
base: DateTime.fromJSDate(currentBlockTime),
})}`
) : proposalDetails.status === "Succeeded" ? (
Expand Down
8 changes: 6 additions & 2 deletions src/views/Range/RangeChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -123,7 +123,9 @@ const RangeChart = (props: {
<DataRow title="Wall" balance={formatCurrency(lowerWall, 2, reserveSymbol)} />
<DataRow
title="Capacity"
balance={`${capacityFormatter.format(parseBigNumber(rangeData.low.capacity, 18))} ${reserveSymbol} `}
balance={`${
rangeData.low.active ? capacityFormatter.format(parseBigNumber(rangeData.low.capacity, 18)) : 0
} ${reserveSymbol} `}
/>
<Typography fontSize="15px" fontWeight={600} mt="33px">
Upper Range
Expand All @@ -132,7 +134,9 @@ const RangeChart = (props: {
<DataRow title="Wall" balance={formatCurrency(upperWall, 2, reserveSymbol)} />
<DataRow
title="Capacity"
balance={`${capacityFormatter.format(parseBigNumber(rangeData.high.capacity, 9))} OHM`}
balance={`${
rangeData.high.active ? capacityFormatter.format(parseBigNumber(rangeData.high.capacity, 9)) : 0
} OHM`}
/>
{label === "now" && (
<>
Expand Down
8 changes: 7 additions & 1 deletion src/views/Range/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,13 @@ export const Range = () => {
? parseBigNumber(upperMaxPayout, 9)
: parseBigNumber(rangeData.high.capacity, 9);

const maxCapacity = sellActive ? lowerMaxCapacity : upperMaxCapacity;
const maxCapacity = sellActive
? rangeData.low.active
? lowerMaxCapacity
: 0
: rangeData.high.active
? upperMaxCapacity
: 0;

useEffect(() => {
if (reserveAmount && ohmAmount) {
Expand Down

0 comments on commit cd73b0c

Please sign in to comment.