Commit 50da0ed
* chore(): implemented fee details on the donate component UI
* chore(): style property of warning box fixed
* chore(): added fee section on donor collective card alongside tooltips
* feat: integrate collective fees into DonorCollectiveCard component
- Added useCollectiveFees hook to fetch protocol and manager fees.
- Updated fee calculations and display in the DonorCollectiveCard.
- Enhanced tooltips to show dynamic fee information based on fetched data.
- Introduced calculateFeeAmounts and formatFlowRateToDaily utility functions for fee calculations.
* fix: improve error handling and fee display in DonorCollectiveCard
- Enhanced the useCollectiveFees hook to provide better error messages and handle loading states.
- Updated fee calculations in DonorCollectiveCard to account for error states and loading indicators.
- Added visual indicators for live fee usage and improved tooltip content for clarity.
- Refactored fee fetching logic to ensure fallback values are only used when necessary.
* fix: enhance error handling and fallback logic in useCollectiveFees hook
- Improved error handling for fetching protocol fees from UBI and DirectPayments factories.
- Added fallback values for protocol fees to ensure stability in case of RPC errors or factory failures.
- Enhanced logging for better debugging and visibility of fee retrieval processes.
* Revert "fix: enhance error handling and fallback logic in useCollectiveFees hook"
This reverts commit 9866d72.
* fix: update supportingLabel style in WalletCards component
- Removed the deprecated 'font' property and retained 'fontWeight' for better consistency in styling.
* fix: optimize fee calculation in formatFlowRateToDaily function
- Refactored the fee calculation logic to use a parsed float value for daily amounts, improving readability and consistency in the return format.
- Ensured that both G$ and USD amounts are calculated using the same parsed value for accuracy.
* fix: improve error handling in fee calculation functions
- Added try-catch blocks to handle invalid flowRate formats in calculateFeeAmounts and formatFlowRateToDaily functions.
- Ensured that fallback values are returned in case of errors, enhancing stability and user experience.
* feat: enhance DonateComponent to display dynamic fee information
- Integrated useCollectiveFees hook to fetch and display protocol and manager fees dynamically.
- Improved loading and error handling states for fee information, providing users with real-time updates.
- Updated the UI to reflect fetched fee values or fallback defaults, ensuring clarity in donation fee structures.
* refactor: remove debug logging from useCollectiveFees and GoodCollectiveSDK
* feat: integrate realtime stats into DonorCollectiveCard component
- Added useRealtimeStats hook to fetch live pool statistics for the donor collective.
- Updated fee calculation logic to consider realtime stats, enhancing accuracy in fee display.
- Improved the overall user experience by providing dynamic updates based on fetched statistics.
* feat: display accumulated fees in ViewCollective component
- Integrated useRealtimeStats hook to fetch and display accumulated fees for the collective.
- Updated UI to include a new RowItem for displaying total fees, enhancing user visibility of financial metrics.
- Improved fee calculation logic to utilize real-time statistics for accuracy in fee representation.
* feat: refactor useCollectiveFees to simplify fee retrieval logic
- Replaced manual fee calculation and network determination with a direct call to GoodCollectiveSDK's getCollectiveFees method.
- Improved error handling for unsupported networks and fee fetching, enhancing stability and user experience.
- Removed redundant code related to network name determination and pool type checks, streamlining the hook's functionality.
* refactor: remove useRealtimeStats from DonorCollectiveCard component
* refactor: update useCollectiveFees and useRealtimeStats to utilize provider for fee retrieval
- Replaced useEthersSigner with useEthersProvider to improve provider handling.
- Enhanced error handling for missing pool address and RPC provider availability.
- Streamlined dependency arrays in hooks for better performance and clarity.
* Apply suggestions from code review
* Update packages/app/src/components/DonateComponent.tsx
* Update packages/app/src/components/DonateComponent.tsx
* style: adjust zIndex and overflow properties in WalletCards component
* Update packages/app/src/components/DonateComponent.tsx
* fix: correct import statement and add fee documentation link in defaults
* style: remove zIndex from WalletCards styles and update zIndex logic for child components
---------
Co-authored-by: Emeka Manuel <[email protected]>
Co-authored-by: Lewis B <[email protected]>
1 parent 23b78c8 commit 50da0ed
File tree
13 files changed
+934
-76
lines changed- packages
- app/src
- components
- WalletCards
- hooks
- lib
- sdk-js
- scripts
- src/goodcollective
13 files changed
+934
-76
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
1 | 6 | | |
2 | 7 | | |
3 | | - | |
4 | | - | |
5 | 8 | | |
6 | | - | |
7 | | - | |
8 | | - | |
9 | 9 | | |
10 | | - | |
11 | | - | |
| 10 | + | |
| 11 | + | |
12 | 12 | | |
13 | | - | |
14 | 13 | | |
| 14 | + | |
15 | 15 | | |
16 | | - | |
17 | | - | |
| 16 | + | |
18 | 17 | | |
19 | | - | |
| 18 | + | |
20 | 19 | | |
21 | | - | |
22 | | - | |
23 | 20 | | |
24 | | - | |
25 | | - | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
26 | 27 | | |
27 | 28 | | |
| 29 | + | |
28 | 30 | | |
29 | 31 | | |
30 | 32 | | |
31 | | - | |
32 | | - | |
| 33 | + | |
33 | 34 | | |
34 | 35 | | |
35 | 36 | | |
| |||
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
43 | | - | |
| 44 | + | |
44 | 45 | | |
45 | 46 | | |
46 | 47 | | |
| |||
113 | 114 | | |
114 | 115 | | |
115 | 116 | | |
116 | | - | |
| 117 | + | |
117 | 118 | | |
118 | 119 | | |
119 | | - | |
120 | | - | |
| 120 | + | |
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
| |||
127 | 127 | | |
128 | 128 | | |
129 | 129 | | |
130 | | - | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
131 | 141 | | |
132 | 142 | | |
133 | 143 | | |
| |||
176 | 186 | | |
177 | 187 | | |
178 | 188 | | |
179 | | - | |
| 189 | + | |
| 190 | + | |
| 191 | + | |
| 192 | + | |
180 | 193 | | |
181 | 194 | | |
182 | 195 | | |
| |||
206 | 219 | | |
207 | 220 | | |
208 | 221 | | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
209 | 225 | | |
210 | 226 | | |
211 | 227 | | |
| |||
219 | 235 | | |
220 | 236 | | |
221 | 237 | | |
222 | | - | |
223 | 238 | | |
224 | 239 | | |
225 | 240 | | |
| |||
268 | 283 | | |
269 | 284 | | |
270 | 285 | | |
271 | | - | |
272 | 286 | | |
273 | 287 | | |
274 | 288 | | |
| |||
285 | 299 | | |
286 | 300 | | |
287 | 301 | | |
288 | | - | |
289 | 302 | | |
290 | 303 | | |
291 | 304 | | |
292 | 305 | | |
293 | 306 | | |
294 | 307 | | |
295 | | - | |
296 | | - | |
297 | 308 | | |
298 | 309 | | |
299 | 310 | | |
| |||
425 | 436 | | |
426 | 437 | | |
427 | 438 | | |
428 | | - | |
| 439 | + | |
| 440 | + | |
| 441 | + | |
| 442 | + | |
429 | 443 | | |
430 | 444 | | |
431 | 445 | | |
| |||
534 | 548 | | |
535 | 549 | | |
536 | 550 | | |
537 | | - | |
| 551 | + | |
538 | 552 | | |
539 | 553 | | |
540 | 554 | | |
| |||
551 | 565 | | |
552 | 566 | | |
553 | 567 | | |
554 | | - | |
| 568 | + | |
555 | 569 | | |
556 | 570 | | |
557 | 571 | | |
| |||
562 | 576 | | |
563 | 577 | | |
564 | 578 | | |
565 | | - | |
| 579 | + | |
566 | 580 | | |
567 | 581 | | |
568 | 582 | | |
569 | 583 | | |
570 | | - | |
| 584 | + | |
571 | 585 | | |
572 | | - | |
573 | | - | |
574 | | - | |
| 586 | + | |
| 587 | + | |
| 588 | + | |
| 589 | + | |
575 | 590 | | |
576 | 591 | | |
577 | 592 | | |
| |||
586 | 601 | | |
587 | 602 | | |
588 | 603 | | |
589 | | - | |
| 604 | + | |
590 | 605 | | |
591 | 606 | | |
592 | | - | |
| 607 | + | |
| 608 | + | |
| 609 | + | |
| 610 | + | |
| 611 | + | |
593 | 612 | | |
594 | 613 | | |
595 | 614 | | |
| |||
617 | 636 | | |
618 | 637 | | |
619 | 638 | | |
620 | | - | |
621 | | - | |
622 | | - | |
623 | | - | |
| 639 | + | |
| 640 | + | |
| 641 | + | |
| 642 | + | |
| 643 | + | |
| 644 | + | |
| 645 | + | |
| 646 | + | |
| 647 | + | |
| 648 | + | |
624 | 649 | | |
625 | | - | |
626 | | - | |
627 | | - | |
| 650 | + | |
| 651 | + | |
| 652 | + | |
| 653 | + | |
| 654 | + | |
628 | 655 | | |
629 | | - | |
630 | | - | |
631 | | - | |
632 | | - | |
| 656 | + | |
| 657 | + | |
| 658 | + | |
| 659 | + | |
| 660 | + | |
| 661 | + | |
| 662 | + | |
| 663 | + | |
| 664 | + | |
| 665 | + | |
| 666 | + | |
| 667 | + | |
| 668 | + | |
| 669 | + | |
| 670 | + | |
| 671 | + | |
| 672 | + | |
| 673 | + | |
| 674 | + | |
| 675 | + | |
| 676 | + | |
| 677 | + | |
| 678 | + | |
| 679 | + | |
| 680 | + | |
| 681 | + | |
| 682 | + | |
| 683 | + | |
| 684 | + | |
| 685 | + | |
| 686 | + | |
| 687 | + | |
| 688 | + | |
| 689 | + | |
| 690 | + | |
| 691 | + | |
| 692 | + | |
| 693 | + | |
| 694 | + | |
| 695 | + | |
633 | 696 | | |
634 | 697 | | |
635 | 698 | | |
| |||
670 | 733 | | |
671 | 734 | | |
672 | 735 | | |
673 | | - | |
| 736 | + | |
674 | 737 | | |
675 | 738 | | |
676 | 739 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| 40 | + | |
40 | 41 | | |
41 | 42 | | |
42 | 43 | | |
| |||
207 | 208 | | |
208 | 209 | | |
209 | 210 | | |
| 211 | + | |
210 | 212 | | |
211 | 213 | | |
212 | 214 | | |
213 | 215 | | |
214 | 216 | | |
215 | 217 | | |
216 | 218 | | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
217 | 225 | | |
218 | 226 | | |
219 | 227 | | |
| |||
302 | 310 | | |
303 | 311 | | |
304 | 312 | | |
| 313 | + | |
| 314 | + | |
| 315 | + | |
| 316 | + | |
| 317 | + | |
| 318 | + | |
| 319 | + | |
305 | 320 | | |
306 | 321 | | |
307 | 322 | | |
| |||
0 commit comments