Skip to content

Commit

Permalink
fix: always show reserve (#2003)
Browse files Browse the repository at this point in the history
  • Loading branch information
Ross Bulat authored Feb 28, 2024
1 parent 63cdf53 commit b118f9c
Showing 1 changed file with 45 additions and 47 deletions.
92 changes: 45 additions & 47 deletions src/pages/Overview/BalanceChart.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -244,53 +244,51 @@ export const BalanceChart = () => {
</Bar>
</div>
) : null}
{greaterThanZero(fundsReserved) ? (
<div
style={{
flex: 0,
minWidth: '12.5rem',
maxWidth: '12.5rem',
flexBasis: '50%',
}}
>
<Legend className="end">
<LegendItem
label=""
button={
<ButtonTertiary
text={t('overview.reserveBalance')}
onClick={() =>
openModal({ key: 'UpdateReserve', size: 'sm' })
}
iconRight={
syncing
? undefined
: !feeReserve.isZero() && !edReserved.isZero()
? faCheckDouble
: feeReserve.isZero() && edReserved.isZero()
? undefined
: faCheck
}
iconTransform="shrink-1"
disabled={
!activeAccount ||
syncing ||
!accountHasSigner(activeAccount)
}
/>
}
/>
</Legend>
<Bar>
<BarSegment
dataClass="d4"
widthPercent={100}
flexGrow={1}
label={`${fundsReserved.decimalPlaces(3).toFormat()} ${unit}`}
/>
</Bar>
</div>
) : null}
<div
style={{
flex: 0,
minWidth: '12.5rem',
maxWidth: '12.5rem',
flexBasis: '50%',
}}
>
<Legend className="end">
<LegendItem
label=""
button={
<ButtonTertiary
text={t('overview.reserveBalance')}
onClick={() =>
openModal({ key: 'UpdateReserve', size: 'sm' })
}
iconRight={
syncing
? undefined
: !feeReserve.isZero() && !edReserved.isZero()
? faCheckDouble
: feeReserve.isZero() && edReserved.isZero()
? undefined
: faCheck
}
iconTransform="shrink-1"
disabled={
!activeAccount ||
syncing ||
!accountHasSigner(activeAccount)
}
/>
}
/>
</Legend>
<Bar>
<BarSegment
dataClass="d4"
widthPercent={100}
flexGrow={1}
label={`${fundsReserved.decimalPlaces(3).toFormat()} ${unit}`}
/>
</Bar>
</div>
</section>
</BarChartWrapper>
</>
Expand Down

0 comments on commit b118f9c

Please # to comment.