-
-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Coinbase Wallet: Add Support for Instant Onboarding mode (#4440)
* Update coinbaseWallet.ts * add changeset * refactor: types * test: types --------- Co-authored-by: Tom Meagher <[email protected]>
- Loading branch information
1 parent
7469614
commit e3f63a0
Showing
4 changed files
with
32 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
--- | ||
"@wagmi/connectors": minor | ||
--- | ||
|
||
Added Coinbase Smart Wallet "Instant Onboarding" mode to `coinbaseWallet`. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,17 @@ | ||
import { config } from '@wagmi/test' | ||
import { expect, test } from 'vitest' | ||
import { expect, expectTypeOf, test } from 'vitest' | ||
|
||
import { coinbaseWallet } from './coinbaseWallet.js' | ||
|
||
test('setup', () => { | ||
const connectorFn = coinbaseWallet({ appName: 'wagmi' }) | ||
const connectorFn = coinbaseWallet({ appName: 'wagmi', version: '4' }) | ||
const connector = config._internal.connectors.setup(connectorFn) | ||
expect(connector.name).toEqual('Coinbase Wallet') | ||
|
||
type ConnectFnParameters = NonNullable< | ||
Parameters<(typeof connector)['connect']>[0] | ||
> | ||
expectTypeOf<ConnectFnParameters['instantOnboarding']>().toMatchTypeOf< | ||
boolean | undefined | ||
>() | ||
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters