Skip to content

Commit

Permalink
fix: support base WalletClient type
Browse files Browse the repository at this point in the history
  • Loading branch information
rygine committed Feb 28, 2024
1 parent 410be93 commit 75d24f6
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/utils/viem.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,10 @@ export function getSigner(wallet: Signer | WalletClient | null): Signer | null {
}

function isWalletClient(wallet: Signer | WalletClient): wallet is WalletClient {
return 'type' in wallet && wallet.type === 'walletClient'
return (
'type' in wallet &&
(wallet.type === 'walletClient' || wallet.type === 'base')
)
}

export function convertWalletClientToSigner(
Expand Down

0 comments on commit 75d24f6

Please sign in to comment.