From 032f8bac3bf8ba383927acebd83a52d1d272e24c Mon Sep 17 00:00:00 2001 From: avivash Date: Sat, 26 Aug 2023 03:11:18 -0700 Subject: [PATCH] Chore: update adapter readme to move appropriate methods to (#63) --- packages/adapter/README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/packages/adapter/README.md b/packages/adapter/README.md index 1e5286a0..96c6eca7 100644 --- a/packages/adapter/README.md +++ b/packages/adapter/README.md @@ -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) { @@ -38,7 +38,7 @@ if (error) { // t1d2xrzcslx7xlbbylc5c3d5lvandqw4iwl6epxba } -const isConnected = await snap.isConnected() +const isConnected = await FilsnapAdapter.isConnected() // true ```