Skip to content

Commit

Permalink
Fix allowance check for Tinlake invest/redeem (#2556)
Browse files Browse the repository at this point in the history
  • Loading branch information
onnovisser authored Dec 16, 2024
1 parent 69c844f commit 6f9b38b
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 6f9b38b

Please sign in to comment.