Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
β 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 correctsoroban_sdk
primitives, and eliminates local conflicts with theNFTError
enum by using the shared definition fromnft-core
. Additionally, it cleans up unused imports and fixes environment ownership issues.π Changes Made
NFTError
enum and replaced it with the centralized version fromnft_core
.soroban_sdk
(Env
,Address
,Vec
,Map
,String
,Symbol
, and macros#[contract]
,#[contractimpl]
,#[contracttype]
).Vec::from_array
andString::from_str
, ensuringenv
is cloned before being moved.NFTCore::mint_nft
call to include the missingbadge_metadata
argument.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:
recognition-system
module compiles without errors.π 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.