Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion lib/sanbase/alerts/evaluator/scheduler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -378,7 +378,7 @@ defmodule Sanbase.Alert.Scheduler do
# Update all triggered_at regardless if the send to the channel succeed
# because the alert will be stored in the timeline events.
# Keep count of the total alerts triggered and the number of alerts
# that were not sent succesfully. Reasons can be:
# that were not sent successfully. Reasons can be:
# - missing email/telegram linked when such channel is chosen;
# - webhook failed to be sent;
# - daily alerts limit is reached;
Expand Down
2 changes: 1 addition & 1 deletion lib/sanbase/dashboards/dashboards.ex
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ defmodule Sanbase.Dashboards do
end

defp get_dashboard_queries_with_mapping_id(dashboard_id) do
# Get the queries for the dashboard and add the the mapping id
# Get the queries for the dashboard and add the mapping id
# as dashboard_query_mapping_id Query virtual field
DashboardQueryMapping.dashboard_id_rows(dashboard_id)
|> Repo.all()
Expand Down
2 changes: 1 addition & 1 deletion lib/sanbase/discord_bot/command_handler.ex
Original file line number Diff line number Diff line change
Expand Up @@ -607,7 +607,7 @@ defmodule Sanbase.DiscordBot.CommandHandler do
end

def generic_error_message(interaction) do
content = "An errror occured. Please try again"
content = "An error occurred. Please try again"
Utils.edit_interaction_response(interaction, content, [])
end

Expand Down
4 changes: 2 additions & 2 deletions lib/sanbase/event_bus/event_emitter.ex
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ defmodule Sanbase.EventBus.EventEmitter do

@doc ~s"""
Emit an event built from the provided arguments.
If no error, occured, the first argument is returned as-is, so the function
If no error occurred, the first argument is returned as-is, so the function
can be used inside pipelines.
If changeset param is passed in the args it emits event only if there are actual
changes in the changeset.
Expand All @@ -58,7 +58,7 @@ defmodule Sanbase.EventBus.EventEmitter do
arg
end

# In test enviroment, if the test ends before the subscribers successfully
# In test environment, if the test ends before the subscribers successfully
# handled the event, there will be errors.
@wait_count 5
case Application.compile_env(:sanbase, :env) do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ defmodule Sanbase.ExternalServices.Coinmarketcap.TickerFetcher do
def work(opts \\ []) do
Logger.info("[CMC] Fetching realtime data from coinmarketcap")
# Fetch current coinmarketcap data for many tickers
# It fetches data for the the first N projects, where N is specified in
# It fetches data for the first N projects, where N is specified in
# the COINMARKETCAP_API_PROJECTS_NUMBER env var
tickers =
case Ticker.fetch_data(opts) do
Expand Down
2 changes: 1 addition & 1 deletion lib/sanbase/menu/menus.ex
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ defmodule Sanbase.Menus do

Each item has a `position`. If no position is specified, it will be appended at the end.
If a position is specified, all the positions bigger than it will be bumped by 1 in order
to accomodate the new item.
to accommodate the new item.
"""
@spec create_menu_item(create_menu_item_params, user_id) ::
{:ok, Menu.t()} | {:error, String.t()}
Expand Down
2 changes: 1 addition & 1 deletion lib/sanbase/metric/metric.ex
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ defmodule Sanbase.Metric do
hard_deprecate_after = Map.get(Helper.deprecated_metrics_map(), metric)

# The metric is deprecated if `hard_deprecate_after` is nil
# or if the the date is in the future
# or if the date is in the future
case hard_deprecate_after do
nil ->
false
Expand Down
2 changes: 1 addition & 1 deletion lib/sanbase/queries/authorization.ex
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ defmodule Sanbase.Queries.Authorization do

%{queries_executed_hour: count}
when count >= query_executions_limit.hour ->
{:error, "The user with id #{user_id} has executed more queries than allowed in a hour."}
{:error, "The user with id #{user_id} has executed more queries than allowed in an hour."}

%{queries_executed_day: count}
when count >= query_executions_limit.day ->
Expand Down
4 changes: 2 additions & 2 deletions lib/sanbase/signal/signal.ex
Original file line number Diff line number Diff line change
Expand Up @@ -135,10 +135,10 @@ defmodule Sanbase.Signal do
for every signal are returned without combining them with the data of other signals.

If the `signals` argument has the atom value :all, then all available signals
that occured in the given from-to interval are returned.
that occurred in the given from-to interval are returned.

If the `signals` arguments has a list of signals as a value, then all of those
signals that occured in the given from-to interval are returned.
signals that occurred in the given from-to interval are returned.
"""
@spec raw_data(signals, raw_signals_selector, datetime, datetime) :: Type.raw_data_result()
def raw_data(signals, selector, from, to) do
Expand Down
2 changes: 1 addition & 1 deletion lib/sanbase/transfers/eth_transfers.ex
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ defmodule Sanbase.Transfers.EthTransfers do
@doc ~s"""
Return the biggest transfers for a list of wallets and time period.

The `type` argument control wheteher only incoming, outgoing or all transactions
The `type` argument controls whether only incoming, outgoing or all transactions
are included.
"""
@spec top_wallet_transfers(
Expand Down
6 changes: 3 additions & 3 deletions lib/sanbase/utils/math.ex
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ defmodule Sanbase.Math do
def round_float(i) when is_integer(i), do: round(i * 1.0)

@doc ~s"""
Calculate the % change that occured between the first and the second arguments
Calculate the % change that occurred between the first and the second arguments

## Examples

Expand Down Expand Up @@ -203,7 +203,7 @@ defmodule Sanbase.Math do
mean = Enum.sum(values) / length(values)

# In case the precision is not provided, round the according
# to some predfined rules (use more precision for smaller numbers)
# to some predefined rules (use more precision for smaller numbers)
case Keyword.get(opts, :precision) do
nil -> mean |> round_float()
precision -> Float.round(mean, precision)
Expand Down Expand Up @@ -313,7 +313,7 @@ defmodule Sanbase.Math do
@doc ~s"""
Compute the Z score over the list of numbers. Returns error if the
numbers have standard deviation of 0 as Z score is computed only on
data with a probablistic distribution (not all numbers are equal)
data with a probabilistic distribution (not all numbers are equal)

## Examples
iex> Sanbase.Math.zscore([1,2,3,4,5,6,7,8,9,10])
Expand Down
2 changes: 1 addition & 1 deletion lib/sanbase_web/controllers/telegram_controller.ex
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ defmodule SanbaseWeb.TelegramController do
~s"""
🤖Beep boop, Santiment Alerts bot here!

You've succesfully connected your Sanbase and Telegram accounts.
You've successfully connected your Sanbase and Telegram accounts.

To receive alerts in this chat, enable the Telegram channel in an alert settings.

Expand Down
2 changes: 1 addition & 1 deletion lib/sanbase_web/endpoint.ex
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ defmodule SanbaseWeb.Endpoint do
parsers: [:urlencoded, :multipart, :json, Absinthe.Plug.Parser],
pass: ["*/*"],
json_decoder: Jason,
# To accomodate bigger files for reports uploaded via admin panel
# To accommodate bigger files for reports uploaded via admin panel
# The file store is configured to allow bigger files for the admin pod
# and lower for the web pod
length: parser_length
Expand Down
2 changes: 1 addition & 1 deletion lib/sanbase_web/graphql/absinthe_before_send.ex
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,7 @@ defmodule SanbaseWeb.Graphql.AbsintheBeforeSend do
{Inflex.camelize(alias, :lower), tuple}
end)

# Rename aliases to the query name itself, or in case of getMetric and getSignal -- the the whole tuple.
# Rename aliases to the query name itself, or in case of getMetric and getSignal -- the whole tuple.
# The tuple is used in export_api_call_data/1 to construct the query name (like getMetric|price_usd) and
# the selector that has been provided (like {"slugs": ["bitcoin", "ethereum"]})
rename_mapper = fn list ->
Expand Down
2 changes: 1 addition & 1 deletion lib/sanbase_web/graphql/cache/cache.ex
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ defmodule SanbaseWeb.Graphql.Cache do
2. If the function is anonymous or a different name should be used, a second
parameter with that name must be passed.

Just like `resolve` comming from Absinthe, `cache_resolve` supports the `{:ok, value}`
Just like `resolve` coming from Absinthe, `cache_resolve` supports the `{:ok, value}`
and `{:error, reason}` result tuples. The `:ok` tuples are cached while the `:error`
tuples are not.

Expand Down
2 changes: 1 addition & 1 deletion lib/sanbase_web/graphql/resolvers/file_resolver.ex
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ defmodule SanbaseWeb.Graphql.Resolvers.FileResolver do

@doc ~s"""
Receives a list of `%Plug.Upload{}` representing the images and uploads them.
The files are first uploaded to an AWS S3 bucket and then then the image url,
The files are first uploaded to an AWS S3 bucket and then the image url,
the content hash and used hash algorithm are stored in postgres.
"""
def upload_image(_root, %{images: images}, _resolution) do
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -252,7 +252,7 @@ defmodule SanbaseWeb.Graphql.Resolvers.ProjectTransfersResolver do

error ->
Logger.warning(
"Cannot calculate ETH spent over time for for #{Project.describe(project)}. Reason: #{inspect(error)}"
"Cannot calculate ETH spent over time for #{Project.describe(project)}. Reason: #{inspect(error)}"
)

{:nocache, {:ok, []}}
Expand Down
2 changes: 1 addition & 1 deletion lib/sanbase_web/graphql/schema/queries/menu_queries.ex
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ defmodule SanbaseWeb.Graphql.Schema.MenuQueries do
If :parent_id is provided, position is used to determine the position of the menu
is the parent menu. If not provided, it will be appended to the end of the list.
If a position is provided, all menu items with the same or bigger position in the same
menu will get their position increased by 1 in order to accomodate the new menu item.
menu will get their position increased by 1 in order to accommodate the new menu item.
"""
arg(:position, :integer, default_value: nil)

Expand Down
6 changes: 3 additions & 3 deletions lib/sanbase_web/graphql/schema/types/project_types.ex
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ defmodule SanbaseWeb.Graphql.ProjectTypes do
Returns a list of available signals. Every one of the signals in the list
can be passed as the `metric` argument of the `getMetric` query.

For example, any of of the signals from the query:
For example, any of the signals from the query:
```
{
projectBySlug(slug: "ethereum"){ availableSignals }
Expand Down Expand Up @@ -157,7 +157,7 @@ defmodule SanbaseWeb.Graphql.ProjectTypes do
Returns a list of available metrics. Every one of the metrics in the list
can be passed as the `metric` argument of the `getMetric` query.

For example, any of of the metrics from the query:
For example, any of the metrics from the query:
```
{
projectBySlug(slug: "ethereum"){ availableMetrics }
Expand Down Expand Up @@ -431,7 +431,7 @@ defmodule SanbaseWeb.Graphql.ProjectTypes do
without duplicating the data (like computing the total marketcap of a watchlist that has
a-tether, o-tether and arb-tether in it).

Assets like bitcoin and the the Ethereum token wrapped-bitcoin are not considered
Assets like bitcoin and the Ethereum token wrapped-bitcoin are not considered
the same project/asset.
"""
field(:multichain_project_group_key, :string)
Expand Down
2 changes: 1 addition & 1 deletion lib/sanbase_web/plug/basic_auth.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defmodule SanbaseWeb.Plug.BasicAuth do
@moduledoc ~s"""
Checks the path if it is really comming from telegram. The endpoint is a secret
Checks the path if it is really coming from telegram. The endpoint is a secret
and is only known by telegram.
"""

Expand Down
2 changes: 1 addition & 1 deletion lib/sanbase_web/plug/bot_login_plug.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defmodule SanbaseWeb.Plug.BotLoginPlug do
@moduledoc ~s"""
Checks the path if it is really comming from the sanbase bot. The endpoint is a secret
Checks the path if it is really coming from the sanbase bot. The endpoint is a secret
and is only known by the bot.
"""

Expand Down
2 changes: 1 addition & 1 deletion lib/sanbase_web/plug/telegram_match_plug.ex
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
defmodule SanbaseWeb.Plug.TelegramMatchPlug do
@moduledoc ~s"""
Checks the path if it is really comming from telegram. The endpoint is a secret
Checks the path if it is really coming from telegram. The endpoint is a secret
and is only known by telegram.
"""

Expand Down