Skip to content

Commit

Permalink
Merge pull request #158 from balancer/fix/lint
Browse files Browse the repository at this point in the history
fix: part of lint warnings
  • Loading branch information
alter-eggo authored Nov 11, 2024
2 parents ca1f61b + dd53c0f commit 140183e
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ export function PortfolioTableHeader({ currentSortingObj, setCurrentSortingObj,
<SortableHeader
align={index === 0 ? 'left' : 'right'}
isSorted={orderByItem.id === currentSortingObj.id}
key={index}
key={orderByItem.id}
label={orderByItem.title}
onSort={() => {
if (orderByItem.id === currentSortingObj.id) {
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/modules/vebal/lock/VebalLockProvider.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export function _useVebalLock() {
}
}

export function VebalLockProvider({ children }: PropsWithChildren & {}) {
export function VebalLockProvider({ children }: PropsWithChildren) {
const vebalLock = _useVebalLock()

return <VebalLockContext.Provider value={vebalLock}>{children}</VebalLockContext.Provider>
Expand Down
2 changes: 1 addition & 1 deletion packages/lib/modules/vebal/lock/form/VebalUnlockForm.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,6 @@ export function VebalUnlockForm() {
<TokenRowWithDetails
address={vebalBptToken.address as Address}
chain={GqlChain.Mainnet}
value={mainnetLockedInfo.lockedAmount ?? 0}
details={
lockDuration.lockedUntilDateFormatted
? [
Expand All @@ -107,6 +106,7 @@ export function VebalUnlockForm() {
]
: undefined
}
value={mainnetLockedInfo.lockedAmount ?? 0}
/>
</Card>
)}
Expand Down
1 change: 1 addition & 0 deletions packages/lib/modules/vebal/lock/modal/VebalLockModal.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -84,6 +84,7 @@ export function VebalLockModal({
isIncreasedLockAmount: isIncreasedLockAmount,
mainnetLockedInfo: mainnetLockedInfo,
})
/* eslint-disable-next-line react-hooks/exhaustive-deps */
}, [isOpen, userAddress])

const { transactionSteps, lockTxHash } = useBuildLockSteps(buildLockStepsArgs)
Expand Down
7 changes: 3 additions & 4 deletions packages/lib/modules/vebal/lock/steps/useLockStep.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -89,22 +89,21 @@ export function useLockStep({ lockAmount, lockEndDate, lockActionType }: UseLock

const transaction = getTransaction(lockActionType)

const isComplete = () => transaction?.result.isSuccess || false

const [isStepActivated, setIsStepActivated] = useState(false)

const lockStep: TransactionStep = useMemo(
() => ({
isStepActivated,
id: lockActionType,
stepType: lockActionType,
labels,
isComplete,
isComplete: () => transaction?.result.isSuccess || false,
onSuccess,
onActivated: () => setIsStepActivated(true),
onDeactivated: () => setIsStepActivated(false),
renderAction: () => <ManagedTransactionButton id={lockActionType.toString()} {...props} />,
}),
[lockActionType, labels, isComplete, onSuccess, props]
[lockActionType, labels, onSuccess, props, transaction, isStepActivated]
)

return lockStep
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import BigNumber from 'bignumber.js'
import { UseVebalLockInfoResult } from '../../vebal/useVebalLockInfo'
import { bn, fNum } from '@repo/lib/shared/utils/numbers'
import { useTheme as useNextTheme } from 'next-themes'
import { useVebalLockData } from '@repo/lib/modules/vebal/lock/VebalLockDataProvider'

type ChartValueAcc = [string, number][]

Expand Down
8 changes: 6 additions & 2 deletions packages/lib/shared/hooks/useAprTooltip.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,13 @@ prevents this loss (also called LVR), thereby increasing LP returns.`
export const extraBalTooltipText = `veBAL holders can get an extra boost of up to 2.5x on their staking yield.
The more veBAL held, the higher the boost.`

export const lockingIncentivesTooltipText = `The protocol revenue share for Liquidity Providers with 1-year locked Balancer ve8020 tokens.`
export const lockingIncentivesTooltipText = `The protocol revenue share for Liquidity Providers
with 1-year locked Balancer ve8020 tokens.`

export const votingIncentivesTooltipText = `Vote incentives are offered to veBAL holders who participate in weekly gauge voting by third parties on platforms like Hidden Hand. Your incentives are determined by your veBAL voting power compared to other voters. The listed APR represents an average rather than a guaranteed return for active participants.`
export const votingIncentivesTooltipText = `Vote incentives are offered to veBAL holders who
participate in weekly gauge voting by third parties on platforms like Hidden Hand.
Your incentives are determined by your veBAL voting power compared to other voters.
The listed APR represents an average rather than a guaranteed return for active participants.`

const stakingBalTooltipText = `The base APR all stakers in this pool get (determined by weekly gauge voting).
In addition, veBAL holders can get an extra boost of up to 2.5x.`
Expand Down

0 comments on commit 140183e

Please sign in to comment.