mirror of
https://github.com/d0zingcat/gocryptotrader.git
synced 2026-06-02 15:10:46 +00:00
btcm: add modify order functionality, change return to pointer (#940)
* btcm: add modify order functionality, change return to pointer * glorious: nits * glorious: nits * btcm: Adjust function name * thrasher: nits * thrasher: nits cont...
This commit is contained in:
@@ -401,7 +401,7 @@ func (m *OrderManager) Modify(ctx context.Context, mod *order.Modify) (*order.Mo
|
||||
//
|
||||
// XXX: This comes with a race condition, because [request -> changes] are not
|
||||
// atomic.
|
||||
err = m.orderStore.modifyExisting(mod.ID, &res)
|
||||
err = m.orderStore.modifyExisting(mod.ID, res)
|
||||
|
||||
// Notify observers.
|
||||
var message string
|
||||
|
||||
@@ -84,10 +84,10 @@ func (f omfExchange) GetActiveOrders(ctx context.Context, req *order.GetOrdersRe
|
||||
}}, nil
|
||||
}
|
||||
|
||||
func (f omfExchange) ModifyOrder(ctx context.Context, action *order.Modify) (order.Modify, error) {
|
||||
func (f omfExchange) ModifyOrder(ctx context.Context, action *order.Modify) (*order.Modify, error) {
|
||||
ans := *action
|
||||
ans.ID = "modified_order_id"
|
||||
return ans, nil
|
||||
return &ans, nil
|
||||
}
|
||||
|
||||
func TestSetupOrderManager(t *testing.T) {
|
||||
|
||||
Reference in New Issue
Block a user