[Build Tx/Smart Contract] Auto-fetch contract methods on valid contract id#2129
Conversation
Debounced effect fetches contract data as soon as a valid contract id is filled in, instead of requiring a button click. Replaces the mount-only auto-fetch and is gated on contract id validation. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
There was a problem hiding this comment.
Pull request overview
This PR updates the Soroban invoke-contract form control to automatically fetch contract metadata/methods once a valid contract ID is entered, replacing the previous mount-only auto-fetch behavior and reducing reliance on an explicit “Fetch contract methods” button click.
Changes:
- Replace mount-only auto-fetch with a debounced
useEffectthat triggers after the user finishes entering a valid contract ID. - Gate auto-fetch on contract ID validation to avoid fetching on incomplete/invalid IDs.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Preview is available here: |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 432a7c9ef0
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
|
Preview is available here: |
Debounced effect fetches contract data as soon as a valid contract id is filled in, instead of requiring a button click. Replaces the mount-only auto-fetch and is gated on contract id validation.