Skip to content

Commit

Permalink
Merge pull request #11245 from vegaprotocol/11244-spot-expiring-stop
Browse files Browse the repository at this point in the history
fix: typos expiringOrders -> expiringStopOrders
  • Loading branch information
wwestgarth authored May 7, 2024
2 parents bb48d38 + 24a189c commit c8c8c99
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions core/types/snapshot_nodes.go
Original file line number Diff line number Diff line change
Expand Up @@ -2901,6 +2901,7 @@ func ExecSpotMarketFromProto(em *snapshot.SpotMarket) *ExecSpotMarket {
AuctionState: AuctionStateFromProto(em.AuctionState),
PeggedOrders: PeggedOrdersStateFromProto(em.PeggedOrders),
ExpiringOrders: make([]*Order, 0, len(em.ExpiringOrders)),
ExpiringStopOrders: make([]*Order, 0, len(em.ExpiringStopOrders)),
LastEquityShareDistributed: em.LastEquityShareDistributed,
EquityShare: EquityShareFromProto(em.EquityShare),
LastBestAsk: lastBA,
Expand All @@ -2924,7 +2925,7 @@ func ExecSpotMarketFromProto(em *snapshot.SpotMarket) *ExecSpotMarket {
ret.ExpiringOrders = append(ret.ExpiringOrders, or)
}
for _, o := range em.ExpiringStopOrders {
ret.ExpiringStopOrders = append(ret.ExpiringOrders, &Order{ID: o.Id, ExpiresAt: o.ExpiresAt})
ret.ExpiringStopOrders = append(ret.ExpiringStopOrders, &Order{ID: o.Id, ExpiresAt: o.ExpiresAt})
}
return &ret
}
Expand All @@ -2936,6 +2937,7 @@ func (e ExecSpotMarket) IntoProto() *snapshot.SpotMarket {
AuctionState: e.AuctionState.IntoProto(),
PeggedOrders: e.PeggedOrders.IntoProto(),
ExpiringOrders: make([]*vega.Order, 0, len(e.ExpiringOrders)),
ExpiringStopOrders: make([]*vega.Order, 0, len(e.ExpiringStopOrders)),
LastEquityShareDistributed: e.LastEquityShareDistributed,
EquityShare: e.EquityShare.IntoProto(),
LastBestAsk: e.LastBestAsk.String(),
Expand All @@ -2962,7 +2964,7 @@ func (e ExecSpotMarket) IntoProto() *snapshot.SpotMarket {
ret.ExpiringOrders = append(ret.ExpiringOrders, o.IntoProto())
}
for _, o := range e.ExpiringStopOrders {
ret.ExpiringStopOrders = append(ret.ExpiringOrders, &vega.Order{Id: o.ID, ExpiresAt: o.ExpiresAt})
ret.ExpiringStopOrders = append(ret.ExpiringStopOrders, &vega.Order{Id: o.ID, ExpiresAt: o.ExpiresAt})
}
return &ret
}
Expand Down

0 comments on commit c8c8c99

Please sign in to comment.