Skip to content

Commit

Permalink
wip: fix(devnet): warn if devnet is not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
egasimus committed Oct 14, 2023
1 parent 514443e commit 288f9c0
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
7 changes: 3 additions & 4 deletions connect/cw/okp4/okp4.ts
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,6 @@ class OKP4Chain extends Chain {
constructor (options: Partial<OKP4Chain> & { config?: OKP4Config } = {
config: new OKP4Config()
}) {
console.log({options})
super(options)
}

Expand All @@ -65,9 +64,9 @@ class OKP4Chain extends Chain {
}

/** Connect to OKP4 in testnet mode. */
static devnet = (options: Partial<OKP4Chain> = {}): OKP4Chain => super.devnet({
...options||{}
}) as OKP4Chain
static devnet = (options: Partial<OKP4Chain> = {}): OKP4Chain => {
throw new Error('devnet not installed. import @hackbg/fadroma')
}

/** Get clients for all Cognitarium instances,
* keyed by address. */
Expand Down
1 change: 1 addition & 0 deletions spec/CW.spec.ts.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 288f9c0

Please sign in to comment.