Skip to content

Commit

Permalink
Fixed test error
Browse files Browse the repository at this point in the history
  • Loading branch information
jjjjpppp committed Jul 17, 2020
1 parent 272d5a8 commit f131ff2
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions v2/models/order.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ type Order struct {
IcebergTotalQuantity string `json:"iceberg_total_quantity"`
Side string `json:"side"`
FilledQuantity string `json:"filled_quantity"`
Price string `json:"price"`
Price float64 `json:"price"`
CreatedAt uint `json:"created_at"`
UpdatedAt uint `json:"updated_at"`
Status string `json:"status"`
Expand All @@ -31,7 +31,7 @@ type Order struct {
type OrderExecutions []struct {
ID uint64 `json:"id"`
Quantity string `json:"quantity"`
Price string `json:"price"`
Price float64`json:"price"`
TakerSide string `json:"taker_side"`
MySide string `json:"my_side"`
CreatedAt uint `json:"created_at"`
Expand Down
24 changes: 12 additions & 12 deletions v2/testutil/test_util.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ func GetOrderJsonResponse() string {
"iceberg_total_quantity": "0.0",
"side": "sell",
"filled_quantity": "0.01",
"price": "500.0",
"price": 500.0,
"created_at": 1462123639,
"updated_at": 1462123639,
"status": "filled",
Expand All @@ -63,7 +63,7 @@ func GetOrderJsonResponse() string {
{
"id": 4566133,
"quantity": "0.01",
"price": "500.0",
"price": 500.0,
"taker_side": "buy",
"my_side": "sell",
"created_at": 1465396785
Expand Down Expand Up @@ -140,7 +140,7 @@ func GetExpectedOrderModel() *models.Order {
IcebergTotalQuantity: "0.0",
Side: "sell",
FilledQuantity: "0.01",
Price: "500.0",
Price: 500.0,
CreatedAt: 1462123639,
UpdatedAt: 1462123639,
Status: "filled",
Expand All @@ -155,7 +155,7 @@ func GetExpectedOrderModel() *models.Order {
{
ID: 4566133,
Quantity: "0.01",
Price: "500.0",
Price: 500.0,
TakerSide: "buy",
MySide: "sell",
CreatedAt: 1465396785,
Expand Down Expand Up @@ -328,7 +328,7 @@ func GetCreateAnOrderJsonResponse() string {
"iceberg_total_quantity": "0.0",
"side": "sell",
"filled_quantity": "0.0",
"price": "500.0",
"price": 500.0,
"created_at": 1462123639,
"updated_at": 1462123639,
"status": "live",
Expand Down Expand Up @@ -364,7 +364,7 @@ func GetExpectedCreateAnOrderModel() *models.Order {
IcebergTotalQuantity: "0.0",
Side: "sell",
FilledQuantity: "0.0",
Price: "500.0",
Price: 500.0,
CreatedAt: 1462123639,
UpdatedAt: 1462123639,
Status: "live",
Expand All @@ -389,7 +389,7 @@ func GetOrdersJsonResponse() string {
"iceberg_total_quantity": "0.0",
"side": "sell",
"filled_quantity": "0.0",
"price": "500.0",
"price": 500.0,
"created_at": 1462123639,
"updated_at": 1462123639,
"status": "live",
Expand Down Expand Up @@ -417,7 +417,7 @@ func GetExpectedOrdersModel() *models.Orders {
IcebergTotalQuantity: "0.0",
Side: "sell",
FilledQuantity: "0.0",
Price: "500.0",
Price: 500.0,
CreatedAt: 1462123639,
UpdatedAt: 1462123639,
Status: "live",
Expand All @@ -442,7 +442,7 @@ func GetCancelAnOrderJsonResponse() string {
"iceberg_total_quantity": "0.0",
"side": "sell",
"filled_quantity": "0.0",
"price": "500.0",
"price": 500.0,
"created_at": 1462123639,
"updated_at": 1462123639,
"status": "cancelled",
Expand All @@ -464,7 +464,7 @@ func GetExpectedCancelAnOrderModel() *models.Order {
IcebergTotalQuantity: "0.0",
Side: "sell",
FilledQuantity: "0.0",
Price: "500.0",
Price: 500.0,
CreatedAt: 1462123639,
UpdatedAt: 1462123639,
Status: "cancelled",
Expand All @@ -486,7 +486,7 @@ func GetEditALiveOrderJsonResponse() string {
"iceberg_total_quantity": "0.0",
"side": "sell",
"filled_quantity": "0.0",
"price": "520.0",
"price": 520.0,
"created_at": 1462123639,
"updated_at": 1462123639,
"status": "live",
Expand Down Expand Up @@ -517,7 +517,7 @@ func GetExpectedEditALiveOrderModel() *models.Order {
IcebergTotalQuantity: "0.0",
Side: "sell",
FilledQuantity: "0.0",
Price: "520.0",
Price: 520.0,
CreatedAt: 1462123639,
UpdatedAt: 1462123639,
Status: "live",
Expand Down

0 comments on commit f131ff2

Please sign in to comment.