Skip to content

Commit

Permalink
fix error
Browse files Browse the repository at this point in the history
  • Loading branch information
joshuascan committed Feb 6, 2025
1 parent f36d541 commit 53ff3e7
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions src/lib/connectors/universalWalletConnector.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ import type { MagicSDKAdditionalConfiguration } from '@magic-sdk/provider';
import type { RPCProviderModule } from '@magic-sdk/provider/dist/types/modules/rpc-provider';
import type { EthNetworkConfiguration } from '@magic-sdk/types';
import { createConnector } from '@wagmi/core';
import { type Chain, getAddress } from 'viem';
import { normalizeChainId } from '../utils';
import { MagicOptions, magicConnector } from './magicConnector';
import { type Chain, getAddress } from 'viem';

export interface UniversalWalletOptions {
apiKey: string;
Expand Down Expand Up @@ -69,7 +69,7 @@ export function universalWalletConnector({ chains, options }: UniversalWalletCon
await this.magic?.wallet.connectWithUI();
const provider = (await this.getProvider()) as RPCProviderModule;
const chainId = await this.getChainId();
provider &&
if (provider) {
registerProviderEventListeners(
provider,
chain => {
Expand All @@ -78,6 +78,7 @@ export function universalWalletConnector({ chains, options }: UniversalWalletCon
},
this.onDisconnect,
);
}
const account: any = await this.getAccount();
return {
accounts: [account],
Expand Down

0 comments on commit 53ff3e7

Please sign in to comment.