Skip to content
This repository has been archived by the owner on Sep 14, 2023. It is now read-only.

fix: further misc sub0 fixes #444

Merged
merged 3 commits into from
Nov 28, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions effects/extrinsic.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { unimplemented } from "../deps/std/testing/asserts.ts"
import * as Z from "../deps/zones.ts"
import * as M from "../frame_metadata/mod.ts"
import * as rpc from "../rpc/mod.ts"
import * as ss58 from "../ss58/mod.ts"
import * as U from "../util/mod.ts"
import { const as const_ } from "./const.ts"
import { metadata } from "./metadata.ts"
Expand Down Expand Up @@ -94,7 +93,7 @@ export class SignedExtrinsic<
const senderSs58 = Z.ls(addrPrefix, this.props.sender).next(([addrPrefix, sender]) => {
switch (sender.type) {
case "Id": {
return ss58.encode(addrPrefix, sender.value)
return U.ss58.encode(addrPrefix, sender.value)
}
default: {
unimplemented()
Expand Down
3 changes: 1 addition & 2 deletions frame_metadata/Extrinsic.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import * as $ from "../deps/scale.ts"
import { assert } from "../deps/std/testing/asserts.ts"
import * as ss58 from "../ss58/mod.ts"
import { hashers, Hex, hex } from "../util/mod.ts"
import { hashers, Hex, hex, ss58 } from "../util/mod.ts"
import { $null, DeriveCodec } from "./Codec.ts"
import { Metadata } from "./Metadata.ts"

Expand Down
11 changes: 10 additions & 1 deletion mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -13,4 +13,13 @@ export {
type Signer,
} from "./frame_metadata/mod.ts"
export * as rpc from "./rpc/mod.ts"
export { End, type Hex, hex, type Listener } from "./util/mod.ts"
export {
End,
getOrInit,
type Hex,
hex,
type Listener,
Sr25519,
ss58,
throwIfError,
} from "./util/mod.ts"
1 change: 1 addition & 0 deletions serve.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import { LocalCapiCodegenServer } from "./codegen/server/local.ts"

console.log("Listening on http://localhost:5646/")
new LocalCapiCodegenServer().listen(5646)
1 change: 1 addition & 0 deletions util/mod.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ export * from "./Listener.ts"
export * from "./memo.ts"
export * from "./multisig.ts"
export * from "./sr25519.ts"
export * as ss58 from "./ss58.ts"
export * from "./state.ts"
export * from "./tuple.ts"
export * from "./types.ts"
2 changes: 1 addition & 1 deletion ss58/mod.test.ts → util/ss58.test.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { assertEquals, assertInstanceOf } from "../deps/std/testing/asserts.ts"
import * as T from "../test_util/mod.ts"
import * as ss58 from "./mod.ts"
import * as ss58 from "./ss58.ts"

for (
const [networkName, address, [prefix, publicKey]] of [
Expand Down
File renamed without changes.