Skip to content

Commit 21fb82b

Browse files
authored
Merge pull request #1774 from lightninglabs/fix/rfq-order-optional-peer
rfqrpc+rpcserver: fix peer_pub_key doc and simplify comments
2 parents 3f330b1 + d1bc9e4 commit 21fb82b

File tree

5 files changed

+12
-12
lines changed

5 files changed

+12
-12
lines changed

docs/release-notes/release-notes-0.7.0.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,10 @@
3535
optimized sending to V2 TAP addresses by removing the need for creating
3636
tombstone outputs on a full-value send (by using interactive transfers for V2
3737
addresses).
38+
- [Updated](https://github.com/lightninglabs/taproot-assets/pull/1774)
39+
`BuyOrderRequest` and `SellOrderRequest` proto docs to mark `peer_pub_key` as
40+
required. Previously, the field was incorrectly documented as optional.
41+
This change corrects the documentation to match the current implementation.
3842

3943
# New Features
4044

rpcserver.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7715,7 +7715,7 @@ func (r *rpcServer) AddAssetBuyOrder(ctx context.Context,
77157715
return nil, fmt.Errorf("error unmarshalling buy order: %w", err)
77167716
}
77177717

7718-
// Currently, we require the peer to be specified in the buy order.
7718+
// Currently, we require the peer to be specified.
77197719
peer, err := buyOrder.Peer.UnwrapOrErr(
77207720
fmt.Errorf("buy order peer must be specified"),
77217721
)
@@ -7932,7 +7932,7 @@ func (r *rpcServer) AddAssetSellOrder(ctx context.Context,
79327932
err)
79337933
}
79347934

7935-
// Currently, we require the peer to be specified in the buy order.
7935+
// Currently, we require the peer to be specified.
79367936
peer, err := sellOrder.Peer.UnwrapOrErr(
79377937
fmt.Errorf("sell order peer must be specified"),
79387938
)

taprpc/rfqrpc/rfq.pb.go

Lines changed: 2 additions & 4 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

taprpc/rfqrpc/rfq.proto

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -131,8 +131,7 @@ message AddAssetBuyOrderRequest {
131131
// The unix timestamp in seconds after which the order is no longer valid.
132132
uint64 expiry = 3;
133133

134-
// peer_pub_key is an optional field for specifying the public key of the
135-
// intended recipient peer for the order.
134+
// The public key of the intended recipient peer for the order.
136135
bytes peer_pub_key = 4;
137136

138137
// timeout_seconds is the number of seconds to wait for the peer to respond
@@ -183,8 +182,7 @@ message AddAssetSellOrderRequest {
183182
// The unix timestamp in seconds after which the order is no longer valid.
184183
uint64 expiry = 3;
185184

186-
// peer_pub_key is an optional field for specifying the public key of the
187-
// intended recipient peer for the order.
185+
// The public key of the intended recipient peer for the order.
188186
bytes peer_pub_key = 4;
189187

190188
// timeout_seconds is the number of seconds to wait for the peer to respond

taprpc/rfqrpc/rfq.swagger.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@
475475
"peer_pub_key": {
476476
"type": "string",
477477
"format": "byte",
478-
"description": "peer_pub_key is an optional field for specifying the public key of the\nintended recipient peer for the order."
478+
"description": "The public key of the intended recipient peer for the order."
479479
},
480480
"timeout_seconds": {
481481
"type": "integer",
@@ -560,7 +560,7 @@
560560
"peer_pub_key": {
561561
"type": "string",
562562
"format": "byte",
563-
"description": "peer_pub_key is an optional field for specifying the public key of the\nintended recipient peer for the order."
563+
"description": "The public key of the intended recipient peer for the order."
564564
},
565565
"timeout_seconds": {
566566
"type": "integer",

0 commit comments

Comments
 (0)