Skip to content

Commit

Permalink
resolve todo!()s
Browse files Browse the repository at this point in the history
Signed-off-by: onur-ozkan <[email protected]>
  • Loading branch information
onur-ozkan committed Jan 2, 2025
1 parent 61b1654 commit 8d59f4d
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions mm2src/coins/rpc_command/tendermint/staking.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,9 +57,8 @@ impl HttpStatusCode for ValidatorsRPCError {
match self {
ValidatorsRPCError::Transport(_) => StatusCode::SERVICE_UNAVAILABLE,
ValidatorsRPCError::InternalError(_) => StatusCode::INTERNAL_SERVER_ERROR,
ValidatorsRPCError::UnexpectedCoinType { .. } | ValidatorsRPCError::CoinNotFound { .. } => {
StatusCode::BAD_REQUEST
},
ValidatorsRPCError::CoinNotFound { .. } => StatusCode::NOT_FOUND,
ValidatorsRPCError::UnexpectedCoinType { .. } => StatusCode::BAD_REQUEST,
}
}
}
Expand Down Expand Up @@ -89,8 +88,8 @@ pub async fn validators_rpc(ctx: MmArc, req: ValidatorsRPC) -> ValidatorsRPCResu
.validators_list(req.filter_by_status, req.paging)
.await?
},
Ok(_) => todo!(),
Err(_) => todo!(),
Ok(_) => return MmError::err(ValidatorsRPCError::UnexpectedCoinType { ticker: req.coin }),
Err(_) => return MmError::err(ValidatorsRPCError::UnexpectedCoinType { ticker: req.coin }),
};

let validators_json = validators
Expand Down

0 comments on commit 8d59f4d

Please sign in to comment.