Skip to content

Commit

Permalink
Revert pin dependencies. Use commonJS and add build to prepare step. …
Browse files Browse the repository at this point in the history
…Update wyvern-js and wyvern-schemas to clean up some dependencies (#309)

* Use CommonJS and add prepare step

* 1.2.8-beta.0

* 1.2.8-beta.1.0

* Ignore unused modules

* 1.2.8-beta.1.1

* Export

* 1.2.8-beta.1.2

* Revert pin dependencies

* 1.2.8-beta.1.3

* Revert to specific package json

* Revert to 441ca7c

* Updated wyvern js and yarnlock

* Updated wyvern js and yarnlock

* Git ignore lib

* Publish

* Update wyvern-schemas

* 1.5.0

* Update package json to before

* Update yarn lock

* 1.2.8-beta.1.5.1.0

* Update version

* Adjustments

* Adjustment final

* Revert ver

* Trigger Build

* Use Alex_Address2 for get maker buy orders
  • Loading branch information
sunwrobert committed Jan 3, 2022
1 parent a41a6df commit b29d9c4
Show file tree
Hide file tree
Showing 5 changed files with 74 additions and 90 deletions.
42 changes: 21 additions & 21 deletions package.json
Expand Up @@ -23,7 +23,7 @@
"docs-build": "typedoc --out docs src/index.ts",
"eslint:check": "eslint . --max-warnings 0 --ext .js,.ts",
"lint:check": "concurrently \"yarn check-types\" \"yarn prettier:check\" \"yarn eslint:check\"",
"prepare": "husky install",
"prepare": "husky install && npm run build",
"test": "TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' TS_NODE_TRANSPILE_ONLY=true nyc mocha -r ts-node/register src/__tests__/**/*.ts --timeout 15000",
"prettier:check": "prettier --check .",
"prettier:check:package.json": "yarn prettier-package-json --list-different",
Expand All @@ -39,39 +39,39 @@
"lodash": "^4.17.21",
"query-string": "^6.11.1",
"web3": "0.20.7",
"wyvern-js": "git+https://github.com/ProjectOpenSea/wyvern-js.git#v3.2.1",
"wyvern-schemas": "git+https://github.com/ProjectOpenSea/wyvern-schemas.git#v0.13.1"
"wyvern-js": "git+https://github.com/ProjectOpenSea/wyvern-js.git#v3.3.0",
"wyvern-schemas": "git+https://github.com/ProjectOpenSea/wyvern-schemas.git#v0.14.0"
},
"devDependencies": {
"@types/chai": "4.3.0",
"@types/fbemitter": "2.0.32",
"@types/lodash": "4.14.178",
"@types/mocha": "9.0.0",
"@types/node": "9.6.61",
"@types/query-string": "6.3.0",
"@typescript-eslint/eslint-plugin": "5.7.0",
"@typescript-eslint/parser": "5.7.0",
"@types/fbemitter": "^2.0.32",
"@types/lodash": "^4.14.178",
"@types/mocha": "^9.0.0",
"@types/node": "^9.3.0",
"@types/query-string": "^6.1.0",
"@typescript-eslint/eslint-plugin": "^5.7.0",
"@typescript-eslint/parser": "^5.7.0",
"chai": "4.3.4",
"concurrently": "6.4.0",
"confusing-browser-globals": "1.0.11",
"coveralls": "3.1.1",
"eslint": "8.4.1",
"eslint-config-prettier": "8.3.0",
"eslint-plugin-import": "2.25.3",
"eslint-plugin-jest": "25.3.0",
"eslint-plugin-prettier": "4.0.0",
"confusing-browser-globals": "^1.0.11",
"coveralls": "^3.1.1",
"eslint": "^8.4.1",
"eslint-config-prettier": "^8.3.0",
"eslint-plugin-import": "^2.25.3",
"eslint-plugin-jest": "^25.3.0",
"eslint-plugin-prettier": "^4.0.0",
"husky": "7.0.4",
"lint-staged": "12.1.2",
"mocha": "9.1.3",
"nyc": "15.1.0",
"mocha": "^9.1.3",
"nyc": "^15.1.0",
"prettier": "2.5.1",
"prettier-package-json": "2.6.0",
"ts-node": "10.4.0",
"typedoc": "0.22.10",
"types-bn": "0.0.1",
"types-bn": "^0.0.1",
"types-ethereumjs-util": "0.0.8",
"typescript": "4.5.4",
"web3-typescript-typings": "0.9.11"
"web3-typescript-typings": "^0.9.3"
},
"keywords": [
"collectibles",
Expand Down
5 changes: 3 additions & 2 deletions src/__tests__/api/api.ts
Expand Up @@ -13,6 +13,7 @@ import { Network, OrderSide } from "../../types";
import { getOrderHash, makeBigNumber } from "../../utils/utils";
import {
ALEX_ADDRESS,
ALEX_ADDRESS_2,
apiToTest,
CK_ADDRESS,
CK_RINKEBY_ADDRESS,
Expand Down Expand Up @@ -226,13 +227,13 @@ suite("api", () => {

test("API fetches buy orders for maker", async () => {
const forMaker = await apiToTest.getOrders({
maker: "0x5a237d6ce6d1fa3766fc15256cbfb8bdcf5a5b8a",
maker: ALEX_ADDRESS_2,
side: OrderSide.Buy,
});
assert.isAbove(forMaker.orders.length, 0);
assert.isAbove(forMaker.count, 0);
forMaker.orders.forEach((order) => {
assert.equal("0x5a237d6ce6d1fa3766fc15256cbfb8bdcf5a5b8a", order.maker);
assert.equal(ALEX_ADDRESS_2, order.maker);
assert.equal(OrderSide.Buy, order.side);
});
});
Expand Down
7 changes: 5 additions & 2 deletions src/types.ts
@@ -1,3 +1,4 @@
/* eslint-disable import/no-unused-modules */
import BigNumber from "bignumber.js";
import * as Web3 from "web3";
import {
Expand Down Expand Up @@ -131,7 +132,7 @@ export enum SaleKind {
* Types of asset contracts
* Given by the asset_contract_type in the OpenSea API
*/
enum AssetContractType {
export enum AssetContractType {
Fungible = "fungible",
SemiFungible = "semi-fungible",
NonFungible = "non-fungible",
Expand Down Expand Up @@ -554,7 +555,9 @@ interface ExchangeMetadataForBundle {
referrerAddress?: string;
}

type ExchangeMetadata = ExchangeMetadataForAsset | ExchangeMetadataForBundle;
export type ExchangeMetadata =
| ExchangeMetadataForAsset
| ExchangeMetadataForBundle;

export interface UnhashedOrder extends WyvernOrder {
feeMethod: FeeMethod;
Expand Down
2 changes: 1 addition & 1 deletion tsconfig.json
Expand Up @@ -23,7 +23,7 @@
"strict": true,
"declaration": true,
"esModuleInterop": true,
"module": "esnext",
"module": "commonjs",
"moduleResolution": "node",
"resolveJsonModule": true,
"isolatedModules": true,
Expand Down

0 comments on commit b29d9c4

Please sign in to comment.