Skip to content

fix: mint-cleanup #35

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

KevinMB0220
Copy link

@KevinMB0220 KevinMB0220 commented May 4, 2025

βœ… Pull Request: Refactor and Fixes for reputation-system Module

πŸ“‹ Description

This PR addresses and resolves multiple compilation errors and reference issues in the reputation-system module. It removes duplicate or invalid imports, aligns all types with the correct soroban_sdk primitives, and eliminates local conflicts with the NFTError enum by using the shared definition from nft-core. Additionally, it cleans up unused imports and fixes environment ownership issues.

πŸ›  Changes Made

  • βœ… Removed the local NFTError enum and replaced it with the centralized version from nft_core.
  • βœ… Fixed all missing imports from soroban_sdk (Env, Address, Vec, Map, String, Symbol, and macros #[contract], #[contractimpl], #[contracttype]).
  • βœ… Resolved incorrect usage of Vec::from_array and String::from_str, ensuring env is cloned before being moved.
  • βœ… Updated the NFTCore::mint_nft call to include the missing badge_metadata argument.
  • βœ… Cleaned up unused use statements to reduce warnings and improve clarity.

πŸ“Έ Evidence

πŸ”§ Before:

  • ❌ cargo build failed with over 40 type and macro resolution errors.
  • ❌ NFTError was duplicated and conflicting across modules.
  • ❌ env was moved early, causing borrow issues.

βœ… After:

  • βœ”οΈ The recognition-system module compiles without errors.
  • βœ”οΈ Type mismatches, visibility problems, and ownership issues have been resolved.
  • βœ”οΈ The code is now clean, consistent, and easier to maintain.

πŸ”— Related Issue

This pull request closes #25 β€œRefactor recognition-system module to fix types and compilation errors.”


Grabacion.de.pantalla.2025-05-03.181341.mp4

Thank you for reviewing this PR. Feedback is appreciated to further improve the system.

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.

NFT Minting Logic: Cleanup & Finalization
1 participant