Skip to content

Commit

Permalink
Merge pull request #1517 from AmbireTech/hotfix/set-provider
Browse files Browse the repository at this point in the history
Hotfix / Ensure we have network and rpc url before creating a Provider
  • Loading branch information
stojnovsky authored Jan 12, 2024
2 parents 947830b + 7142060 commit 23c991e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/config/providers/providers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ const setProvider = (_id: NetworkId) => {
// eslint-disable-next-line no-underscore-dangle
const url = rpcUrls[_id]
const network = networks.find(({ id }) => id === _id)
if (!network) return null
if (!network || !url) return null

const { id: name, chainId, ensName } = network as NetworkType
let provider
Expand Down

0 comments on commit 23c991e

Please sign in to comment.