Skip to content

Conversation

@Pabl0cks
Copy link
Contributor

@Pabl0cks Pabl0cks commented Nov 7, 2025

Adds docs for useEtherInput and useBalance hooks

Changes:

  • Added docs for useBalance and useEtherInput hooks, tried to follow similar patterns from existing hook docs
  • Added hooks nav entries
  • Updated introduction (index) to include both hooks, just in case we don't delete this page

If any live example feels off or you’d prefer a different showcase, happy to tweak 🙏

@vercel
Copy link

vercel bot commented Nov 7, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Preview Comments Updated (UTC)
scaffold-ui-docs Ready Ready Preview Comment Nov 20, 2025 8:34pm
1 Skipped Deployment
Project Deployment Preview Comments Updated (UTC)
scaffold-ui-example Skipped Skipped Nov 20, 2025 8:34pm

@vercel vercel bot temporarily deployed to Preview – scaffold-ui-example November 7, 2025 10:11 Inactive
@Pabl0cks Pabl0cks marked this pull request as ready for review November 7, 2025 10:17
Copy link
Member

@rin-st rin-st left a comment

Choose a reason for hiding this comment

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

Thank you Pablo!

Added some comments


| Parameter | Type | Default | Description |
| --------- | --------- | ------- | ---------------------------------------------------------------- |
| `value` | `string` | - | The current input value. Interpreted as ETH when `usdMode` is `false`, USD when `true`. |
Copy link
Member

Choose a reason for hiding this comment

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

Currently, we allow to pass any string like "asdf". We shouldn't allow it or at least handle it properly. Created an issue #71

const [usdMode] = useState(true);
const { valueInEth, valueInUsd, isNativeCurrencyPriceError } = useEtherInput({ value, usdMode });

if (isNativeCurrencyPriceError) {
Copy link
Member

Choose a reason for hiding this comment

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

Again, not sure how to make it work here. I think let's keep it as is for now

@Pabl0cks
Copy link
Contributor Author

Sorry for the delay @rin-st. Everything should be addressed, let me know if you see anything else! 🙌

Copy link
Member

@rin-st rin-st left a comment

Choose a reason for hiding this comment

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

Lgtm, thanks!

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