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

fix: conversion for values #155

Merged

Conversation

itsacoyote
Copy link
Contributor

What 💻

Create a function that defines the token decimals for conversion between bigNumber and decimals.

The bridge withdraw and bridge deposit were missing the token decimals for the transaction call. This will fix both commands.

Why ✋

Define one time at the beginning the token decimals for the conversion functions will avoid forgetting to use the decimals when converting tokens that may not use the default 18 decimals like ETH does.

Added tests for sanity checks.

@itsacoyote itsacoyote requested a review from a team as a code owner July 26, 2024 16:50
@itsacoyote itsacoyote force-pushed the itsacoyote-devrl-806-deposit-and-withdraw-amount-formatting branch from f5bdd51 to b712d53 Compare July 26, 2024 18:01
Copy link
Member

@JackHamer09 JackHamer09 left a comment

Choose a reason for hiding this comment

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

Cool! Code looks good! Should we add tests to the CI tho?

@itsacoyote
Copy link
Contributor Author

Cool! Code looks good! Should we add tests to the CI tho?

@JackHamer09 Yeah I'd like to setup CI for testing but might consider that in another PR to focus on. This is just a tiny single test to make sure I didn't break anything with the new changes. I'll do another PR to properly set up a testing environment for the project later.

@itsacoyote itsacoyote requested a review from JackHamer09 July 29, 2024 14:45
@itsacoyote itsacoyote merged commit c5ba110 into main Jul 30, 2024
3 checks passed
@itsacoyote itsacoyote deleted the itsacoyote-devrl-806-deposit-and-withdraw-amount-formatting branch July 30, 2024 12:58
Copy link

🎉 This PR is included in version 1.8.3 🎉

The release is available on:

Your semantic-release bot 📦🚀

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants