Skip to content

Commit 0158c77

Browse files
feat(clerk-js,types): Introduce Coinbase Wallet Web3 provider types (#4028)
Co-authored-by: Lennart <lekoarts@gmail.com>
1 parent c3adac0 commit 0158c77

File tree

3 files changed

+17
-1
lines changed

3 files changed

+17
-1
lines changed

.changeset/cuddly-mails-lie.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@clerk/clerk-js": patch
3+
"@clerk/types": patch
4+
---
5+
6+
Introduce Coinbase Wallet Web3 provider types

packages/clerk-js/src/ui/common/constants.ts

+4
Original file line numberDiff line numberDiff line change
@@ -92,6 +92,10 @@ export const WEB3_PROVIDERS: Web3Providers = Object.freeze({
9292
id: 'metamask',
9393
name: 'MetaMask',
9494
},
95+
coinbase: {
96+
id: 'coinbase',
97+
name: 'Coinbase Wallet',
98+
},
9599
});
96100

97101
export function getWeb3ProviderData(name: Web3Provider): Web3ProviderData | undefined | null {

packages/types/src/web3.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,21 @@ export interface Web3ProviderData {
77
}
88

99
export type MetamaskWeb3Provider = 'metamask';
10+
export type CoinbaseWeb3Provider = 'coinbase';
1011

11-
export type Web3Provider = MetamaskWeb3Provider;
12+
export type Web3Provider = MetamaskWeb3Provider | CoinbaseWeb3Provider;
1213

1314
export const WEB3_PROVIDERS: Web3ProviderData[] = [
1415
{
1516
provider: 'metamask',
1617
strategy: 'web3_metamask_signature',
1718
name: 'MetaMask',
1819
},
20+
{
21+
provider: 'coinbase',
22+
strategy: 'web3_coinbase_signature',
23+
name: 'Coinbase Wallet',
24+
},
1925
];
2026

2127
interface getWeb3ProviderDataProps {

0 commit comments

Comments
 (0)