Skip to content

Commit

Permalink
Replaced direct web3provider usage with getProviderForNetwork()
Browse files Browse the repository at this point in the history
  • Loading branch information
mwieja committed Oct 12, 2023
1 parent 93d091c commit 672e065
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/hooks/useImportingWallet.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ import { analytics } from '@/analytics';
import { PROFILES, useExperimentalFlag } from '@/config';
import { fetchReverseRecord } from '@/handlers/ens';
import {
getProviderForNetwork,
isValidBluetoothDeviceId,
resolveUnstoppableDomain,
web3Provider,
} from '@/handlers/web3';
import {
isENSAddressFormat,
Expand Down Expand Up @@ -150,6 +150,7 @@ export default function useImportingWallet({ showImportModal = true } = {}) {
// Validate ENS
if (isENSAddressFormat(input)) {
try {
const web3Provider = await getProviderForNetwork();
const [address, avatar] = await Promise.all([
web3Provider.resolveName(input),
!avatarUrl &&
Expand Down

0 comments on commit 672e065

Please sign in to comment.