-
Notifications
You must be signed in to change notification settings - Fork 199
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
Token type in altered accounts #6220
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## rc/v1.7.next1 #6220 +/- ##
=================================================
- Coverage 78.79% 78.79% -0.01%
=================================================
Files 753 753
Lines 98848 98848
=================================================
- Hits 77887 77886 -1
Misses 15719 15719
- Partials 5242 5243 +1 ☔ View full report in Codecov by Sentry. |
@@ -223,6 +223,7 @@ func (aap *alteredAccountsProvider) addTokensDataForMarkedAccount( | |||
Nonce: nonce, | |||
Properties: hex.EncodeToString(esdtToken.Properties), | |||
MetaData: aap.convertMetaData(esdtToken.TokenMetaData), | |||
Type: getTokenType(esdtToken.Type, nonce), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can we have some unit tests for sft, nft, metaesdt types?
@@ -236,6 +237,16 @@ func (aap *alteredAccountsProvider) addTokensDataForMarkedAccount( | |||
return nil | |||
} | |||
|
|||
func getTokenType(tokenType uint32, tokenNonce uint64) string { | |||
isNotFungible := tokenNonce != 0 | |||
tokenTypeNotSet := isNotFungible && core.ESDTType(tokenType) == core.Fungible |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
default old token here is core.NonFungible
# Conflicts: # go.sum
Reasoning behind the pull request
Proposed changes
Testing procedure
Pre-requisites
Based on the Contributing Guidelines the PR author and the reviewers must check the following requirements are met:
feat
branch created?feat
branch merging, do all satellite projects have a proper tag insidego.mod
?