Conversation
Fixes #404 Co-authored-by: fr1jo <fr1jo@users.noreply.github.com>
…2-1928 Sow order form
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>
✅ Deploy Preview for pintomoney ready!
To edit notification comments on pull requests, go to your Netlify project configuration. |
Refactor repayment logic to use event scanning for fertilizer IDs and direct contract interactions for urBDV and bsFERT transfers. This update also improves the UI with dynamic pod line grouping, detailed earned balance displays, and comprehensive batch transfer support.
| async function fetchFertilizerIds(publicClient: PublicClient): Promise<bigint[]> { | ||
| const uniqueIds = new Set<bigint>(); | ||
|
|
||
| // Scan TransferSingle events | ||
| const singleLogs = await publicClient.getLogs({ | ||
| address: BARN_PAYBACK, | ||
| event: transferSingleEvent, | ||
| fromBlock: "earliest", | ||
| toBlock: "latest", | ||
| }); | ||
|
|
||
| for (const log of singleLogs) { | ||
| if (log.args.id !== undefined) { | ||
| uniqueIds.add(log.args.id); | ||
| } | ||
| } | ||
|
|
||
| // Scan TransferBatch events | ||
| const batchLogs = await publicClient.getLogs({ | ||
| address: BARN_PAYBACK, | ||
| event: transferBatchEvent, | ||
| fromBlock: "earliest", | ||
| toBlock: "latest", | ||
| }); | ||
|
|
||
| for (const log of batchLogs) { | ||
| if (log.args.ids) { | ||
| for (const id of log.args.ids) { | ||
| uniqueIds.add(id); | ||
| } | ||
| } | ||
| } | ||
|
|
||
| return Array.from(uniqueIds).sort((a, b) => (a < b ? -1 : a > b ? 1 : 0)); | ||
| } |
There was a problem hiding this comment.
is there no way to use the sg for this? fetching this many logs seems inefficient.
Also, can you explain what is going on in this sorting? hard to know at first glance
There was a problem hiding this comment.
or at least a deployment block, you are querying way too many blocks
There was a problem hiding this comment.
It actually makes sorted bigints
|
@claude in |
|
Claude finished @fr1jo's task in 50s —— View job Updated "My Pods In Line" text color
Changed
The default |
Co-authored-by: frijo <fr1jo@users.noreply.github.com>
|
@claude Update the text color hierarchy across the dashboard: Primary values (token amounts, balances): keep #111827 (near-black), semibold |
|
Claude finished @fr1jo's task in 2m 17s —— View job Updated text color hierarchy in Beanstalk dashboard
Changes made:
Already correct (no changes needed):
Files changed:
|
- Section headers (My Beanstalk Silo/Pods/Fertilizer): text-pinto-light -> text-pinto-gray-6 (#6E6E6E, approx #6B7280) - Axis labels (pod line numbers): text-pinto-gray-4 -> text-pinto-gray-2 (#D9D9D9, approx #D1D5DB) - Disabled/unavailable actions already use disabled:text-pinto-gray-4 (#9C9C9C) - Secondary text (Earned, Fertilized labels) already use text-pinto-light (#9C9C9C) Co-authored-by: frijo <fr1jo@users.noreply.github.com>
This pull request introduces a new "Beanstalk" page and related UI components, along with several improvements and bug fixes to existing components. The most significant changes are the addition of reusable stat and fertilizer card components, enhancements to the PodLineGraph for better visualization, and improvements to input handling and navigation. These updates improve the modularity, usability, and flexibility of the UI.
New Beanstalk Page and Components:
/beanstalkwith corresponding navigation links in both desktop and mobile navbars, and imported the newBeanstalkpage component into the protected layout. [1] [2] [3] [4] [5]BeanstalkStatField, a reusable stat field component for displaying titles, values, and optional action buttons, to be used in Beanstalk-related stats cards.FertilizerCardcomponent for displaying fertilizer items with selection and input controls.PodLineGraph Visualization Improvements:
PodLineGraphto allow customharvestableIndexandpodIndexprops, and improved plot grouping and axis label intervals to scale dynamically with large pod lines for better visualization. [1] [2] [3] [4] [5]Input and UI Enhancements:
ComboInputFieldto support hiding the USD value, better handle custom max amounts when base balance is zero, and show custom max amounts in the balance display if applicable. [1] [2] [3] [4] [5]Buttoncomponent'shoverTextPrimarystyle to ensure correct disabled state appearance.PintoAssetTransferNoticewith a checkbox for recipient address acknowledgment, improving user safety.Other Changes:
BONUS_MULTIPLIERconstant inSowOrderV0Fieldsfrom 0.1 to 0.05.