mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-11 14:09:15 +00:00
Fix types re-export
This commit is contained in:
parent
1491b13e83
commit
80be33b621
@ -1,4 +1,4 @@
|
||||
import { coinToDecimal, isAminoStdTx, TxsResponse, types } from "@cosmwasm/sdk";
|
||||
import { coinToDecimal, TxsResponse, types } from "@cosmwasm/sdk";
|
||||
import {
|
||||
Address,
|
||||
Algorithm,
|
||||
@ -95,7 +95,7 @@ export function parseFee(fee: types.StdFee, tokens: TokenInfos): Fee {
|
||||
|
||||
export function parseTx(tx: types.Tx, chainId: ChainId, nonce: Nonce, tokens: TokenInfos): SignedTransaction {
|
||||
const txValue = tx.value;
|
||||
if (!isAminoStdTx(txValue)) {
|
||||
if (!types.isAminoStdTx(txValue)) {
|
||||
throw new Error("Only Amino StdTx is supported");
|
||||
}
|
||||
if (txValue.msg.length !== 1) {
|
||||
|
@ -1,6 +1,6 @@
|
||||
export { coinToDecimal } from "./decoding";
|
||||
export { decimalToCoin } from "./encoding";
|
||||
export { RestClient, TxsResponse } from "./restclient";
|
||||
// types.X are all the types we re-export
|
||||
// Note: this doesn't work for functions, just typescript types, so we must explicitly re-export functions
|
||||
export { default as types, isAminoStdTx } from "./types";
|
||||
|
||||
import * as types from "./types";
|
||||
export { types };
|
||||
|
4
packages/sdk/types/index.d.ts
vendored
4
packages/sdk/types/index.d.ts
vendored
@ -1,4 +1,6 @@
|
||||
export { coinToDecimal } from "./decoding";
|
||||
export { decimalToCoin } from "./encoding";
|
||||
export { RestClient, TxsResponse } from "./restclient";
|
||||
export { default as types, isAminoStdTx } from "./types";
|
||||
import * as types from "./types";
|
||||
export { types };
|
||||
export { isAminoStdTx } from "./types";
|
||||
|
Loading…
x
Reference in New Issue
Block a user