Skip to content

Commit

Permalink
maybe mix.lock deps?
Browse files Browse the repository at this point in the history
found the mofo
  • Loading branch information
InoMurko committed Mar 4, 2021
1 parent 781888b commit 7550428
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -325,7 +325,7 @@ jobs:
_counter=$(mix credo --only Credo.Check.Readability.SinglePipe | grep -c "Use a function call when a pipeline is only one function long")
echo "Current Credo.Check.Readability.SinglePipe occurrences:"
echo $_counter
if [ $_counter -gt 274 ]; then
if [ $_counter -gt 273 ]; then
echo "Have you been naughty or nice? Find out if Santa knows."
exit 1
fi
Expand Down
5 changes: 3 additions & 2 deletions apps/omg_watcher/lib/omg_watcher/state.ex
Original file line number Diff line number Diff line change
Expand Up @@ -193,8 +193,9 @@ defmodule OMG.Watcher.State do
end

def handle_call({:deposit, deposits}, _from, state) do
if Code.ensure_loaded?(OMG.Watcher.WatcherInfo.DB.EthEvent),
do: Kernel.apply(OMG.Watcher.WatcherInfo.DB.EthEvent, :insert_deposits!, [deposits])
if Code.ensure_loaded?(OMG.WatcherInfo.DB.EthEvent) do
:ok = Kernel.apply(OMG.WatcherInfo.DB.EthEvent, :insert_deposits!, [deposits])
end

{:ok, db_updates, new_state} = Core.deposit(deposits, state)

Expand Down
7 changes: 4 additions & 3 deletions apps/omg_watcher_info/lib/omg_watcher_info/db/eth_event.ex
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ defmodule OMG.WatcherInfo.DB.EthEvent do

case get(root_chain_txhash_event) do
nil ->
%__MODULE__{
deposit = %__MODULE__{
root_chain_txhash_event: root_chain_txhash_event,
log_index: log_index,
root_chain_txhash: root_chain_txhash,
Expand All @@ -108,7 +108,8 @@ defmodule OMG.WatcherInfo.DB.EthEvent do
}
]
}
|> DB.Repo.insert()

{:ok, _} = DB.Repo.insert(deposit)

# an ethevents row just got inserted, now return the ethevent with all populated fields including
# those populated by the DB (eg: inserted_at, updated_at, ...)
Expand Down Expand Up @@ -323,7 +324,7 @@ defmodule OMG.WatcherInfo.DB.EthEvent do

defp output_spent?(%DB.TxOutput{}), do: true

# Tells whether processing exit event, exited outout has to be present in the database
# Tells whether processing exit event, exited output has to be present in the database
# For more see: https://github.com/omgnetwork/elixir-omg/issues/1760#issuecomment-722313713
defp expect_output_existence?(:standard_exit, _), do: true
defp expect_output_existence?(:in_flight_exit, :InFlightTxOutputPiggybacked), do: false
Expand Down

0 comments on commit 7550428

Please sign in to comment.