From 72ba6d138207a5424222618de16d833284052126 Mon Sep 17 00:00:00 2001 From: Ethan Frey Date: Thu, 23 Jan 2020 18:19:32 +0100 Subject: [PATCH] Remove console.log, fix linter errors --- src/cosmosconnection.spec.ts | 2 -- src/cosmosconnection.ts | 6 +----- src/types.ts | 1 + 3 files changed, 2 insertions(+), 7 deletions(-) diff --git a/src/cosmosconnection.spec.ts b/src/cosmosconnection.spec.ts index 0a97cd34..fc916c56 100644 --- a/src/cosmosconnection.spec.ts +++ b/src/cosmosconnection.spec.ts @@ -169,8 +169,6 @@ describe("CosmosConnection", () => { expect(account.address).toEqual(defaultAddress); // Undefined until we sign a transaction (on multiple runs against one server this will be set), allow both if (account.pubkey !== undefined) { - console.log(`account: ${account.pubkey.data.length}`, account.pubkey); - console.log(`default: ${defaultPubkey.data.length}`, defaultPubkey); expect(account.pubkey).toEqual(defaultPubkey); } // Starts with two tokens diff --git a/src/cosmosconnection.ts b/src/cosmosconnection.ts index fb5221fd..3c10fa6f 100644 --- a/src/cosmosconnection.ts +++ b/src/cosmosconnection.ts @@ -19,7 +19,6 @@ import { Nonce, PostableBytes, PostTxResponse, - PubkeyBundle, PubkeyBytes, PubkeyQuery, Token, @@ -29,7 +28,7 @@ import { TransactionState, UnsignedTransaction, } from "@iov/bcp"; -import { Bech32, Encoding, Uint53 } from "@iov/encoding"; +import { Uint53 } from "@iov/encoding"; import { DefaultValueProducer, ValueAndUpdates } from "@iov/stream"; import equal from "fast-deep-equal"; import { ReadonlyDate } from "readonly-date"; @@ -41,8 +40,6 @@ import { decodeAmount, parseTxsResponse } from "./decode"; import { RestClient, TxsResponse } from "./restclient"; import { accountToNonce, TokenInfos } from "./types"; -const { fromBase64 } = Encoding; - interface ChainData { readonly chainId: ChainId; } @@ -152,7 +149,6 @@ export class CosmosConnection implements BlockchainConnection { this.tokenInfo.find(token => token.denom === denom), ); - console.log(account.public_key); const pubkey = !account.public_key ? undefined : { diff --git a/src/types.ts b/src/types.ts index 9700c1a6..e929d61b 100644 --- a/src/types.ts +++ b/src/types.ts @@ -55,6 +55,7 @@ export interface NonceInfo { // this (lossily) encodes the two pieces of info (uint64) needed to sign into // one (53-bit) number. Cross your fingers. +/* eslint-disable-next-line @typescript-eslint/camelcase */ export function accountToNonce({ account_number, sequence }: NonceInfo): Nonce { const acct = parseInt(account_number, 10); const seq = parseInt(sequence, 10);