Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix withdraw batch #2535

Merged
merged 3 commits into from
Nov 8, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
fix withdraw
onnovisser committed Nov 8, 2024

Verified

This commit was signed with the committer’s verified signature.
onnovisser Onno Visser
commit a1f94fb4d1b737fd30cec2ad02f00c9701d907ad
5 changes: 2 additions & 3 deletions centrifuge-app/src/pages/Loan/FinanceForm.tsx
Original file line number Diff line number Diff line change
@@ -577,12 +577,11 @@ export function useWithdraw(poolId: string, borrower: CombinedSubstrateAccount,
amount={amount}
/>
),
isValid: (_: { values: Pick<FinanceValues, 'withdraw'> }) => {
isValid: () => {
const withdrawalAddresses = Object.values(selectedAddressIndexByCurrency).filter((index) => index !== -1)
return source === 'reserve' ? amount.lte(totalAvailable) && !!withdrawalAddresses.length : true
},
getBatch: ({ values }: { values: Pick<FinanceValues, 'withdraw'> }) => {
if (!values.withdraw) return of([])
getBatch: () => {
const withdrawalAddresses = Object.values(selectedAddressIndexByCurrency).filter((index) => index !== -1)
if (!withdrawalAddresses.length) return of([])
return combineLatest(

Unchanged files with check annotations Beta

}
})
.reverse()
}, [isTinlakePool, metaData?.tranches, tinlakeKey, tranches])

Check warning on line 202 in centrifuge-app/src/components/PoolCard/index.tsx

GitHub Actions / build-app

React Hook useMemo has missing dependencies: 'createdAt' and 'poolId'. Either include them or remove the dependency array

Check warning on line 202 in centrifuge-app/src/components/PoolCard/index.tsx

GitHub Actions / ff-prod / build-app

React Hook useMemo has missing dependencies: 'createdAt' and 'poolId'. Either include them or remove the dependency array
return (
<RouterTextLink to={`${poolId}`} style={{ textDecoration: 'none' }}>
isTarget: getTarget(tranche),
}
})
}, [trancheTokens, getTarget])

Check warning on line 148 in centrifuge-app/src/components/PoolOverview/TrancheTokenCards.tsx

GitHub Actions / build-app

React Hook useMemo has missing dependencies: 'daysSinceCreation', 'isTinlakePool', and 'poolId'. Either include them or remove the dependency array

Check warning on line 148 in centrifuge-app/src/components/PoolOverview/TrancheTokenCards.tsx

GitHub Actions / ff-prod / build-app

React Hook useMemo has missing dependencies: 'daysSinceCreation', 'isTinlakePool', and 'poolId'. Either include them or remove the dependency array
return (
<Shelf gap={3}>