Skip to content

TokenVault::initialize re-init panics with NotAuthorized instead of AlreadyInitialized #341

Description

@Jaydbrown

contracts/token-vault/src/lib.rs initialize: if get_owner(&env).is_some() { panic_with_error!(&env, Error::NotAuthorized); }. Every other contract in the workspace (stream, factory, governor, oracle) uses an AlreadyInitialized error for this. TokenVault::Error doesn't even define AlreadyInitialized. Add it and use it, so callers get a correct error code.


Filed from a codebase review pass.

Metadata

Metadata

Assignees

Labels

Stellar WaveIssues in the Stellar wave program

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions