Skip to content

Commit

Permalink
hide mnemonics from public query
Browse files Browse the repository at this point in the history
  • Loading branch information
Reecepbcups committed Dec 22, 2023
1 parent f7ae25e commit cb7b121
Showing 1 changed file with 15 additions and 1 deletion.
16 changes: 15 additions & 1 deletion local-interchain/interchain/handlers/info.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,9 +176,23 @@ func get_logs(w http.ResponseWriter, r *http.Request, i *info) {
return
}

// hide mnemonics from query
chains := i.Config.Chains
for idx, chain := range chains {
updatedAccounts := []types.GenesisAccount{}

for _, acc := range chain.Genesis.Accounts {
acc.Mnemonic = "hidden"
updatedAccounts = append(updatedAccounts, acc)
}

chain.Genesis.Accounts = updatedAccounts
chains[idx] = chain
}

info := GetInfo{
Logs: logs,
Chains: i.Config.Chains,
Chains: chains,
Relay: i.Config.Relayer,
}

Expand Down

0 comments on commit cb7b121

Please sign in to comment.