Skip to content

Commit

Permalink
feat(rpc): add hold field to orders (#645)
Browse files Browse the repository at this point in the history
This adds a `hold` field to all `Order` messages from the gRPC service.
This means calls like `getorders` will now indicate whether any orders
are on hold due to a swap.
  • Loading branch information
ImmanuelSegol authored and sangaman committed Nov 13, 2018
1 parent 8b1199f commit 27ec3c2
Show file tree
Hide file tree
Showing 6 changed files with 41 additions and 1 deletion.
1 change: 1 addition & 0 deletions docs/api.md

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 1 addition & 0 deletions lib/grpc/GrpcService.ts
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ const createOrder = (order: Order) => {
grpcOrder.setCreatedAt(order.createdAt);
grpcOrder.setId(order.id);
if (isOwnOrder(order)) {
grpcOrder.setHold(order.hold);
grpcOrder.setLocalId((order).localId);
grpcOrder.setIsOwnOrder(true);
} else {
Expand Down
5 changes: 5 additions & 0 deletions lib/proto/xudrpc.swagger.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions lib/proto/xudrpc_pb.d.ts

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 28 additions & 1 deletion lib/proto/xudrpc_pb.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 2 additions & 0 deletions proto/xudrpc.proto
Original file line number Diff line number Diff line change
Expand Up @@ -387,6 +387,8 @@ message Order {
OrderSide side = 8 [json_name = "side"];
// Whether this order is a local own order or a remote peer order.
bool is_own_order = 9 [json_name = "is_own_order"];
// The amount on hold pending swap exectuion.
double hold = 10 [json_name = "hold"];
}

message OrderRemoval {
Expand Down

0 comments on commit 27ec3c2

Please sign in to comment.