@@ -2,7 +2,6 @@ package options
2
2
3
3
import (
4
4
"encoding/json"
5
- "fmt"
6
5
"testing"
7
6
8
7
"github.com/stretchr/testify/suite"
@@ -245,9 +244,9 @@ func (s *orderServiceTestSuite) TestCreateBatchOrders() {
245
244
},
246
245
}
247
246
s .assertReq (func (r * request ) {
248
- packup := [](map [string ]string ){}
247
+ packup := [](map [string ]interface {} ){}
249
248
for _ , cos := range orderLists {
250
- t := map [string ]string {
249
+ t := map [string ]interface {} {
251
250
"symbol" : cos .symbol ,
252
251
"side" : string (cos .side ),
253
252
"type" : string (cos .orderType ),
@@ -261,16 +260,16 @@ func (s *orderServiceTestSuite) TestCreateBatchOrders() {
261
260
t ["timeInForce" ] = string (* cos .timeInForce )
262
261
}
263
262
if cos .reduceOnly != nil {
264
- t ["reduceOnly" ] = fmt . Sprintf ( "%v" , * cos .reduceOnly )
263
+ t ["reduceOnly" ] = * cos .reduceOnly
265
264
}
266
265
if cos .postOnly != nil {
267
- t ["postOnly" ] = fmt . Sprintf ( "%v" , * cos .postOnly )
266
+ t ["postOnly" ] = * cos .postOnly
268
267
}
269
268
if cos .clientOrderId != nil {
270
269
t ["clientOrderId" ] = * cos .clientOrderId
271
270
}
272
271
if cos .isMmp != nil {
273
- t ["isMmp" ] = fmt . Sprintf ( "%v" , * cos .isMmp )
272
+ t ["isMmp" ] = * cos .isMmp
274
273
}
275
274
packup = append (packup , t )
276
275
}
@@ -337,7 +336,7 @@ func (s *orderServiceTestSuite) TestCreateBatchOrders() {
337
336
Mmp : false ,
338
337
},
339
338
}
340
- s .assertOrdersEqual (returnOrders , orders )
339
+ s .assertOrdersEqual (orders , returnOrders )
341
340
}
342
341
343
342
func (s * orderServiceTestSuite ) TestGetOrder () {
0 commit comments