Skip to content

Commit

Permalink
improve code snippets
Browse files Browse the repository at this point in the history
  • Loading branch information
wilsoncusack committed May 1, 2024
1 parent a4ff7e6 commit da48643
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 33 deletions.
29 changes: 0 additions & 29 deletions docs/pages/sdk/coinbaseWalletProvider/request/overview.mdx

This file was deleted.

8 changes: 5 additions & 3 deletions docs/pages/sdk/makeWeb3Provider.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,18 @@ Creates a new `CoinbaseWalletProvider` instance using a `CoinbaseWalletSDK` inst

## Usage
:::code-group
``` typescript [provider.ts]
```ts twoslash [provider.ts]
import {sdk} from "./setup";

// Create provider
const provider = sdk.makeWeb3Provider({options: 'smartWalletOnly'});
// Use provider
const addresses = provider.request('eth_requestAccounts');
```
``` typescript [setup.ts]
```ts twoslash [setup.ts] filename="setup.ts"
import { CoinbaseWalletSDK } from '@coinbase/wallet-sdk'

const sdk = new CoinbaseWalletSDK({
export const sdk = new CoinbaseWalletSDK({
appName: 'My App Name',
appChainIds: [8453]
});
Expand Down
2 changes: 1 addition & 1 deletion docs/pages/sdk/setup.mdx
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# Setup
Create a new `CoinbaseWalletSDK` instance.

```typescript
```ts twoslash
import { CoinbaseWalletSDK } from '@coinbase/wallet-sdk'

const sdk = new CoinbaseWalletSDK({
Expand Down

0 comments on commit da48643

Please sign in to comment.