-
Notifications
You must be signed in to change notification settings - Fork 39
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(dpp): invalid imports and tests #2459
Conversation
WalkthroughThe pull request refactors several import paths from the old Changes
Possibly related PRs
Suggested labels
Suggested reviewers
Poem
📜 Recent review detailsConfiguration used: CodeRabbit UI 📒 Files selected for processing (1)
⏰ Context from checks skipped due to timeout of 90000ms (5)
🔇 Additional comments (2)
✨ Finishing Touches
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration 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.
Actionable comments posted: 0
🧹 Nitpick comments (1)
packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/mod.rs (1)
1-8
: Remove commented-out code.These commented-out module declarations and exports are no longer needed and should be removed to maintain code cleanliness.
-mod document_create_transition; -// mod document_delete_transition; -// mod document_replace_transition; - -// pub use document_create_transition::*; -// pub use document_delete_transition::*; -// pub use document_replace_transition::*; +mod document_create_transition;
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_create_transition.rs
(2 hunks)packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_delete_transition.rs
(2 hunks)packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_replace_transition.rs
(2 hunks)packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/mod.rs
(4 hunks)
⏰ Context from checks skipped due to timeout of 90000ms (8)
- GitHub Check: Rust packages (wasm-dpp) / Unused dependencies
- GitHub Check: Rust packages (wasm-dpp) / Tests
- GitHub Check: Rust packages (wasm-dpp) / Linting
- GitHub Check: Rust packages (wasm-dpp) / Formatting
- GitHub Check: Build Docker images (Drive, drive, drive-abci) / Build Drive image
- GitHub Check: Build Docker images (DAPI, dapi, dapi) / Build DAPI image
- GitHub Check: Build Docker images (Dashmate helper, dashmate-helper, dashmate-helper) / Build Dashmate helper image
- GitHub Check: Build JS packages / Build JS
🔇 Additional comments (6)
packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_delete_transition.rs (1)
1-3
: LGTM! Import path changes look good.The import path changes from
documents_batch_transition
tobatch_transition
are consistent with the PR objectives and maintain the same functionality.Also applies to: 13-15
packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/mod.rs (2)
21-25
: LGTM! Import path changes look good.The new imports for document transition types are consistent with the PR objectives and maintain the same functionality.
65-68
: LGTM! Match arm changes improve readability.Using underscores for unused parameters in match arms improves code readability and follows Rust best practices.
packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_replace_transition.rs (1)
6-8
: LGTM! Import changes enhance module capabilities.The new imports for data contract and document type accessors, along with the updated import path for
DocumentTransitionActionType
, improve the module's interaction capabilities while maintaining consistency with the PR objectives.Also applies to: 13-14, 34-34
packages/wasm-dpp/src/document/state_transition/batch_transition/document_transition/document_create_transition.rs (2)
7-10
: LGTM! Import changes look good.The updated import paths and new imports for document transition types are consistent with the PR objectives.
93-95
: LGTM! Method changes are safe.The changes to
get_identity_contract_nonce
andset_identity_contract_nonce
methods are safe:
- Removing the
u64
cast is safe as the underlying type is alreadyu64
.- Removing the return type annotation is safe as it's the default return type in Rust.
Also applies to: 98-104
Issue being fixed or feature implemented
Invalid imports in WASM DPP prevent it from compiling
What was done?
How Has This Been Tested?
Running tests
Breaking Changes
None
Checklist:
For repository code-owners and collaborators only
Summary by CodeRabbit
DocumentsBatchTransition
toBatchTransition
in test cases for consistency with updated terminology.