Minor cleanups from pr

This commit is contained in:
Ethan Frey 2020-02-03 22:42:40 +01:00
parent c62702ba30
commit 1fbfa311c3
3 changed files with 8 additions and 6 deletions

View File

@ -134,8 +134,8 @@ describe("CosmWasmConnection", () => {
});
});
describe("encodeTx", () => {
it("properly calculates tx hash", async () => {
describe("identifier", () => {
it("calculates tx hash from PostableBytes", async () => {
pendingWithoutCosmos();
const connection = await CosmWasmConnection.establish(httpUrl, defaultPrefix, defaultTokens);
const postable = cosmWasmCodec.bytesToPost(signedTxJson);

View File

@ -69,7 +69,7 @@ function buildQueryString({
return components.filter(Boolean).join("&");
}
export type TokenConfiguration = (TokenInfo & { readonly name: string })[];
export type TokenConfiguration = ReadonlyArray<TokenInfo & { readonly name: string }>;
export class CosmWasmConnection implements BlockchainConnection {
// we must know prefix and tokens a priori to understand the chain

View File

@ -22,9 +22,11 @@ import {
import { Stream } from "xstream";
import { CosmosBech32Prefix } from "./address";
import { TokenInfo } from "./types";
export declare type TokenConfiguration = (TokenInfo & {
readonly name: string;
})[];
export declare type TokenConfiguration = ReadonlyArray<
TokenInfo & {
readonly name: string;
}
>;
export declare class CosmWasmConnection implements BlockchainConnection {
static establish(
url: string,