Skip to content

Commit

Permalink
Fixes input data formatting issue for ownership authorized keys (#195)
Browse files Browse the repository at this point in the history
Closes #177
  • Loading branch information
Rohit Roy Chowdhury committed Jan 18, 2022
1 parent 92d092b commit c7324bc
Showing 1 changed file with 4 additions and 6 deletions.
10 changes: 4 additions & 6 deletions lib/archethic_web/graphql_schema/transaction_type.ex
Original file line number Diff line number Diff line change
Expand Up @@ -92,13 +92,11 @@ defmodule ArchEthicWeb.GraphQLSchema.TransactionType do
object :ownership do
field(:secret, :hex)

field(:authorized_public_keys, list_of(list_of(:authorized_key))) do
resolve(fn _, %{source: %{authorized_public_keys: authorized_keys}} ->
field(:authorized_public_keys, list_of(:authorized_key)) do
resolve(fn _, %{source: %{authorized_keys: authorized_keys}} ->
formatted_authorized_keys =
Enum.map(authorized_keys, fn authorized_keys_by_secret ->
Enum.map(authorized_keys_by_secret, fn {public_key, encrypted_secret_key} ->
%{public_key: public_key, encrypted_secret_key: encrypted_secret_key}
end)
Enum.map(authorized_keys, fn {public_key, encrypted_secret_key} ->
%{public_key: public_key, encrypted_secret_key: encrypted_secret_key}
end)

{:ok, formatted_authorized_keys}
Expand Down

0 comments on commit c7324bc

Please sign in to comment.