Skip to content

fix(registry): document asset_type matching, fix double-deactivation, add tests - #325

Merged
valoryyaa-byte merged 1 commit into
RWA-ToolKit:mainfrom
MJigah:fix/issues-298-301
Aug 31, 2026
Merged

fix(registry): document asset_type matching, fix double-deactivation, add tests#325
valoryyaa-byte merged 1 commit into
RWA-ToolKit:mainfrom
MJigah:fix/issues-298-301

Conversation

@MJigah

@MJigah MJigah commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Summary

Fixes four issues in the registry contract:

Changes

contracts/registry/src/lib.rs

  • Added doc comment to validate_asset_type explaining case/whitespace sensitivity
  • Modified deactivate_asset to return early if asset is already inactive (before writing entry or emitting event)

contracts/registry/src/test.rs

  • Added test_get_admin_before_init_panics_not_initialized (matching compliance pattern)
  • Added test_get_all_assets_pagination_edge_cases covering start_id=0, limit=0, and boundary conditions
  • Added test_deactivate_already_inactive_asset_is_noop to verify idempotency

Closes #301
Closes #300
Closes #299
Closes #298

… add tests

- Document validate_asset_type is case- and whitespace-sensitive (RWA-ToolKit#301)
- Fix deactivate_asset to skip event/write when already inactive (RWA-ToolKit#298)
- Add test for get_admin before initialization panics NotInitialized (RWA-ToolKit#299)
- Add tests for get_all_assets pagination edge cases (start_id=0, limit=0, past counter) (RWA-ToolKit#300)

Closes RWA-ToolKit#301
Closes RWA-ToolKit#300
Closes RWA-ToolKit#299
Closes RWA-ToolKit#298
@drips-wave

drips-wave Bot commented Aug 31, 2026

Copy link
Copy Markdown

@MJigah Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits.

You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀

Learn more about application limits

@valoryyaa-byte
valoryyaa-byte merged commit 93a4b00 into RWA-ToolKit:main Aug 31, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

2 participants