-
-
Notifications
You must be signed in to change notification settings - Fork 1
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
Development #3
Merged
Merged
Development #3
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…ks and components - Added Aave contract to externalContracts.ts for retrieving required data for the Assets to supply table - Created hook 'useReserveData' to fetch and list data using Aave's UiPoolDataProviderV3 contract - Developed 'AssetsToSupply' component to display the table of assets fetched from the contract - Created hook 'useBalanceOf' to calculate Wallet Balance and extract balance data
- Fixed issues causing console errors in the AssetsToSupply component - Ensured smooth data retrieval and display from Aave's UiPoolDataProviderV3 contract - Improved stability and performance of the AssetsToSupply table display
…anagement - Created ABI file to store Aave contract ABI. - Implemented config.ts for managing addresses across multiple locations without manual copy-pasting.
…acts, and added useBalanceOf2 hook - Implemented useAccount hook to retrieve the connected account address. - Renamed useReserveData hook to useReadContracts for clarity and consistency. - Added useBalanceOf2 hook to fetch asset balances based on the connected account.
- Removed previous 'useBalanceOf' hook, leaving only one main hook for implementation in the 'AssetsToSupply' component - Converted data according to the current user's wallet address and the Aave contract - Created 'WalletBalance' component to display the wallet balance in the 'AssetsToSupply' table.
…y component - Implemented a check in the AssetsToSupply component to show all assets when true - When false, only displays assets with a Wallet Balance greater than 0.
… a button Added functionality to show/hide the AssetsToSupply table on the main page using a button.
- Adjusted AssetsToSupply to display the check only after the table data has been fetched.
…ult in useReserveData hook - Define type to describe the expected structure of the contract read result. - Use type assertion to ensure is treated as . - Update state management and error handling in the hook. - Ensure fetched reserve data is correctly extracted and logged.
- Added getUserReservesData function to the useReserveData hook to fetch and log user reserve data. - Updated useEffect in useReserveData to handle the result of getUserReservesData. - Modified AssetsToSupply component to utilize the updated useReserveData hook and log fetched user reserve data.
…d YourSupplies component - Created 'useAllowance' hook to fetch the available asset allowance for the user based on their wallet. - Developed 'Allowance' component using 'useAllowance' to transform and display the allowance data in 18 ETH format. - Created 'YourSupplies' component based on 'AssetsToSupply' to show all available user assets using 'useAllowance' hook to accurately display data per the user's wallet.
…ata display - Refactored YourSupplies component to correctly display data extracted from the contract. - Implemented useAllowance hook to show the correct balance of assets. - Ensured only assets with a balance greater than 0 are displayed.
…Supply components - Modified table styles for YourSupplies and AssetsToSupply components. - Added appropriate padding for table rows to improve layout and readability.
…I updates - Refactored useReadContracts hook to extract data from useReserveData and useUserReserveData, creating a combined array with necessary data for YourSupplies component. - Refactored YourSupplies and AssetsToSupply components from tables to divs for better handling of elements with balance equal to 0. - Replaced '0x' with Address type from 'viem' for standardizing address attribute typing. - Created CollateralToggle component and useWriteContract hook to implement setUserUseReserveAsCollateral function in the toggle component. - Added a new external contract (pool) with its ABI for write function implementation.
…collateral transaction handling - Created CollateralModalStatus component to confirm or decline transactions when changing collateral status of an asset in YourSupplies component. - Display success or error messages based on the user's wallet transaction outcome. - Refactored CollateralToggle component to work correctly with the new modal. - Fixed the export of Pool ABI for correct implementation in useWriteContract hook.
- Created a new modal component 'SupplyTransactionModal' for handling 'Supply' transactions. - Implemented a new hook to be used with the 'SupplyTransactionModal' component. - Renamed the file from 'useWriteContracts' to 'useSetUserUseReserveAsCollateral.ts' for clearer and more specific hook naming.
…er modularity - Separated the 'useReadContracts' hook into 'useGetReserveData' and 'useGetUserReserveData' hooks. - Implemented 'useGetReserveData' in the AssetsToSupply component. - Implemented 'useGetUserReserveData' in the YourSupplies component.
- Added styles for colors, borders, status, tables, modals, and inputs. - Applied these classes to modal and table components to standardize the design.
…ansactionModal Ensured that the modal state is reset when closing the SupplyTransactionModal to prevent persistent error messages upon reopening.
…atus and SupplyTransactionModal Added a check icon for 'copy error' functionality in CollateralModalStatus and SupplyTransactionModal components when an error occurs.
- Created the WithdrawTransactionModal component. - Implemented the useWithdraw hook for handling the withdraw functionality within the YourSupplies component.
Created the AssetsToBorrow component to display data according to Aave's original design.
Changed 'Allowance' column to 'Balance' using useBalanceOf hook instead of useAllowance in YourSupplies component.
Fixed balance retrieval in YourSupplies component by using the correct asset attribute 'aTokenAddress' with the useBalanceOf hook.
…w component Added formatting for availableLiquidity attribute in AssetsToBorrow component according to the decimals attribute.
…y in AssetsToSupply component
…utes and styles based on YourSupplies - Implemented the YourBorrows component to display data with proper attributes. - Styled the component similarly to YourSupplies.
…r broader context usage Updated component name from WalletBalance to BalanceOf to reflect its use in multiple contexts beyond just wallet balance.
- Updated YourBorrows component to properly show data when available. - Added a message 'Nothing borrowed yet' for scenarios with no borrowed assets using the useBalanceOf hook.
- Updated YourSupplies component to properly show data when available. - Added a message 'Nothing supplied yet' for scenarios with no borrowed assets using the useBalanceOf hook.
…ndling and conditional rendering - Refactored useBalanceOf hook to handle decimals dynamically based on the asset instead of a fixed value. - Updated and removed styles in YourBorrows component to correctly show or hide the table. - Refactored YourSupplies component to hide AssetsToBorrow on the main page if balances are zero, preventing borrowing without supplies.
…page with static attributes - Integrated ProfileStats component into the main page. - Set attributes Net worth, Net APY, and Health factor as static values.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
No description provided.