Skip to content

Commit

Permalink
fix allowance check
Browse files Browse the repository at this point in the history
  • Loading branch information
onnovisser committed Dec 16, 2024
1 parent 69c844f commit 4ed2153
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -131,8 +131,8 @@ export function InvestRedeemTinlakeProvider({ poolId, trancheId, children }: Pro
? 'invest'
: null,
needsToCollectBeforeOrder: !collectAmount.isZero(),
needsPoolCurrencyApproval: () => !!trancheInvestment?.poolCurrencyAllowance.isZero(),
needsTrancheTokenApproval: () => !!trancheInvestment?.tokenAllowance.isZero(),
needsPoolCurrencyApproval: (amount) => Dec(amount).gt(trancheInvestment?.poolCurrencyAllowance ?? 0),
needsTrancheTokenApproval: (amount) => Dec(amount).gt(trancheInvestment?.tokenAllowance ?? 0),
canChangeOrder: true,
canCancelOrder: true,
pendingAction,
Expand Down

0 comments on commit 4ed2153

Please sign in to comment.