Skip to content

Commit

Permalink
Fix getConnectedNetworks
Browse files Browse the repository at this point in the history
  • Loading branch information
samchuk-vlad committed Nov 9, 2023
1 parent a15de37 commit 853fdad
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/routes/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ export const createRoutes = (apis: Connections) => {
const getConnectedNetworks = (req) => {
const { networks } = req.query

return networks.filter((network) => isApiConnected(apis.mixedApis[network]))
return networks?.filter((network) => isApiConnected(apis.mixedApis[network])) || []
}

router.get(
Expand Down Expand Up @@ -78,7 +78,7 @@ export const createRoutes = (apis: Connections) => {

const result = balances.map((balance: any) => {
const { status, value } = balance

return status === 'fulfilled' && value
})

Expand Down

0 comments on commit 853fdad

Please sign in to comment.