api: return Disabled error code if Cardano is disabled
In the Bitcoin-only target, we should return Disabled, as with
Ethereum, instead of InvalidInput.
@@ -162,6 +162,8 @@ async fn process_api(request: &Request) -> Option<Result<Response, Error>> {
.await
.map(|r| Response::Cardano(pb::CardanoResponse { response: Some(r) })),
),
+ #[cfg(not(feature = "app-cardano"))]
+ Request::Cardano(_) => Some(Err(Error::Disabled)),
_ => None,
}
}
