diff --git a/src/cosmosconnection.spec.ts b/src/cosmosconnection.spec.ts index 897b863e..11daaa5c 100644 --- a/src/cosmosconnection.spec.ts +++ b/src/cosmosconnection.spec.ts @@ -107,7 +107,7 @@ describe("CosmosConnection", () => { fractionalDigits: 6, tokenName: "Stake", tokenTicker: "stake" as TokenTicker, - } + }, ]); connection.disconnect(); }); diff --git a/src/cosmosconnection.ts b/src/cosmosconnection.ts index 45460485..8d7031ba 100644 --- a/src/cosmosconnection.ts +++ b/src/cosmosconnection.ts @@ -99,11 +99,14 @@ export class CosmosConnection implements BlockchainConnection { tokenName: "Cosm", tokenTicker: "cosm" as TokenTicker, }; - this.supportedTokens = [this.primaryToken, { - fractionalDigits: 6, - tokenName: "Stake", - tokenTicker: "stake" as TokenTicker, - }]; + this.supportedTokens = [ + this.primaryToken, + { + fractionalDigits: 6, + tokenName: "Stake", + tokenTicker: "stake" as TokenTicker, + }, + ]; } public disconnect(): void { diff --git a/src/types.ts b/src/types.ts index c74573d9..415c37ed 100644 --- a/src/types.ts +++ b/src/types.ts @@ -1,6 +1,5 @@ +import { Amount, Token } from "@iov/bcp"; import amino from "@tendermint/amino-js"; -import {Amount, Token} from "@iov/bcp"; - export type AminoTx = amino.Tx & { readonly value: amino.StdTx }; @@ -17,7 +16,7 @@ export interface TokenInfo extends Token { // TODO: alias amino types export function amountToCoin(lookup: ReadonlyArray, amount: Amount): amino.Coin { - const match = lookup.find(({tokenTicker}) => tokenTicker === amount.tokenTicker); + const match = lookup.find(({ tokenTicker }) => tokenTicker === amount.tokenTicker); if (!match) { throw Error(`unknown ticker: ${amount.tokenTicker}`); } @@ -28,7 +27,7 @@ export function amountToCoin(lookup: ReadonlyArray, amount: Amount): } export function coinToAmount(lookup: ReadonlyArray, coin: amino.Coin): Amount { - const match = lookup.find(({denom}) => denom === coin.denom); + const match = lookup.find(({ denom }) => denom === coin.denom); if (!match) { throw Error(`unknown denom: ${coin.denom}`); }