From 7024a7468a549a96cf120e6b7e287e79d7ad2d61 Mon Sep 17 00:00:00 2001 From: Fabio Berger Date: Fri, 1 Jun 2018 17:02:54 -0700 Subject: [PATCH] Improve comments and remove unused imports --- packages/contracts/test/exchange/transactions.ts | 2 +- packages/order-utils/src/order_hash.ts | 2 +- packages/order-utils/src/signature_utils.ts | 4 ++-- packages/types/src/index.ts | 3 +++ 4 files changed, 7 insertions(+), 4 deletions(-) diff --git a/packages/contracts/test/exchange/transactions.ts b/packages/contracts/test/exchange/transactions.ts index 2f3f6b43a0..9af8b522b9 100644 --- a/packages/contracts/test/exchange/transactions.ts +++ b/packages/contracts/test/exchange/transactions.ts @@ -1,6 +1,6 @@ import { BlockchainLifecycle } from '@0xproject/dev-utils'; import { assetProxyUtils, generatePseudoRandomSalt } from '@0xproject/order-utils'; -import { AssetProxyId, Order, OrderWithoutExchangeAddress, SignatureType, SignedOrder } from '@0xproject/types'; +import { AssetProxyId, Order, OrderWithoutExchangeAddress, SignedOrder } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import * as chai from 'chai'; import * as ethUtil from 'ethereumjs-util'; diff --git a/packages/order-utils/src/order_hash.ts b/packages/order-utils/src/order_hash.ts index d62d428eb2..2ef746ef8f 100644 --- a/packages/order-utils/src/order_hash.ts +++ b/packages/order-utils/src/order_hash.ts @@ -1,5 +1,5 @@ import { schemas, SchemaValidator } from '@0xproject/json-schemas'; -import { Order, SignatureType, SignedOrder } from '@0xproject/types'; +import { Order, SignedOrder } from '@0xproject/types'; import { BigNumber } from '@0xproject/utils'; import BN = require('bn.js'); import { SolidityTypes } from 'ethereum-types'; diff --git a/packages/order-utils/src/signature_utils.ts b/packages/order-utils/src/signature_utils.ts index 5b56ef5774..c57699af06 100644 --- a/packages/order-utils/src/signature_utils.ts +++ b/packages/order-utils/src/signature_utils.ts @@ -16,8 +16,8 @@ import { utils } from './utils'; /** * Verifies that the provided signature is valid according to the 0x Protocol smart contracts * @param data The hex encoded data signed by the supplied signature. - * @param signature A hex encoded 0x Protocol signature made up of: [SignatureType][TypeSpecificData]. - * E.g [SignatureType.EIP712][vrs] + * @param signature A hex encoded 0x Protocol signature made up of: [TypeSpecificData][SignatureType]. + * E.g [vrs][SignatureType.EIP712] * @param signerAddress The hex encoded address that signed the data, producing the supplied signature. * @return Whether the signature is valid for the supplied signerAddress and data. */ diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 8bd6e097e2..5a4d23a9e0 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -1,6 +1,9 @@ import { BigNumber } from 'bignumber.js'; import { ContractAbi, DecodedLogArgs, LogEntry, LogWithDecodedArgs, TransactionReceipt } from 'ethereum-types'; +// HACK: Rather then extending from OrderWithoutExchangeAddress +// we don't, because our docs don't expand inherited types, and it's unnecessarily +// confusing to introduce the user to the OrderWithoutExchangeAddress type. export interface Order { senderAddress: string; makerAddress: string;