Skip to content

Conversation

@Itshyphen
Copy link

Description

Commit Message

fix: asset manager storage migration

see the guidelines for commit messages.

Changelog Entry

version: <log entry>

Checklist

  • I have performed a self-review of my own code
  • I have documented my code in accordance with the documentation guidelines
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • I have run the unit tests
  • I only have one commit (if not, squash them into one commit).
  • I have a descriptive commit message that adheres to the commit message guidelines
  • I have added version bump label on PR.

Please review the CONTRIBUTING.md file for detailed contributing guidelines.

@Itshyphen Itshyphen added the enhancement New feature or request label Nov 13, 2024
@Itshyphen Itshyphen self-assigned this Nov 13, 2024
states::read_icon_asset_manager(&env),
states::read_upgrade_authority(&env),
)
}
Copy link
Collaborator

Choose a reason for hiding this comment

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

since we are splitting storage items , its better to have separate getter methods as well. reading all storage item just to get one is unnecessary . separate getters would be more readable as well. If we may need entire config object , return type still can be 'config' struct. makes it more readable and type safe.

Copy link
Author

Choose a reason for hiding this comment

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

yeah returned using struct

states::read_current_limit(&env, token_address),
))
}

Copy link
Collaborator

Choose a reason for hiding this comment

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

same here . its so unintuitive to return tuple of primitive types. Lets wrap the values in struct before returning so that caller knows which value is what. or it should only return current_limit.

Copy link
Author

Choose a reason for hiding this comment

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

made change!

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants