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

Add IsNativeDenom() function to DenomTrace #3187

Closed
3 tasks
colin-axner opened this issue Feb 22, 2023 · 1 comment · Fixed by #3019
Closed
3 tasks

Add IsNativeDenom() function to DenomTrace #3187

colin-axner opened this issue Feb 22, 2023 · 1 comment · Fixed by #3019
Assignees
Labels
type: code hygiene Clean up code but without changing functionality or interfaces

Comments

@colin-axner
Copy link
Contributor

Summary

Add the function:

// IsNativeDenom returns true if the denomination is native, thus containing no trace history. 
func (dt DenomTrace) IsNativeDenom() bool {
    return dt.Path == "" 
}
        

Problem Definition

We need to check if the path is empty to determine if it is native. This is less readable then the proposed function.


For Admin Use

  • Not duplicate issue
  • Appropriate labels applied
  • Appropriate contributors tagged/assigned
@colin-axner colin-axner added the type: code hygiene Clean up code but without changing functionality or interfaces label Feb 22, 2023
@crodriguezvega
Copy link
Contributor

I will add it as part of #3019.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: code hygiene Clean up code but without changing functionality or interfaces
Projects
Status: Done 🥳
Development

Successfully merging a pull request may close this issue.

2 participants