Skip to content

Commit fddad8a

Browse files
committed
looprpc: rename assetamt to max amt
1 parent 9d49804 commit fddad8a

File tree

7 files changed

+300
-295
lines changed

7 files changed

+300
-295
lines changed

client.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -703,11 +703,11 @@ func (s *Client) LoopOutQuote(ctx context.Context,
703703
}
704704

705705
loopOutQuote.LoopOutRfq = &LoopOutRfq{
706-
PrepayRfqId: prepayRfq.Id,
707-
PrepayAssetAmt: prepayRfq.AssetAmount,
708-
SwapRfqId: swapRfq.Id,
709-
SwapAssetAmt: swapRfq.AssetAmount,
710-
AssetName: assetName,
706+
PrepayRfqId: prepayRfq.Id,
707+
MaxPrepayAssetAmt: prepayRfq.AssetAmount,
708+
SwapRfqId: swapRfq.Id,
709+
MaxSwapAssetAmt: swapRfq.AssetAmount,
710+
AssetName: assetName,
711711
}
712712
}
713713

cmd/loop/quote.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -269,7 +269,7 @@ func printQuoteOutResp(req *looprpc.QuoteRequest,
269269

270270
if resp.AssetRfqInfo != nil {
271271
fmt.Printf(assetAmtFmt, "Send off-chain:",
272-
resp.AssetRfqInfo.SwapAssetAmt,
272+
resp.AssetRfqInfo.MaxSwapAssetAmt,
273273
resp.AssetRfqInfo.AssetName)
274274
} else {
275275
fmt.Printf(satAmtFmt, "Send off-chain:", req.Amt)
@@ -289,7 +289,7 @@ func printQuoteOutResp(req *looprpc.QuoteRequest,
289289
fmt.Println()
290290
if resp.AssetRfqInfo != nil {
291291
fmt.Printf(assetAmtFmt, "No show penalty (prepay):",
292-
resp.AssetRfqInfo.PrepayAssetAmt,
292+
resp.AssetRfqInfo.MaxPrepayAssetAmt,
293293
resp.AssetRfqInfo.AssetName)
294294
} else {
295295
fmt.Printf(satAmtFmt, "No show penalty (prepay):",

interface.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -224,16 +224,16 @@ type LoopOutRfq struct {
224224
// PrepayRfqId is the ID of the prepay RFQ.
225225
PrepayRfqId []byte
226226

227-
// PrepayAssetAmt is the amount of the asset that will be used to pay
228-
// for the prepay invoice.
229-
PrepayAssetAmt uint64
227+
// MaxPrepayAssetAmt is the maximum amount of the asset that will be
228+
// used to pay for the prepay invoice.
229+
MaxPrepayAssetAmt uint64
230230

231231
// SwapRfqId is the ID of the swap RFQ.
232232
SwapRfqId []byte
233233

234-
// SwapAssetAmt is the amount of the asset that will be used to pay for
235-
// the swap invoice.
236-
SwapAssetAmt uint64
234+
// MaxSwapAssetAmt is the maximum amount of the asset that will be used
235+
// to pay for the swap invoice.
236+
MaxSwapAssetAmt uint64
237237

238238
// AssetName is the human readable name of the asset.
239239
AssetName string

loopd/swapclient_server.go

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -802,11 +802,11 @@ func (s *swapClientServer) LoopOutQuote(ctx context.Context,
802802

803803
if quote.LoopOutRfq != nil {
804804
response.AssetRfqInfo = &looprpc.AssetRfqInfo{
805-
PrepayRfqId: quote.LoopOutRfq.PrepayRfqId,
806-
PrepayAssetAmt: quote.LoopOutRfq.PrepayAssetAmt,
807-
SwapRfqId: quote.LoopOutRfq.SwapRfqId,
808-
SwapAssetAmt: quote.LoopOutRfq.SwapAssetAmt,
809-
AssetName: quote.LoopOutRfq.AssetName,
805+
PrepayRfqId: quote.LoopOutRfq.PrepayRfqId,
806+
MaxPrepayAssetAmt: quote.LoopOutRfq.MaxPrepayAssetAmt,
807+
SwapRfqId: quote.LoopOutRfq.SwapRfqId,
808+
MaxSwapAssetAmt: quote.LoopOutRfq.MaxSwapAssetAmt,
809+
AssetName: quote.LoopOutRfq.AssetName,
810810
}
811811
}
812812

looprpc/client.pb.go

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

looprpc/client.proto

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2066,19 +2066,21 @@ message AssetRfqInfo {
20662066
bytes prepay_rfq_id = 1;
20672067

20682068
/*
2069-
The actual asset amt to prepay for the swap invoice.
2069+
The maximum asset amt we'll pay for the prepay payment. This includes the
2070+
max limit multiplier that was set in the request.
20702071
*/
2071-
uint64 prepay_asset_amt = 2;
2072+
uint64 max_prepay_asset_amt = 2;
20722073

20732074
/*
20742075
The Swap RFQ ID to use to pay for the swap invoice.
20752076
*/
20762077
bytes swap_rfq_id = 3;
20772078

20782079
/*
2079-
The actual asset amt to swap for the swap invoice.
2080+
The maximum asset amt we'll pay for the swap payment. This includes the
2081+
max limit multiplier that was set in the request.
20802082
*/
2081-
uint64 swap_asset_amt = 4;
2083+
uint64 max_swap_asset_amt = 4;
20822084

20832085
/*
20842086
The name of the asset to swap.

looprpc/client.swagger.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -731,20 +731,20 @@
731731
"format": "byte",
732732
"description": "The Prepay RFQ ID to use to pay for the prepay invoice."
733733
},
734-
"prepay_asset_amt": {
734+
"max_prepay_asset_amt": {
735735
"type": "string",
736736
"format": "uint64",
737-
"description": "The actual asset amt to prepay for the swap invoice."
737+
"description": "The maximum asset amt we'll pay for the prepay payment. This includes the\nmax limit multiplier that was set in the request."
738738
},
739739
"swap_rfq_id": {
740740
"type": "string",
741741
"format": "byte",
742742
"description": "The Swap RFQ ID to use to pay for the swap invoice."
743743
},
744-
"swap_asset_amt": {
744+
"max_swap_asset_amt": {
745745
"type": "string",
746746
"format": "uint64",
747-
"description": "The actual asset amt to swap for the swap invoice."
747+
"description": "The maximum asset amt we'll pay for the swap payment. This includes the\nmax limit multiplier that was set in the request."
748748
},
749749
"asset_name": {
750750
"type": "string",

0 commit comments

Comments
 (0)