Skip to content

Commit

Permalink
chore(hapi): use the first account of the array when there is no acco…
Browse files Browse the repository at this point in the history
…unt name
  • Loading branch information
Torresmorah committed Jul 6, 2023
1 parent 0264a26 commit f1ceadb
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion hapi/src/routes/create-faucet-account.route.js
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,9 @@ module.exports = {
input.name = transaction?.processed?.action_traces[0]?.act?.data?.name
}

const response = accounts.find(account => account.account_name === input.name)
const response = accounts.find(
account => account.account_name === input.name || !input.name
)

if (!response) throw new Error('Account creation failed')

Expand Down

0 comments on commit f1ceadb

Please sign in to comment.