Skip to content

Commit

Permalink
feat: change intent colour for healthbar depending on amount staked
Browse files Browse the repository at this point in the history
  • Loading branch information
ciaran- committed Sep 26, 2023
1 parent 5b7ffdc commit f205145
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
3 changes: 0 additions & 3 deletions src/components/HealthBar.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,6 @@ const Level = ({
}}
>
<div
// className="relative h-[inherit] w-full group-hover:scale-y-150 bg-vega-green-550 dark:bg-vega-pink-550"
className={classNames(
'relative h-[inherit] w-full group-hover:scale-y-150',
getIntentBackground(intent)
Expand Down Expand Up @@ -219,8 +218,6 @@ export const HealthBar = ({
const showRemainder = committedNumber < rangeLimit || levels.length === 0
const showOverflow = !showRemainder && lastVisibleLevel < levels.length - 1

console.log('triggerRatio', triggerRatio)

return (
<div className="w-full">
<div
Expand Down
8 changes: 7 additions & 1 deletion src/pages/liquidity-provision/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -381,7 +381,13 @@ const MarketsLiquidity = () => {
tradingMode,
auctionTrigger
)
const intent = intentForStatus(tradingMode)
const suppliedStake = params.data.node.data.suppliedStake
const intent =
suppliedStake >= targetStake
? Intent.Success
: suppliedStake <= targetStake * auctionTrigger
? Intent.Danger
: Intent.Warning
return (
<div>
{tradingModeLabel}
Expand Down

0 comments on commit f205145

Please sign in to comment.