Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(clerk-js,types): Introduce Coinbase Wallet Web3 provider types #4028

Merged
Show file tree
Hide file tree
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
6 changes: 6 additions & 0 deletions .changeset/cuddly-mails-lie.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@clerk/clerk-js": patch
"@clerk/types": patch
---

Introduce Coinbase Wallet Web3 provider types
4 changes: 4 additions & 0 deletions packages/clerk-js/src/ui/common/constants.ts
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,10 @@ export const WEB3_PROVIDERS: Web3Providers = Object.freeze({
id: 'metamask',
name: 'MetaMask',
},
coinbase: {
id: 'coinbase',
name: 'Coinbase Wallet',
},
});

export function getWeb3ProviderData(name: Web3Provider): Web3ProviderData | undefined | null {
Expand Down
8 changes: 7 additions & 1 deletion packages/types/src/web3.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,15 +7,21 @@ export interface Web3ProviderData {
}

export type MetamaskWeb3Provider = 'metamask';
export type CoinbaseWeb3Provider = 'coinbase';

export type Web3Provider = MetamaskWeb3Provider;
export type Web3Provider = MetamaskWeb3Provider | CoinbaseWeb3Provider;

export const WEB3_PROVIDERS: Web3ProviderData[] = [
{
provider: 'metamask',
strategy: 'web3_metamask_signature',
name: 'MetaMask',
},
{
provider: 'coinbase',
strategy: 'web3_coinbase_signature',
name: 'Coinbase Wallet',
},
];

interface getWeb3ProviderDataProps {
Expand Down
Loading