The getOrderDetailsString
function is designed to provide accurate order status information to users and front-end applications
The function contains redundant and conflicting status assignment logic that overwrites initial status determinations, leading to inconsistent and confusing status messages
Likelihood: High
Every call to getOrderDetailsString
executes this redundant logic
The function is likely called frequently by front-end applications and users
The logic flow is guaranteed to produce the overwritten result
Impact: Low
Users and applications receive inconsistent status information
Debugging and maintenance become more difficult due to redundant code
Potential confusion about actual order states
Code maintainability issues but no direct financial impact
Benefits of Mitigation:
Eliminates redundancy - Single, clear status determination logic
Improves readability - Easier to understand and maintain
Reduces gas costs - Fewer unnecessary operations
Consistent behavior - Same status results with cleaner code
Better maintainability - Future status changes only need to be made in one place
The contest is live. Earn rewards by submitting a finding.
This is your time to appeal against judgements on your submissions.
Appeals are being carefully reviewed by our judges.