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

refactor: seperate denom amount getters #439

Merged
merged 5 commits into from
Sep 25, 2023

Conversation

dib542
Copy link
Collaborator

@dib542 dib542 commented Sep 25, 2023

this PR separates out
getAmountInDenom into

  • general: getDenomAmount
  • getBaseDenomAmount
  • getDisplayDenomAmount

This also allow us to add more helpful specific hooks
useBankBigBalance becomes:

  • useBankBalanceBaseAmount
  • useBankBalanceDisplayAmount

for specific use cases of a user's bank denom balance

    - also ensures a Coin denom in usage is always paired with a Token
      because the denom amount by itself is relatively useless without
      the context of its matched Token
    - reduces the usage of the balance amounts in Coin.denom units
      (which can be confusing) by providing helper hook functions
      to look up token base and display amounts
@dib542 dib542 merged commit 5fe9fc1 into main Sep 25, 2023
@dib542 dib542 deleted the 430-fix-ibc-token-usage-for-all-actions-part-2a branch September 25, 2023 23:54
@dib542 dib542 linked an issue Sep 25, 2023 that may be closed by this pull request
dib542 pushed a commit that referenced this pull request Sep 26, 2023
## [0.3.16](v0.3.15...v0.3.16) (2023-09-26)

### Fixes

* ensure IBC tokens are referenced correctly ([#440](#440)) ([d6f7a67](d6f7a67))

### Other

* avoid static token list lookups ([#437](#437)) ([e6a30d0](e6a30d0))
* seperate denom amount getters ([#439](#439)) ([5fe9fc1](5fe9fc1))
@dib542
Copy link
Collaborator Author

dib542 commented Sep 26, 2023

🎉 This PR is included in version 0.3.16 🎉

The release is available on GitHub release

Your semantic-release bot 📦🚀

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

Successfully merging this pull request may close these issues.

Fix: IBC token usage for all actions
1 participant