Description
The VaultError impl block contains many const aliases (NegativeMin, ShareConversionOverflow, SharesOverflow, etc.) that all map to InvalidStrategy. These are legacy aliases kept for backward compatibility but obscure the actual error code in production.
Current State
- Multiple error constants map to the same underlying error code
- Makes debugging difficult in production
- Obscures the true error condition
Expected Behavior
- Remove deprecated aliases or map them to distinct error codes
- Update documentation to reflect current error code mapping
- Consider if any aliases should be promoted to distinct codes
Files Affected
neurowealth-vault/contracts/vault/src/lib.rs
Description
The
VaultErrorimpl block contains many const aliases (NegativeMin,ShareConversionOverflow,SharesOverflow, etc.) that all map toInvalidStrategy. These are legacy aliases kept for backward compatibility but obscure the actual error code in production.Current State
Expected Behavior
Files Affected
neurowealth-vault/contracts/vault/src/lib.rs