Skip to content

Commit

Permalink
Merge pull request #543 from xmtp/rygine/fix-viem-support
Browse files Browse the repository at this point in the history
Support `base` WalletClient type
  • Loading branch information
rygine committed Feb 28, 2024
2 parents 410be93 + 75d24f6 commit fa29df9
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 fa29df9

Please sign in to comment.