Skip to content

Commit f57f3f1

Browse files
committed
test: fix test, remove brand bech32
1 parent 68d7b8c commit f57f3f1

File tree

4 files changed

+325
-286
lines changed

4 files changed

+325
-286
lines changed

eslint.config.mjs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,13 @@
1+
import path from "node:path"
2+
import { fileURLToPath } from "node:url"
3+
14
import { fixupPluginRules } from "@eslint/compat"
25
import { FlatCompat } from "@eslint/eslintrc"
36
import js from "@eslint/js"
47
import tsParser from "@typescript-eslint/parser"
58
import _import from "eslint-plugin-import"
69
import simpleImportSort from "eslint-plugin-simple-import-sort"
710
import sortDestructureKeys from "eslint-plugin-sort-destructure-keys"
8-
import path from "node:path"
9-
import { fileURLToPath } from "node:url"
1011

1112
const __filename = fileURLToPath(import.meta.url)
1213
const __dirname = path.dirname(__filename)

packages/evolution/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@
3131
"build": "tsc -b tsconfig.build.json && babel dist --plugins annotate-pure-calls --out-dir dist --source-maps",
3232
"dev": "tsc -b tsconfig.build.json --watch",
3333
"type-check": "tsc --noEmit",
34-
"lint": "eslint \"src/**/*.{ts,mjs}\"",
34+
"lint": "eslint \"src/**/*.{ts,mjs}\" \"test/**/*.{ts,mjs}\"",
3535
"test": "vitest run",
3636
"docgen": "docgen",
3737
"clean": "rm -rf dist .turbo docs"

packages/evolution/src/Bech32.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export class Bech32Error extends Data.TaggedError("Bech32Error")<{
1010
cause?: unknown
1111
}> {}
1212

13-
export const Bech32Schema = Schema.String.pipe(Schema.brand("Bech32"))
13+
export const Bech32Schema = Schema.String
1414
export type Bech32 = typeof Bech32Schema.Type
1515

1616
export const FromBytes = (prefix: string = "addr") =>
@@ -23,6 +23,6 @@ export const FromBytes = (prefix: string = "addr") =>
2323
}),
2424
decode: (fromA, options, ast, fromI) => {
2525
const words = bech32.toWords(fromI)
26-
return ParseResult.succeed(Bech32Schema.make(bech32.encode(prefix, words, false)))
26+
return ParseResult.succeed(bech32.encode(prefix, words, false))
2727
}
2828
})

0 commit comments

Comments
 (0)