Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ describe('useIsWalletACoinbaseSmartWallet', () => {
expect(result.current).toBe(false);
});

it('should return true if the wallet is a Coinbase Smart Wallet', () => {
it('should return false if the wallet is not a Coinbase Wallet', () => {
(useOnchainKit as Mock).mockReturnValue({ chain: { id: 'chainId' } });
(useAccount as Mock).mockReturnValue({ connector: { id: 'someOtherId' } });
(useCapabilitiesSafe as Mock).mockReturnValue({
Expand All @@ -55,4 +55,16 @@ describe('useIsWalletACoinbaseSmartWallet', () => {

expect(result.current).toBe(false);
});
});

it('should return false if no connector is connected', () => {
(useOnchainKit as Mock).mockReturnValue({ chain: { id: 'chainId' } });
(useAccount as Mock).mockReturnValue({ connector: undefined });
(useCapabilitiesSafe as Mock).mockReturnValue({
atomicBatch: { supported: true },
});

const { result } = renderHook(() => useIsWalletACoinbaseSmartWallet());

expect(result.current).toBe(false);
});
});