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

fix: get next asset id issue #11213

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
Open

fix: get next asset id issue #11213

wants to merge 4 commits into from

Conversation

ap211unitech
Copy link
Contributor

@ap211unitech ap211unitech commented Jan 19, 2025

📝 Description

When creating a new asset, the Asset ID field should default to the next possible asset_id which is basically last_created_asset_id + 1

Screenshot from 2024-10-04 12-46-08

🤔 Previous behavior

The current UI makes it seem that any asset id would work, but after a runtime upgrade it is required that newly created asset id's follow a specific rule: the newly created asset's id should be the next possible id of the last created asset.

In other terms, next_asset_id = previous_asset_id + 1

  • What is the motivation for changing the behavior?

Without this change, users will face this error:

Screenshot from 2024-10-04 12-48-33

🚀 Current behavior

image

✅ Tasks

  • Fix findOpenId method to calculate default asset id
  • For Asset Hub, Next asset id is prev asset id + 1

@ap211unitech ap211unitech self-assigned this Jan 19, 2025
@ap211unitech ap211unitech marked this pull request as ready for review January 21, 2025 08:27
@ap211unitech ap211unitech requested a review from TarikGul January 21, 2025 08:33
@ap211unitech ap211unitech linked an issue Jan 21, 2025 that may be closed by this pull request
7 tasks
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.

Validation for asset id when creating a new asset on AssetHub
1 participant