Skip to content

Commit

Permalink
Merge pull request #257 from vegaprotocol/256-fix-batch-orders
Browse files Browse the repository at this point in the history
Fix batch orders
  • Loading branch information
peterbarrow authored Jan 24, 2023
2 parents bb23f20 + 9c538a0 commit 0a906df
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,7 @@
- [247](https://github.com/vegaprotocol/vegatools/issues/247) - Made ganache value optional for perftool
- [251](https://github.com/vegaprotocol/vegatools/issues/251) - Changed code to use wallet V2 and updated protobuf mod to correct version
- [254](https://github.com/vegaprotocol/vegatools/issues/254) - Updated auth to use VWT header value
- [256](https://github.com/vegaprotocol/vegatools/issues/256) - Fix batch orders

### 🐛 Fixes
- [78](https://github.com/vegaprotocol/vegatools/pull/78) - Fix build with missing dependency
Expand Down
2 changes: 2 additions & 0 deletions perftest/perftest.go
Original file line number Diff line number Diff line change
Expand Up @@ -314,6 +314,7 @@ func (p *perfLoadTesting) seedPriceLevels(marketIDs []string, users, priceLevels
Size: 1,
Side: proto.Side_SIDE_BUY,
Type: proto.Order_TYPE_LIMIT,
Reference: "PriceLevelBuyOrder",
TimeInForce: proto.Order_TIME_IN_FORCE_GTC})
if err != nil {
log.Println("Failed to send price level buy order", err)
Expand All @@ -329,6 +330,7 @@ func (p *perfLoadTesting) seedPriceLevels(marketIDs []string, users, priceLevels
Size: 1,
Side: proto.Side_SIDE_SELL,
Type: proto.Order_TYPE_LIMIT,
Reference: "PriceLevelSellOrder",
TimeInForce: proto.Order_TIME_IN_FORCE_GTC})
if err != nil {
log.Println("Failed to send price level buy order", err)
Expand Down
13 changes: 5 additions & 8 deletions perftest/wallet.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,6 @@ import (

proto "code.vegaprotocol.io/vega/protos/vega"
commandspb "code.vegaprotocol.io/vega/protos/vega/commands/v1"
walletpb "code.vegaprotocol.io/vega/protos/vega/wallet/v1"
)

// WalletWrapper holds details about the wallet
Expand Down Expand Up @@ -209,14 +208,12 @@ func (w *walletWrapper) SendBatchOrders(user UserDetails,
amends []*commandspb.OrderAmendment,
orders []*commandspb.OrderSubmission) error {

command := &walletpb.SubmitTransactionRequest_BatchMarketInstructions{
BatchMarketInstructions: &commandspb.BatchMarketInstructions{},
}
command.BatchMarketInstructions.Cancellations = cancels
command.BatchMarketInstructions.Amendments = amends
command.BatchMarketInstructions.Submissions = orders
command := &commandspb.BatchMarketInstructions{}
command.Cancellations = cancels
command.Amendments = amends
command.Submissions = orders

_, err := w.sendTransaction(user, "orderSubmission", command)
_, err := w.sendTransaction(user, "batchMarketInstructions", command)
return err
}

Expand Down

0 comments on commit 0a906df

Please sign in to comment.