BootNodeDev / dAppBooster

A modern blockchain boilerplate built to quickly get you started with your next project.
https://dappbooster.dev
MIT License
5 stars 1 forks source link

refactor: tokenInput #260

Closed nicosampler closed 3 months ago

nicosampler commented 3 months ago

The current implementation had a problem that didn't allow setting the value from outside the BigNumberInput component. Trying to understand how to solve this issue, I realized that it was possible to get rid of the internal states and simplify the logic of the components a bit.

Also, I've changed what the resulting amount variable was returning, before it was a decimal string, and now it is a bigint.

I hope no to bring any side effects with this refactor.

vercel[bot] commented 3 months ago

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

Name Status Preview Updated (UTC)
dappbooster ✅ Ready (Inspect) Visit Preview Sep 1, 2024 9:22pm
fernandomg commented 3 months ago

@nicosampler, the useTokenSelect must be in a separate file as it's being used from outside the component

nicosampler commented 3 months ago

@nicosampler, the useTokenSelect must be in a separate file as it's being used from outside the component

Damn! you are right! I had it separated and then I rolled it back, I didn't think about the tree-shaking.