From 75d24f65b534998752ef32461d570e7e278ecddb Mon Sep 17 00:00:00 2001 From: Ry Racherbaumer Date: Wed, 28 Feb 2024 13:32:29 -0600 Subject: [PATCH] fix: support `base` WalletClient type --- src/utils/viem.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/utils/viem.ts b/src/utils/viem.ts index dcda08a7e..02c958bc3 100644 --- a/src/utils/viem.ts +++ b/src/utils/viem.ts @@ -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(