-
-
Notifications
You must be signed in to change notification settings - Fork 47
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upgrade to API 10.32.01 #227
Conversation
@@ -1461,6 +1484,12 @@ export class Decoder { | |||
contract.longName = this.readStr(); | |||
} | |||
|
|||
if (this.serverVersion >= MIN_SERVER_VER.BOND_TRADING_HOURS) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar blocks of code found in 3 locations. Consider refactoring.
|
||
if (this.serverVersion < MIN_SERVER_VER.CME_TAGGING_FIELDS) { | ||
if (order.manualOrderIndicator) { | ||
return this.emitError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid too many return
statements within this function.
@@ -1177,6 +1216,26 @@ | |||
} | |||
} | |||
|
|||
if (this.serverVersion < MIN_SERVER_VER.INCLUDE_OVERNIGHT) { | |||
if (order.includeOvernight) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid too many return
statements within this function.
@@ -2144,18 +2219,43 @@ | |||
/** | |||
* Encode a REQ_GLOBAL_CANCEL message. | |||
*/ | |||
reqGlobalCancel(): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function reqGlobalCancel
has 29 lines of code (exceeds 25 allowed). Consider refactoring.
@@ -526,12 +532,10 @@ | |||
/** | |||
* Encode a CANCEL_ORDER message to an array of tokens. | |||
*/ | |||
cancelOrder(orderId: number, manualCancelOrderTime?: string): void { | |||
const version = 1; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function cancelOrder
has 42 lines of code (exceeds 25 allowed). Consider refactoring.
@@ -1177,6 +1216,26 @@ function tagValuesToTokens(tagValues: TagValue[]): unknown[] { | |||
} | |||
} | |||
|
|||
if (this.serverVersion < MIN_SERVER_VER.INCLUDE_OVERNIGHT) { | |||
if (order.includeOvernight) { | |||
return this.emitError( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Avoid too many return
statements within this function.
@@ -2144,18 +2219,43 @@ function tagValuesToTokens(tagValues: TagValue[]): unknown[] { | |||
/** | |||
* Encode a REQ_GLOBAL_CANCEL message. | |||
*/ | |||
reqGlobalCancel(): void { | |||
reqGlobalCancel(orderCancel?: OrderCancel): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function reqGlobalCancel
has a Cognitive Complexity of 8 (exceeds 5 allowed). Consider refactoring.
@@ -2144,18 +2219,43 @@ function tagValuesToTokens(tagValues: TagValue[]): unknown[] { | |||
/** | |||
* Encode a REQ_GLOBAL_CANCEL message. | |||
*/ | |||
reqGlobalCancel(): void { | |||
reqGlobalCancel(orderCancel?: OrderCancel): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function reqGlobalCancel
has 29 lines of code (exceeds 25 allowed). Consider refactoring.
cancelOrder(orderId: number, manualCancelOrderTime?: string): void { | ||
const version = 1; | ||
|
||
cancelOrder(orderId: number, orderCancel?: OrderCancel): void { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Function cancelOrder
has a Cognitive Complexity of 10 (exceeds 5 allowed). Consider refactoring.
Code Climate has analyzed commit 54df66f and detected 9 issues on this pull request. Here's the issue category breakdown:
View more on Code Climate. |
Test Suites: 1 failed, 44 passed, 45 total
Tests: 1 failed, 111 passed, 112 total
Snapshots: 0 total
Time: 91.715 s
Ran all test suites.