Fix CoinbasePro websocket bug introduced in PR #262 (#269)

This commit is contained in:
Andrew
2019-04-04 10:19:48 +11:00
committed by Adrian Gallagher
parent 866efd069d
commit a0e291097e

View File

@@ -199,7 +199,7 @@ func (c *CoinbasePro) WsHandleData() {
// ProcessSnapshot processes the initial orderbook snap shot
func (c *CoinbasePro) ProcessSnapshot(snapshot *WebsocketOrderbookSnapshot) error {
var base *orderbook.Base
var base orderbook.Base
for _, bid := range snapshot.Bids {
price, err := strconv.ParseFloat(bid[0].(string), 64)
if err != nil {
@@ -234,7 +234,7 @@ func (c *CoinbasePro) ProcessSnapshot(snapshot *WebsocketOrderbookSnapshot) erro
base.AssetType = "SPOT"
base.Pair = pair
err := c.Websocket.Orderbook.LoadSnapshot(base, c.GetName(), false)
err := c.Websocket.Orderbook.LoadSnapshot(&base, c.GetName(), false)
if err != nil {
return err
}