Skip to content

Commit

Permalink
Merge pull request #13 from coinbase/wilson/improvements
Browse files Browse the repository at this point in the history
clean up re jeff + misc cleanup
  • Loading branch information
wilsoncusack authored Apr 30, 2024
2 parents 356c2c1 + ab6d3f8 commit 1db5268
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 85 deletions.
22 changes: 13 additions & 9 deletions docs/pages/guides/wagmi.mdx
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Using with Smart Wallet with Wagmi
# Using Smart Wallet with Wagmi
This guide covers creating a new Wagmi template project that uses Smart Wallet.
We use [pnpm](https://pnpm.io/) or [bun](https://bun.sh/) for Node package manager
as these have superior `resolutions` support.

## Setup
### 1. Run the following command and proceed through the prompts.
Expand All @@ -22,7 +24,7 @@ bun create wagmi
}
```

### 3. Now install packages with your package manager and run dev.
### 3. Install packages and run dev.

:::code-group

Expand All @@ -35,8 +37,8 @@ bun install && bun run dev
```
:::

### 4. Update the wagmi config and coinbaseWallet connector to use baseSepolia
- `src/wagmi.ts` should look something like this:
### 4. Update the Wagmi config and coinbaseWallet connector to use baseSepolia
`src/wagmi.ts` should look something like this:

```typescript
import { http, createConfig } from 'wagmi';
Expand Down Expand Up @@ -65,10 +67,12 @@ bun install && bun run dev

## Usage

### 1. Visit localhost:3000 and click the "Coinbase Wallet" button.
- If you chose Vanilla or Vite in the create wagmi cli visit localhost:5174
- If you have the Coinbase wallet extension enabled, that will be the default connection method. Disable it to connect via smart wallet.
### 1. Visit your site locally, click the "Coinbase Wallet" button, and choose "Create a Smart Wallet."

Note, if you are using a browser with Coinbase Wallet Extension enabled,
that will be the default connection method and you will not see a screen to choose Smart Wallet.
Temporarily disable the Extension to connect with Smart Wallet.

### 2. Keep building

- You can find everything you need here: https://wagmi.sh/react/api/hooks
### 2. Keep building
You can find everything you need here: https://wagmi.sh/react/api/hooks
8 changes: 6 additions & 2 deletions docs/pages/quick-start.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,19 @@ You can try Smart Wallet on Base Sepolia in your app using the
Coinbase Wallet SDK beta.

If your project or its dependencies are already using
Coinbase Walelt SDK beta, just add the following to `package.json`.
Coinbase Wallet SDK beta, just add the following to `package.json`.
```json
"resolutions": {
"@coinbase/wallet-sdk": "npm:@coinbase/wallet-sdk@4.0.0-beta.12"
}
```
After doing so, remember to run `install` with your package manager, e.g. `npm install`.
After doing so, remember to run `install` with your package manager, e.g. `pnpm install`.
Then, rebuild your project, and when you click to connect Coinbase Wallet, you will see a new
popup window with a Smart Wallet option.
:::info
Note, if you are having trouble and are using `yarn` or `npm`, you may need to use [force resolutions](https://www.npmjs.com/package/npm-force-resolutions).
We recommend using [pnpm](https://pnpm.io/) or [bun](https://bun.sh/), when possible.
:::

Reach out to us in the `#smart-wallet` channel on [Discord](https://discord.com/invite/cdp/) if you have any questions.

Expand Down
4 changes: 2 additions & 2 deletions docs/pages/why.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ users' on device passkey is what is [validated for signing onchain](https://gith
Smart Wallet is free for both developers and users.

## Unified Account Across Apps
Smart Wallet users can use the same account and address across all apps.
Smart Wallet users can use the same account and address across all onchain apps.

## Spend from Coinbase
## Magic Spend
Smart Wallet users can connect their coinbase.com account and spend their coinbase.com held ETH from
their Smart Account (Base only, for now). [need gif]

Expand Down
94 changes: 22 additions & 72 deletions vocs.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -57,57 +57,7 @@ export default defineConfig({
{
text: 'Magic Spend support',
link: '/guides/magic-spend',
},
// {
// text: "wallet aggregators",
// link: '/docs/api/config',
// items: [
// {
// text: "Wallet Connect",
// link: '/docs/api/config',
// },
// {
// text: "Portis",
// link: '/docs/api/config',
// },
// {
// text: "Fortmatic",
// link: '/docs/api/config',
// },
// {
// text: "Torus",
// link: '/docs/api/config',
// },
// {
// text: "Authereum",
// link: '/docs/api/config',
// },
// {
// text: "Arkane",
// link: '/docs/api/config',
// },
// {
// text: "Bitski",
// link: '/docs/api/config',
// },
// {
// text: "Squarelink",
// link: '/docs/api/config',
// },
// {
// text: "Ledger",
// link: '/docs/api/config',
// },
// {
// text: "Trezor",
// link: '/docs/api/config',
// },
// {
// text: "WalletLink",
// link: '/docs/api/config',
// }
// ]
// }
},
],
} ,
{
Expand All @@ -126,29 +76,29 @@ export default defineConfig({
text: 'makeWeb3Provider',
link: '/sdk/makeWeb3Provider'
},
{
text: 'CoinbaseWalletProvider',
items: [
{
text: 'request',
items: [
{text: 'Overview', link: '/sdk/coinbaseWalletProvider/request/overview'},
{text: 'wallet_getCapabilities'},
{text: 'wallet_sendCalls'},
{text: 'wallet_getCallsStatus'},
{text: 'wallet_showCallsStatus'},
]
}
]
},
// {
// text: 'CoinbaseWalletProvider',
// items: [
// {
// text: 'request',
// items: [
// {text: 'Overview', link: '/sdk/coinbaseWalletProvider/request/overview'},
// {text: 'wallet_getCapabilities'},
// {text: 'wallet_sendCalls'},
// {text: 'wallet_getCallsStatus'},
// {text: 'wallet_showCallsStatus'},
// ]
// }
// ]
// },
],
},
{
text: 'Smart Contracts',
collapsed: false,
items: [
// {
// text: 'Smart Contracts',
// collapsed: false,
// items: [

],
}
// ],
// }
],
})

0 comments on commit 1db5268

Please sign in to comment.