Summary
reinstate (lib.rs:467-489) unconditionally sets verified=true/revoked=false and emits address_reinstated for any registered profile, regardless of whether that profile was ever revoked:
pub fn reinstate(env: Env, address: Address) -> bool {
... admin auth ...
let mut profile: Profile = ...
profile.set_verified(true);
profile.set_revoked(false);
env.storage().persistent().set(&key, &profile);
...
events::address_reinstated(&env, &address);
...
true
}
There is no check equivalent to the one in revoke (which no-ops when !profile.verified()). Calling reinstate on a never-verified (Pending) profile silently performs the same state change as verify_profile(address, true), but emits the semantically wrong address_reinstated event instead of profile_verified, misleading any off-chain indexer that treats address_reinstated as "this address was previously revoked, now un-revoked."
Current Behavior
reinstate can be used as an undocumented alternate path to verify a Pending profile, emitting a misleading event. No test exercises this path — all existing reinstate tests first go through register -> verify -> revoke -> reinstate.
Expected Behavior
Either restrict reinstate to only operate on profiles where profile.revoked() is true (panicking or no-op-ing otherwise, similar to revoke's idempotency guard), or explicitly document that reinstate is a general-purpose "set verified" alias for verify_profile(address, true).
Acceptance Criteria
Tech Stack
Rust, Soroban SDK, contracts/registry/src/lib.rs
Summary
reinstate(lib.rs:467-489) unconditionally setsverified=true/revoked=falseand emitsaddress_reinstatedfor any registered profile, regardless of whether that profile was ever revoked:There is no check equivalent to the one in
revoke(which no-ops when!profile.verified()). Callingreinstateon a never-verified (Pending) profile silently performs the same state change asverify_profile(address, true), but emits the semantically wrongaddress_reinstatedevent instead ofprofile_verified, misleading any off-chain indexer that treatsaddress_reinstatedas "this address was previously revoked, now un-revoked."Current Behavior
reinstatecan be used as an undocumented alternate path to verify aPendingprofile, emitting a misleading event. No test exercises this path — all existingreinstatetests first go throughregister -> verify -> revoke -> reinstate.Expected Behavior
Either restrict
reinstateto only operate on profiles whereprofile.revoked()is true (panicking or no-op-ing otherwise, similar torevoke's idempotency guard), or explicitly document thatreinstateis a general-purpose "set verified" alias forverify_profile(address, true).Acceptance Criteria
reinstateon a non-revoked profilereinstatecalled on aPending(never-revoked) profileTech Stack
Rust, Soroban SDK, contracts/registry/src/lib.rs