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 fee position adding when updating fees #2089

Merged
merged 2 commits into from
Apr 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion centrifuge-app/src/components/PoolFees/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@
percentOfNav: feeChainData?.amounts?.percentOfNav,
pendingFees: feeChainData?.amounts.pending,
receivingAddress: feeChainData?.destination,
feePosition: feeMetadata?.feePosition,
feePosition: feeMetadata?.feePosition || 'Top of waterfall',
action:
(isAllowedToCharge || poolAdmin) && !fixedFee ? (
<RouterLinkButton
Expand Down Expand Up @@ -223,7 +223,7 @@
}

return activeFees
}, [poolMetadata, pool, poolId, changes, applyNewFee])

Check warning on line 226 in centrifuge-app/src/components/PoolFees/index.tsx

View workflow job for this annotation

GitHub Actions / build-app

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

Check warning on line 226 in centrifuge-app/src/components/PoolFees/index.tsx

View workflow job for this annotation

GitHub Actions / ff-prod / build-app

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

React.useEffect(() => {
if (drawer === 'edit') {
Expand Down
3 changes: 1 addition & 2 deletions centrifuge-js/src/modules/pools.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3611,10 +3611,9 @@ export function getPoolsModule(inst: Centrifuge) {
}) || []),
...add.map((metadata, index) => {
return {
// chain refactor required: feeId needs to be assigned to fee when it's proposed
// until then multiple fees have to be added at once or all pending fees have to be applied before adding more
id: parseInt(lastFeeId.toHuman() as string) + index + 1,
name: metadata.fee.name,
feePosition: metadata.fee.feePosition,
}
}),
],
Expand Down
Loading