Skip to content

Conversation

@fr1jo
Copy link
Contributor

@fr1jo fr1jo commented Jan 22, 2026

No description provided.

@netlify
Copy link

netlify bot commented Jan 22, 2026

Deploy Preview for pintomoney ready!

Name Link
🔨 Latest commit ad3a946
🔍 Latest deploy log https://app.netlify.com/projects/pintomoney/deploys/697b8f9e7012c50008c91b6a
😎 Deploy Preview https://deploy-preview-406.preview.pinto.money
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify project configuration.

@fr1jo fr1jo changed the base branch from main to development January 28, 2026 20:42
…ersion

This comprehensive update introduces batch operations across the marketplace
and silo systems, replacing individual farm() calls with optimized batch
functions for improved gas efficiency and user experience.

Marketplace Batch Operations:
- Add batch create/fill/cancel functions for pod listings and orders
- Implement batchCreatePodListing, batchFillPodListing encoders with tests
- Implement batchCreatePodOrder, batchFillPodOrder encoders
- Add batchCancelPodListing and batchCancelPodOrder functionality
- Update Market.tsx with expanded 6-tab structure
- Create MyListingsTable and MyOrdersTable components
- Add bulk selection and cancellation UI with checkbox columns
- Implement single and batch cancel flows with analytics tracking

Silo Batch Conversion:
- Add ConvertBatchFacetABI with batchConvert function
- Implement batchConvert encoder with BatchConvertParams interface
- Replace individual convert() calls with batchConvert in deposit combine
- Update encodeGroupCombineCalls to use batchConvert
- Add comprehensive documentation for convert flow

UI/UX Improvements:
- Replace cancel dialogs with immediate cancellation flow
- Add Select All functionality to listing/order tables
- Implement My Listings and My Orders sub-tabs under My Activity
- Add GraphQL queries for user's own listings and orders
- Improve button styling and interaction patterns
- Add warning UI for unowned listings in batch operations

Testing & Documentation:
- Add unit tests for batchCreatePodListing encoder
- Add unit tests for batchFillPodListing encoder
- Document createSmartGroups and encodeGroupCombineCalls functions
- Document farm() usage patterns and replacement strategies
- Add comprehensive inline documentation for new functions

Co-Authored-By: Claude Sonnet 4.5 <[email protected]>
@fr1jo fr1jo force-pushed the feat/frijo/batching-marketplace-convert branch from 37ac9b5 to fe71f61 Compare January 28, 2026 21:08
const args = orders.map((o) => ({
orderer: o.orderer,
fieldId: o.fieldId,
pricePerPod: Number(o.pricePerPod.toBigInt()), // uint24 expects number, not bigint
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit. Can do o.pricePerPod.toNumber()

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claude please fix

Copy link
Contributor

@github-actions github-actions bot Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude finished @fr1jo's task in 56s —— View job


Fix applied ✓

  • Read the current implementation in batchCancelPodOrder.ts
  • Apply the fix to use .toNumber() method
  • Commit and push changes

Changed line 24 from Number(o.pricePerPod.toBigInt()) to o.pricePerPod.toNumber() as suggested. This is cleaner and more idiomatic.

Note: I wasn't able to run yarn format-and-lint due to permission restrictions, but the change is straightforward and should not cause any formatting issues. You may want to run the linting command locally if needed.

--- | View commit

}
}, [queryClient, allPodListings, allMarket, farmerMarket, onSelectionChange]);

const { writeWithEstimateGas, submitting } = useTransaction({
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

useTransaction also has some other exports like setSubmitting, and confirming. Need to setSubmitting(true) and false manually in the submit handler. Otherwise button will appear as clickable

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claude please fix

Copy link
Contributor

@github-actions github-actions bot Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude finished @fr1jo's task in 1m 34s —— View job


Fix applied ✓

  • Read the current implementation in batchCancelPodOrder.ts
  • Apply the fix to use .toNumber() method
  • Commit changes locally

Issue with pushing changes

I've successfully applied the fix to use o.pricePerPod.toNumber() instead of Number(o.pricePerPod.toBigInt()) in src/encoders/batchCancelPodOrder.ts:24. The change has been committed locally.

However, I'm encountering permission issues with git operations (fetch, pull, and push require approval). The commit is ready but couldn't be pushed to the remote branch.

The fix made:

// Before:
pricePerPod: Number(o.pricePerPod.toBigInt()),

// After:
pricePerPod: o.pricePerPod.toNumber(),

This is cleaner and more idiomatic since TokenValue has a dedicated toNumber() method that converts the value to a number directly.

Next steps: A user with appropriate permissions will need to either:

  1. Grant approval for git operations and I can retry pushing
  2. Manually pull and push the local commit

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claude please fix useTransaction also has some other exports like setSubmitting, and confirming. Need to setSubmitting(true) and false manually in the submit handler. Otherwise button will appear as clickable

Copy link
Contributor

@github-actions github-actions bot Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude finished @fr1jo's task in 1m 34s —— View job


Fix completed ✓

  • Read MyListingsTable.tsx to understand current implementation
  • Check MyOrdersTable.tsx to see the pattern already applied
  • Update MyListingsTable.tsx to properly use setSubmitting
  • Commit changes
  • Push to remote branch

Changes Made

I've fixed the useTransaction usage in MyListingsTable.tsx to properly manage button state during submission:

Changes:

  1. Destructured setSubmitting from the useTransaction hook (line 71)
  2. Added setSubmitting(true) at the start of handleCancelImmediate (line 86)
  3. Added setSubmitting(false) in the finally block of handleCancelImmediate (line 102)
  4. Added setSubmitting(true) at the start of handleBulkCancelImmediate (line 127)
  5. Added setSubmitting(false) in the finally block of handleBulkCancelImmediate (line 148)
  6. Updated dependency arrays to include setSubmitting

This ensures the cancel buttons will be properly disabled during transaction submission and re-enabled afterward, preventing multiple clicks.

Commit: fc0bc3d7 - "fix(market): use setSubmitting in MyListingsTable submit handlers"

Note: I was unable to run yarn format-and-lint due to permission restrictions. You may want to run this command locally to ensure the code follows the project's formatting standards.


| View commit

Comment on lines 69 to 73
const { writeWithEstimateGas, submitting } = useTransaction({
successMessage: "Order(s) cancelled successfully",
errorMessage: "Failed to cancel order(s)",
successCallback: onCancelSuccess,
});
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same here

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claude please fix. useTransaction also has some other exports like setSubmitting, and confirming. Need to setSubmitting(true) and false manually in the submit handler. Otherwise button will appear as clickable

Copy link
Contributor

@github-actions github-actions bot Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude finished @fr1jo's task in 2m 15s —— View job


Fix completed

  • Read the current implementation in MyOrdersTable.tsx
  • Update the submit handler to use setSubmitting properly
  • Commit changes locally

Changes Made

I've fixed the useTransaction usage in MyOrdersTable.tsx to properly manage button state during submission:

Changes:

  1. Destructured setSubmitting from the useTransaction hook (line 69)
  2. Added setSubmitting(true) at the start of handleCancelImmediate (line 83)
  3. Added setSubmitting(false) in the finally block of handleCancelImmediate (line 113)
  4. Added setSubmitting(true) at the start of handleBulkCancelImmediate (line 139)
  5. Added setSubmitting(false) in the finally block of handleBulkCancelImmediate (line 164)
  6. Updated dependency arrays to include setSubmitting

This ensures the cancel buttons will be properly disabled during transaction submission and re-enabled afterward, preventing multiple clicks.

Commit: c809716c - "fix(market): use setSubmitting in MyOrdersTable submit handlers"

Note: I was unable to push to the remote branch as there appears to be concurrent work happening. The changes are committed locally at commit c809716c. You may need to manually fetch and rebase/merge these changes, or another agent may have already pushed similar fixes.


Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@claude please fix. useTransaction also has some other exports like setSubmitting, and confirming. Need to setSubmitting(true) and false manually in the submit handler. Otherwise button will appear as clickable

Copy link
Contributor

@github-actions github-actions bot Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Claude finished @fr1jo's task in 1m 50s —— View job


Fix completed ✓

  • Read MyOrdersTable.tsx to check current implementation
  • Read MyListingsTable.tsx to see the correct pattern
  • Apply setSubmitting pattern to MyOrdersTable.tsx
  • Commit and push changes

Changes Applied

Updated MyOrdersTable.tsx to properly manage button state during transaction submission:

Changes made:

  1. Line 69: Destructured setSubmitting from useTransaction hook
  2. Line 83: Added setSubmitting(true) at start of handleCancelImmediate
  3. Line 113: Added setSubmitting(false) in finally block of handleCancelImmediate
  4. Line 121: Updated dependency array to include setSubmitting
  5. Line 139: Added setSubmitting(true) at start of handleBulkCancelImmediate
  6. Line 164-165: Added finally block with setSubmitting(false) for handleBulkCancelImmediate
  7. Line 167: Updated dependency array to include setSubmitting

This ensures the cancel buttons are properly disabled during transaction submission and re-enabled afterward, preventing multiple clicks.

Commit: ad3a946a - "fix(market): use setSubmitting in MyOrdersTable submit handlers"

Note: I was unable to run yarn format-and-lint due to permission restrictions. The changes follow the exact same pattern already applied in MyListingsTable.tsx, so formatting should be consistent. You may want to run the linting command locally if needed.


| View commit

github-actions bot and others added 3 commits January 29, 2026 15:49
Use toNumber() method directly instead of Number(toBigInt())

Co-authored-by: fr1jo <[email protected]>
Properly manage button state during transaction submission to prevent
multiple clicks by using setSubmitting from useTransaction hook.

Co-authored-by: fr1jo <[email protected]>
Properly manage button state during transaction submission by:
- Destructuring setSubmitting from useTransaction
- Calling setSubmitting(true) at start of submit handlers
- Calling setSubmitting(false) in finally blocks
- Updating dependency arrays to include setSubmitting

This prevents buttons from being clickable during transaction processing.

Co-authored-by: fr1jo <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants