Conversation
Fixes #404 Co-authored-by: fr1jo <fr1jo@users.noreply.github.com>
…2-1928 Sow order form
✅ Deploy Preview for pintomoney ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
src/state/useBeanstalkGlobalStats.ts
Outdated
| address: protocolAddress, | ||
| abi: fieldGlobalAbi, | ||
| functionName: "totalPods", | ||
| args: [1n], // fieldId=1 for repayment field |
There was a problem hiding this comment.
Claude finished @fr1jo's task in 2m 2s —— View job
Completed
Tasks
- Read the file to understand what constant needs to be extracted
- Identify appropriate location for the constant
- Extract hardcoded value to constant
- Run linting and formatting
- Commit and push changes
Changes Made
- Added
BEANSTALK_REPAYMENT_FIELD_ID = 1nconstant at the top of the file with other constants - Replaced hardcoded
1non line 99 with the new constant - Committed and pushed to branch
feature/beanstalk-assets-route
The hardcoded field ID has been successfully extracted to a named constant for better maintainability.
Note: I was unable to run the linting tools due to permission restrictions, but the code change follows the existing patterns in the file. The PR author or reviewers should run yarn format-and-lint before merging.
--- | Latest commit
src/state/useBeanstalkGlobalStats.ts
Outdated
| const URBDV_DECIMALS = 6; | ||
| // Token decimals for Pinto (6 decimals) | ||
| // const PINTO_DECIMALS = 6; | ||
| // Token decimals for sprouts | ||
| const SPROUTS_DECIMALS = 6; |
There was a problem hiding this comment.
in constants file or if erc20s, create token instances in tokens.ts
There was a problem hiding this comment.
Claude finished @fr1jo's task in 1m 44s —— View job
Completed
Tasks
- Read the file to understand what needs to be extracted at line 74
- Identify the token addresses/constants to extract
- Determine appropriate location (tokens.ts vs constants file)
- Create internal token definitions for urBDV and Sprouts in internalTokens.ts
- Update useBeanstalkGlobalStats.ts to use the new token instances
- Commit and push changes
Changes Made
Created internal token definitions for urBDV and Sprouts in src/constants/internalTokens.ts:
- Added
URBDVtoken (Unripe BDV, 6 decimals) - Added
SPROUTStoken (Sprouts, 6 decimals)
Updated src/state/useBeanstalkGlobalStats.ts:
- Removed hardcoded
URBDV_DECIMALSandSPROUTS_DECIMALSconstants - Updated imports to include
URBDVandSPROUTSfrominternalTokens - Changed all
TokenValue.fromBlockchain()calls to useURBDV.decimalsandSPROUTS.decimalsinstead of hardcoded values
This follows the same pattern used for other internal tokens (PODS, STALK, SEEDS) and makes the code more maintainable.
Note: I was unable to run yarn format-and-lint due to permission restrictions. The PR author or reviewers should run this command before merging to ensure code formatting is consistent.
--- | Latest commit |
src/pages/Beanstalk.tsx
Outdated
| <a | ||
| href="https://docs.pinto.money/appendix/old-beanstalk-holders" | ||
| target="_blank" | ||
| rel="noopener noreferrer" | ||
| className="text-pinto-green-4 hover:underline" | ||
| > | ||
| Learn more |
There was a problem hiding this comment.
do we have a link component for this?
There was a problem hiding this comment.
Claude finished @fr1jo's task in 1m 31s —— View job
Completed
Tasks
- Read the Beanstalk.tsx file to see current implementation
- Search for existing link components in the codebase
- Replace plain anchor tag with Link component from react-router-dom
- Commit and push changes
Changes Made
- Added import for
Linkcomponent fromreact-router-dominsrc/pages/Beanstalk.tsx - Replaced the plain
<a>tag (lines 22-29) with<Link>component - Changed
hrefattribute totoattribute (the Link component's prop name) - Committed and pushed to branch
feature/beanstalk-assets-route
The external link to the Pinto documentation now uses the standard Link component from react-router-dom, which is the pattern used throughout the codebase for external links with target="_blank".
Note: I was unable to run yarn format-and-lint due to permission restrictions. The PR author or reviewers should run this command before merging to ensure code formatting is consistent.
--- | Latest commit |
Extract hardcoded field ID value (1n) to BEANSTALK_REPAYMENT_FIELD_ID constant for better code maintainability and readability. Co-authored-by: frijo <fr1jo@users.noreply.github.com> Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
Co-authored-by: frijo <fr1jo@users.noreply.github.com> Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
- Add URBDV and SPROUTS token definitions to internalTokens.ts - Remove hardcoded URBDV_DECIMALS and SPROUTS_DECIMALS constants - Update useBeanstalkGlobalStats to use token instances for decimals Co-authored-by: frijo <fr1jo@users.noreply.github.com>
No description provided.