Skip to content

Conversation

@feyyazcigim
Copy link
Contributor

This pull request introduces improvements and bug fixes to the Tractor order modification and referral code handling workflows, as well as some UI and state management enhancements. The most significant changes include stricter referral code validation (preventing users from entering their own code), improved synchronization and display of referral codes in order modification dialogs, and more robust cache invalidation for Tractor-related queries.

Referral code validation and synchronization:

  • The useReferralCode hook now prevents users from entering their own wallet address as a referral code, clears invalid or self-owned codes from localStorage, and ensures real-time validation and cleanup when the wallet connects. [1] [2]
  • The referral code is now included in the Tractor order form state and is properly synchronized and displayed in the order modification dialog, with changes surfaced in the review diff. [1] [2] [3] [4] [5] [6] [7] [8] [9]

UI/UX improvements:

  • The referral code popover now anchors to the dialog content for better positioning, and the referral code entry button's click event is improved to prevent event bubbling. [1] [2] [3]
  • The Tractor order modification dialog header layout is adjusted for better alignment.
  • The empty orders table now uses a more generic tractor type for improved clarity.

Order modification and diff logic:

  • The order diff logic now includes referral code changes and handles string diffs more robustly, displaying "N/A" for missing values. [1] [2]

Query/cache management:

  • Tractor-related queries are now consistently invalidated using a shared query key after order modification or cancellation, ensuring UI data is always up-to-date. [1] [2] [3] [4] [5]

Additional bug fixes:

  • The sow action now includes a final soil availability check before submitting, preventing transactions if no soil is available. [1] [2]

Update the useReferralCode hook to ensure the decoded referral address
does not match the active wallet. The hook now invalidates self-referrals
and automatically clears them from local storage on connection.
Updates the sow component to validate soil availability before
submission and reflects this state in the ui. The action button now
displays a specific error message and is disabled when soil is zero.
Implement referral code diffing in the review dialog and refine comparison logic for order parameters. Optimize tractor query invalidation after transactions and fix event propagation and portal issues in the sow order form.
@feyyazcigim feyyazcigim requested a review from fr1jo January 20, 2026 15:11
@netlify
Copy link

netlify bot commented Jan 20, 2026

Deploy Preview for pintomoney ready!

Name Link
🔨 Latest commit 597e634
🔍 Latest deploy log https://app.netlify.com/projects/pintomoney/deploys/697001bd77bbad00087a0d89
😎 Deploy Preview https://deploy-preview-400.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.

@feyyazcigim feyyazcigim changed the title Hotfix/order flow fixes hotfix: order flow fixes Jan 20, 2026
@fr1jo
Copy link
Contributor

fr1jo commented Jan 20, 2026

lgtm

@feyyazcigim feyyazcigim merged commit 037b37f into main Jan 20, 2026
6 checks passed
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