Skip to content

Commit

Permalink
refactor: simpler to check is false
Browse files Browse the repository at this point in the history
  • Loading branch information
truemiller committed Aug 30, 2024
1 parent a636a83 commit aed5988
Showing 1 changed file with 14 additions and 16 deletions.
30 changes: 14 additions & 16 deletions frontend/components/MainPage/sections/NeedsFundsSection.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -53,22 +53,20 @@ export const MainNeedsFunds = () => {
<Flex vertical gap={16}>
<Text className="font-weight-600">Your agent needs funds</Text>
<Flex gap={24}>
{!isNil(hasEnoughEthForInitialFunding) &&
!hasEnoughOlasForInitialFunding && (
<div>
<FundingValue>{`${UNICODE_SYMBOLS.OLAS}${serviceFundRequirements.olas} OLAS `}</FundingValue>
<span className="text-sm">for staking</span>
</div>
)}
{!isNil(hasEnoughOlasForInitialFunding) &&
!hasEnoughEthForInitialFunding && (
<div>
<FundingValue>
{`$${serviceFundRequirements.eth} XDAI `}
</FundingValue>
<span className="text-sm">for trading</span>
</div>
)}
{hasEnoughOlasForInitialFunding === false && (
<div>
<FundingValue>{`${UNICODE_SYMBOLS.OLAS}${serviceFundRequirements.olas} OLAS `}</FundingValue>
<span className="text-sm">for staking</span>
</div>
)}
{hasEnoughEthForInitialFunding === false && (
<div>
<FundingValue>
{`$${serviceFundRequirements.eth} XDAI `}
</FundingValue>
<span className="text-sm">for trading</span>
</div>
)}
</Flex>
<ul className="p-0 m-0 text-sm">
<li>Do not add more than these amounts.</li>
Expand Down

0 comments on commit aed5988

Please sign in to comment.