Skip to content
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

feat: send utils #1875

Merged
merged 7 commits into from
Jan 24, 2025
Merged

feat: send utils #1875

merged 7 commits into from
Jan 24, 2025

Conversation

brendan-defi
Copy link
Contributor

@brendan-defi brendan-defi commented Jan 24, 2025

What changed? Why?
Added / updated utilities and hooks to be used by Send component, including:

  • getAddress — added chain check and fixed issue with basename resolver
  • getName — minor refactor for hygiene
  • isEns — basic test to see if an input could be an ENS name
  • truncateDecimalPlaces — rounds and truncates numbers / strings
  • getValidatedAddress — returns a valid EVM address from a basename, ens, or address input
  • useExchangeRate — uses getSwapQuote to get an exchange rate for a token against USDC, handles state updates
  • useAmountInput — refactored from FundCard, handles crypto/fiat value input changes

Notes to reviewers

How has it been tested?

Copy link

vercel bot commented Jan 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
onchainkit-coverage ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2025 7:15pm
onchainkit-playground ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2025 7:15pm
onchainkit-routes ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 24, 2025 7:15pm

dschlabach
dschlabach previously approved these changes Jan 24, 2025
@brendan-defi brendan-defi merged commit 92f2364 into main Jan 24, 2025
16 checks passed
@brendan-defi brendan-defi deleted the feat/send-utils branch January 24, 2025 20:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Development

Successfully merging this pull request may close these issues.

4 participants