Skip to content

Created stable vars for hashmaps and tokenPk and changed name symbol and query methods#1

Merged
SuddenlyHazel merged 2 commits into
SuddenlyHazel:mainfrom
ALLiDoizCode:development
May 22, 2021
Merged

Created stable vars for hashmaps and tokenPk and changed name symbol and query methods#1
SuddenlyHazel merged 2 commits into
SuddenlyHazel:mainfrom
ALLiDoizCode:development

Conversation

@ALLiDoizCode

Copy link
Copy Markdown
Contributor

The HashMaps for owners, balances, tokenApprovals, operatorApprovals and tokenPk were not set as stable so those values would have been lost during a canister upgrade. I also changed the symbol and name functions to be query methods since they do not rely on consensus. I also changed operatorApprovals from a HashMap of HashMaps to a HashMap of arrays since HashMaps are compatible with stable vars.

@SuddenlyHazel SuddenlyHazel left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

🤯 - this is the communities now!

@SuddenlyHazel SuddenlyHazel merged commit 2502a67 into SuddenlyHazel:main May 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants