From 288f9c0ad044ada80330ee02cfb7ba62f5998ee3 Mon Sep 17 00:00:00 2001 From: Adam Avramov Date: Sat, 14 Oct 2023 22:20:52 +0300 Subject: [PATCH] wip: fix(devnet): warn if devnet is not installed --- connect/cw/okp4/okp4.ts | 7 +++---- spec/CW.spec.ts.md | 1 + 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/connect/cw/okp4/okp4.ts b/connect/cw/okp4/okp4.ts index 44d89aa26d0..70d83bed9ae 100644 --- a/connect/cw/okp4/okp4.ts +++ b/connect/cw/okp4/okp4.ts @@ -50,7 +50,6 @@ class OKP4Chain extends Chain { constructor (options: Partial & { config?: OKP4Config } = { config: new OKP4Config() }) { - console.log({options}) super(options) } @@ -65,9 +64,9 @@ class OKP4Chain extends Chain { } /** Connect to OKP4 in testnet mode. */ - static devnet = (options: Partial = {}): OKP4Chain => super.devnet({ - ...options||{} - }) as OKP4Chain + static devnet = (options: Partial = {}): OKP4Chain => { + throw new Error('devnet not installed. import @hackbg/fadroma') + } /** Get clients for all Cognitarium instances, * keyed by address. */ diff --git a/spec/CW.spec.ts.md b/spec/CW.spec.ts.md index abd7b30d134..d01b3dd449b 100644 --- a/spec/CW.spec.ts.md +++ b/spec/CW.spec.ts.md @@ -16,6 +16,7 @@ managed by Fadroma on your local Docker installation. (Make sure you can call `docker` without `sudo`!) ```typescript +import '@hackbg/fadroma' // populates devnet import { OKP4 } from '@fadroma/connect' const okp4 = await OKP4.devnet().ready