-
Notifications
You must be signed in to change notification settings - Fork 2
docs: Add useBalance and useEtherInput hooks #69
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
1 Skipped Deployment
|
rin-st
left a comment
There was a problem hiding this 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`. | |
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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
|
Sorry for the delay @rin-st. Everything should be addressed, let me know if you see anything else! 🙌 |
rin-st
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lgtm, thanks!
Adds docs for
useEtherInputanduseBalancehooksChanges:
If any live example feels off or you’d prefer a different showcase, happy to tweak 🙏