Skip to content

Commit

Permalink
Chore: update adapter readme to move appropriate methods to (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
avivash authored Aug 26, 2023
1 parent bcbfd86 commit 032f8ba
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/adapter/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ pnpm install filsnap-adapter
This adapter interacts directly with the snap, so Metamask Flask needs to be installed and unlocked in the browser.

```js
import * as Filsnap from 'filsnap-adapter'
import { FilsnapAdapter } from 'filsnap-adapter'

const hasFlask = await Filsnap.hasFlask()
const hasFlask = await FilsnapAdapter.hasFlask()
if (!hasFlask) {
console.error('Flask not installed')
return
}

const snap = await Filsnap.connect({ network: 'testnet' }, 'npm:filsnap')
const snap = await FilsnapAdapter.connect({ network: 'testnet' }, 'npm:filsnap')

const { error, result } = await snap.getAddress()
if (error) {
Expand All @@ -38,7 +38,7 @@ if (error) {
// t1d2xrzcslx7xlbbylc5c3d5lvandqw4iwl6epxba
}

const isConnected = await snap.isConnected()
const isConnected = await FilsnapAdapter.isConnected()
// true
```

Expand Down

0 comments on commit 032f8ba

Please sign in to comment.