refactor: rename Token and UserToken #1110
Merged
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Motivation
In PR #1100 we discussed the fact that using
UserToken
andCustomToken
was confusing. This was the result of the fact that the original custom token for user for ERC20 which exists on mainnet are calledToken
and the related functions are calledadd_user_token
.To clean-up and make this more comprehensive, this PR rename the various structs.
Token
->UserToken
(ERC20, already in prod and relates toadd_user_token
which won't change)UserToken
->CustomToken
(new custom token type we have recently added)CustomToken
->Token
(the token enum that contains either ICRC token or future other tokens)Notes
After this PR, I'll provide a PR that renames the new functions that are not yet live on mainnet (
set_user_custom_token
->set_custom_token
).This PR does not update the did file on purpose to narrow the number of changes in the PR. I'll provide a separate PR here as well for tracability reason.