-
Notifications
You must be signed in to change notification settings - Fork 59
Fix explorer not displaying unwrapped objects in transaction summary #9534
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
base: develop
Are you sure you want to change the base?
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
2 Skipped Deployments
|
Co-authored-by: Thoralf-M <46689931+Thoralf-M@users.noreply.github.com>
Co-authored-by: Thoralf-M <46689931+Thoralf-M@users.noreply.github.com>
Co-authored-by: Thoralf-M <46689931+Thoralf-M@users.noreply.github.com>
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.
This file is automatically generated, do not touch it
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.
Reverted in commit 55eb434. The Unwrapped variant has been added to the Rust ObjectChange enum instead, which will generate the TypeScript types when the generation script is run.
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.
Revert this file
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.
Reverted in commit 55eb434.
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.
@copilot the generated file should not be modified manually, instead the Rust part would need to be updated and then the /iota/scripts/generate_files/update_generated_files.sh script should be used to get the files updated
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.
Updated the Rust ObjectChange enum in commit 55eb434. The TypeScript types will be generated when the update_generated_files.sh script is run. The Rust code compiles successfully.
- Added Unwrapped variant to ObjectChange enum in iota-json-rpc-types - Updated all match statements to handle Unwrapped objects - Added WriteKind::Unwrap handling in object_changes.rs - Updated Display implementation for Unwrapped objects - Reverted manual changes to generated TypeScript files Co-authored-by: Thoralf-M <46689931+Thoralf-M@users.noreply.github.com>
Description of change
The explorer UI was not displaying unwrapped objects in transaction summaries, despite them being present in transaction effects and visible in CLI output. The root cause was missing type definitions in the Rust source code.
Changes:
Unwrappedvariant toObjectChangeenum incrates/iota-json-rpc-types/src/object_changes.rswith fields matching the pattern ofCreatedobjects (digest, objectId, objectType, owner, sender, version)object_id(),object_ref(),mask_for_test(), Display trait) to handle Unwrapped variantWriteKind::Unwraphandling incrates/iota-json-rpc/src/object_changes.rsto create Unwrapped ObjectChange instancestype: 'wrapped'totype: 'unwrapped'with proper owner and digest fieldsunwrappedtoIotaObjectChangeTypesandObjectChangeSummaryscripts/generate_files/update_generated_files.shLinks to any relevant issues
Fixes issue where transactions like this one show unwrapped objects in CLI but not in explorer.
How the change has been tested
Release Notes
Original prompt
This section details on the original issue you should resolve
<issue_title>Explorer doesn't show unwrapped objects in the transaction summary</issue_title>
<issue_description>## Bug description
A transaction like https://explorer.iota.org/txblock/6nQ7pwn2vwU296AnrNAkgRZsnht4gTcrTnFKfPVer1y4?network=testnet that unwraps an object from another one, doesn't show the unwrapped object in the balance changes, making it unclear what happened.
Here are the transaction details from the CLI where the missing object is listed in
Unwrapped Objects: