Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 26 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
name: "Build Check"

on:
pull_request:
workflow_dispatch:

jobs:
build:
name: 'Build'
runs-on: ubuntu-latest

steps:
- name: 'Checkout source code'
uses: actions/checkout@v4

- uses: actions/setup-node@v4
with:
node-version-file: '.nvmrc'
registry-url: 'https://registry.npmjs.org/'
cache: 'npm'

- name: Install
run: npm ci --ignore-scripts

- name: Check Build
run: npm run build
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
node_modules
node_modules
dist
4 changes: 3 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@
"main": "index.js",
"scripts": {
"test": "echo \"Error: no test specified\" && exit 1",
"lint": "eslint -c .eslintrc.json"
"lint": "eslint -c .eslintrc.json",
"build": "tsc"

},
"dependencies": {
"accountstate": "^0.0.19",
Expand Down
3 changes: 1 addition & 2 deletions src/demos/react-bybit/src/index.tsx
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import "bootstrap/dist/css/bootstrap.min.css";
import ReactDOM from "react-dom/client"; // Correct import for React 18
import React from "react";
import App from "./App";
import "bootstrap/dist/css/bootstrap.min.css";

const root = ReactDOM.createRoot(
document.getElementById("root") as HTMLElement
Expand Down
7 changes: 4 additions & 3 deletions src/exchanges/bybit/orderbooks/local-orderbook.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { DefaultLogger, WebsocketClient } from 'bybit-api';
import { WebsocketClient } from 'bybit-api';
import {
OrderBookLevel,
OrderBookLevelState,
Expand Down Expand Up @@ -45,17 +45,18 @@ function handleOrderbookUpdate(message: WsMessage) {
const { topic, type, ts, data } = message;
const [topicKey, depth, symbol] = topic.split('.');


// Use the new function for both bid and ask levels
const levelsMapBid = mapOrderBookLevels(symbol, data.b, 'Buy');
const levelsMapAsk = mapOrderBookLevels(symbol, data.a, 'Sell');

//merge bid and ask levels into a single array
const levels = [...levelsMapBid, ...levelsMapAsk];

if (type === 'snapshot') {
if (type === 'snapshot' ) {
return OrderBooks.handleSnapshot(
symbol,
levels,
levels as any,
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why any, is this broken?

// message,
).print();
}
Expand Down
3 changes: 0 additions & 3 deletions src/exchanges/ftx/account-events/README.md

This file was deleted.

34 changes: 0 additions & 34 deletions src/exchanges/ftx/account-events/log-account-events.ts

This file was deleted.

2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,6 @@
"lib": ["es2020", "DOM"],
"baseUrl": "src"
},
"exclude": ["**/node_modules/*", "coverage", "bin", "docs", "test"],
"exclude": ["**/node_modules/*", "coverage", "bin", "docs", "test", "src/demos/react-bybit"],
"include": ["src/**/*"]
}