Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/master' into feat/goerli
Browse files Browse the repository at this point in the history
  • Loading branch information
lightsing committed Nov 22, 2021
2 parents 148c2a1 + 95ee976 commit 04662ce
Show file tree
Hide file tree
Showing 6 changed files with 18 additions and 17 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/integration-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,8 +118,8 @@ jobs:
- name: Run trading tests
run: |
cd ./examples/js/
npx ts-node trade.ts
npx ts-node tests/trade.ts
sleep 5
npx ts-node print_orders.ts
npx ts-node tests/print_orders.ts
npx ts-node tests/transfer.ts
npx ts-node tests/put_batch_orders.ts
1 change: 1 addition & 0 deletions examples/js/.nvmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
16.12.0
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import axios from "axios";
import { strict as assert } from "assert";
import "./config";
import "../config";

const isCI = !!process.env.GITHUB_ACTIONS;

Expand Down
8 changes: 4 additions & 4 deletions examples/js/stress.ts → examples/js/tests/stress.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { market, userId } from "./config"; // dotenv
import { defaultClient as client } from "./client";
import { market, userId } from "../config"; // dotenv
import { defaultClient as client } from "../client";

import { sleep, decimalAdd, assertDecimalEqual } from "./util";
import { sleep, decimalAdd, assertDecimalEqual } from "../util";

import { depositAssets, printBalance, putRandOrder } from "./exchange_helper";
import { depositAssets, printBalance, putRandOrder } from "../exchange_helper";

async function stressTest({ parallel, interval, repeat }) {
const tradeCountBefore = (await client.marketSummary(market)).trade_count;
Expand Down
8 changes: 4 additions & 4 deletions examples/js/tick.ts → examples/js/tests/tick.ts
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import { ORDER_SIDE_BID, ORDER_SIDE_ASK } from "./config";
import { defaultClient as client } from "./client";
import { sleep, getRandomFloatAround, getRandomFloatAroundNormal, getRandomElem } from "./util";
import { ORDER_SIDE_BID, ORDER_SIDE_ASK } from "../config";
import { defaultClient as client } from "../client";
import { sleep, getRandomFloatAround, getRandomFloatAroundNormal, getRandomElem } from "../util";
import { Account } from "fluidex.js";
import { getTestAccount } from "./accounts";
import { getTestAccount } from "../accounts";
import { strict as assert } from "assert";
import { depositAssets, getPriceOfCoin, putLimitOrder } from "./exchange_helper";
import Decimal from "decimal.js";
Expand Down
12 changes: 6 additions & 6 deletions examples/js/trade.ts → examples/js/tests/trade.ts
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import { userId, base, quote, market, fee, ORDER_SIDE_BID, ORDER_SIDE_ASK, ORDER_TYPE_MARKET, ORDER_TYPE_LIMIT } from "./config"; // dotenv
import { getTestAccount } from "./accounts";
import { defaultClient as client } from "./client";
import { sleep, assertDecimalEqual } from "./util";
import { depositAssets } from "./exchange_helper";
import { KafkaConsumer } from "./kafka_client";
import { userId, base, quote, market, fee, ORDER_SIDE_BID, ORDER_SIDE_ASK, ORDER_TYPE_MARKET, ORDER_TYPE_LIMIT } from "../config"; // dotenv
import { getTestAccount } from "../accounts";
import { defaultClient as client } from "../client";
import { sleep, assertDecimalEqual } from "../util";
import { depositAssets } from "../exchange_helper";
import { KafkaConsumer } from "../kafka_client";

import { Account } from "fluidex.js";
import Decimal from "decimal.js";
Expand Down

0 comments on commit 04662ce

Please sign in to comment.