https://github.com/code-423n4/2024-08-axelar-network/blob/69c4f2c3fcefb1b8eb2129af9c3685a44ae5b6fe/axelar-amplifier/contracts/axelarnet-gateway/src/contract.rs#L133-L145
The use of .then(Ok) at the end of the query function seems redundant because the function already returns a Result type due to the use of the ? operator in the preceding lines.
QA - code improvements, which is because this redundancy does not introduce a functional bug but clutters the code and can lead to confusion about the functions error handling logic. It suggests an unnecessary transformation of the result, which is not required since the functions operations already ensure a Result type is returned.
The .then(Ok) method is unnecessary and can be removed without altering the functions behavior. The function signature ensures a Result<Binary, axelar_wasm_std::error::ContractError> return type, and the ? operator already handles error propagation correctly. So consider simplifying the function by removing .then(Ok) to make the code cleaner and more readable.
