Skip to content

Commit

Permalink
Set default max confirmations (#529)
Browse files Browse the repository at this point in the history
  • Loading branch information
Samuel committed Aug 18, 2022
1 parent 6e377d8 commit b14e7c5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion lib/archethic_web/transaction_subscriber.ex
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ defmodule ArchethicWeb.TransactionSubscriber do
state
) do
%{nb_confirmations: nb_confirmations, max_confirmations: max_confirmations} =
Map.get(state, tx_address, %{nb_confirmations: 0, max_confirmations: 0})
Map.get(state, tx_address, %{
nb_confirmations: 0,
max_confirmations: get_max_confirmations(tx_address)
})

total_confirmations = nb_confirmations + length(confirmations)

Expand Down

0 comments on commit b14e7c5

Please sign in to comment.