looprpc+cmd: deprecate dynamic terms

We move destination and cltv to QuoteResponse, and deprecate the
non-static fields.

Terms will now only show max/min swap sizes.
This commit is contained in:
Johan T. Halseth 2019-10-08 22:28:20 +02:00
parent 5fd51c0a3f
commit 0cff92d265
No known key found for this signature in database
GPG key ID: 15BAADA29DA20D26
5 changed files with 114 additions and 184 deletions

View file

@ -244,10 +244,6 @@ func (s *swapClientServer) LoopOutTerms(ctx context.Context,
return &looprpc.TermsResponse{
MinSwapAmount: int64(terms.MinSwapAmount),
MaxSwapAmount: int64(terms.MaxSwapAmount),
PrepayAmt: int64(terms.PrepayAmt),
SwapFeeBase: int64(terms.SwapFeeBase),
SwapFeeRate: int64(terms.SwapFeeRate),
CltvDelta: int32(terms.CltvDelta),
}, nil
}
@ -269,6 +265,7 @@ func (s *swapClientServer) LoopOutQuote(ctx context.Context,
if err != nil {
return nil, err
}
return &looprpc.QuoteResponse{
MinerFee: int64(quote.MinerFee),
PrepayAmt: int64(quote.PrepayAmount),
@ -291,9 +288,6 @@ func (s *swapClientServer) GetLoopInTerms(ctx context.Context, req *looprpc.Term
return &looprpc.TermsResponse{
MinSwapAmount: int64(terms.MinSwapAmount),
MaxSwapAmount: int64(terms.MaxSwapAmount),
SwapFeeBase: int64(terms.SwapFeeBase),
SwapFeeRate: int64(terms.SwapFeeRate),
CltvDelta: int32(terms.CltvDelta),
}, nil
}