Skip to content

Commit

Permalink
minty linty
Browse files Browse the repository at this point in the history
  • Loading branch information
gloriousCode committed Feb 24, 2020
1 parent b287f45 commit fa492e8
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 16 deletions.
2 changes: 1 addition & 1 deletion engine/fake_exchange_test.go
Expand Up @@ -31,7 +31,7 @@ type FakePassingExchange struct {
func addPassingFakeExchange(baseExchangeName string) error {
testExch := GetExchangeByName(baseExchangeName)
if testExch == nil {

return ErrExchangeNotFound
}
base := testExch.GetBase()
Bot.Config.Exchanges = append(Bot.Config.Exchanges, config.ExchangeConfig{
Expand Down
5 changes: 1 addition & 4 deletions engine/routines.go
Expand Up @@ -280,10 +280,7 @@ func WebsocketDataHandler(exchName string, data interface{}) error {
}
switch d := data.(type) {
case string:
switch d {
default:
log.Info(log.WebsocketMgr, d)
}
log.Info(log.WebsocketMgr, d)
case error:
return fmt.Errorf("routines.go exchange %s websocket error - %s", exchName, data)
case wshandler.TradeData:
Expand Down
22 changes: 11 additions & 11 deletions exchanges/coinut/coinut_test.go
Expand Up @@ -852,7 +852,7 @@ func TestWsOrder(t *testing.T) {
],
"order_id":1,
"open_qty": "0.01",
"inst_id":1,
"inst_id": 490590,
"qty":"0.01",
"client_ord_id": 1345,
"order_price":"750.581",
Expand All @@ -875,7 +875,7 @@ func TestWsOrder(t *testing.T) {
"nonce": 956475,
"order": {
"client_ord_id": 12345,
"inst_id": 1,
"inst_id": 490590,
"open_qty": "0.00000000",
"order_id": 721923,
"price": "748.00000000",
Expand Down Expand Up @@ -903,7 +903,7 @@ func TestWsOrder(t *testing.T) {
"order_id": 7171,
"open_qty": "100000.00000000",
"price": "750.60000000",
"inst_id": 1,
"inst_id": 490590,
"reasons": [
"NOT_ENOUGH_BALANCE"
],
Expand All @@ -930,7 +930,7 @@ func TestWsOrders(t *testing.T) {
"order_id": 331,
"open_qty": "0.01000000",
"price": "750.58100000",
"inst_id": 1,
"inst_id": 490590,
"client_ord_id": 1345,
"timestamp": 1490713990542441,
"reply": "order_accepted",
Expand All @@ -946,7 +946,7 @@ func TestWsOrders(t *testing.T) {
"order_id": 332,
"open_qty": "0.01000000",
"price": "750.32100000",
"inst_id": 1,
"inst_id": 490590,
"client_ord_id": 50001346,
"timestamp": 1490713990542441,
"reply": "order_accepted",
Expand All @@ -973,7 +973,7 @@ func TestWsOpenOrders(t *testing.T) {
"order_id": 35,
"open_qty": "0.01000000",
"price": "750.58200000",
"inst_id": 1,
"inst_id": 490590,
"client_ord_id": 4,
"timestamp": 1481138766081720,
"qty": "0.01000000",
Expand All @@ -983,7 +983,7 @@ func TestWsOpenOrders(t *testing.T) {
"order_id": 30,
"open_qty": "0.01000000",
"price": "750.58100000",
"inst_id": 1,
"inst_id": 490590,
"client_ord_id": 5,
"timestamp": 1481137697919617,
"qty": "0.01000000",
Expand Down Expand Up @@ -1024,13 +1024,13 @@ func TestWsCancelOrders(t *testing.T) {
{
"order_id": 329,
"status": "OK",
"inst_id": 1,
"inst_id": 490590,
"client_ord_id": 13561
},
{
"order_id": 332,
"status": "OK",
"inst_id": 1,
"inst_id": 490590,
"client_ord_id": 13562
}
],
Expand Down Expand Up @@ -1058,7 +1058,7 @@ func TestWsOrderHistory(t *testing.T) {
},
"order": {
"client_ord_id": 297125564,
"inst_id": 1,
"inst_id": 490590,
"open_qty": "0.00000000",
"order_id": 721327,
"price": "1.00000000",
Expand All @@ -1078,7 +1078,7 @@ func TestWsOrderHistory(t *testing.T) {
},
"order": {
"client_ord_id": 297118937,
"inst_id": 1,
"inst_id": 490590,
"open_qty": "0.00000000",
"order_id": 721326,
"price": "1.00000000",
Expand Down

0 comments on commit fa492e8

Please sign in to comment.