|
|
@ -22,7 +22,8 @@ type swapServerClient interface {
|
|
|
|
GetLoopOutTerms(ctx context.Context) (
|
|
|
|
GetLoopOutTerms(ctx context.Context) (
|
|
|
|
*LoopOutTerms, error)
|
|
|
|
*LoopOutTerms, error)
|
|
|
|
|
|
|
|
|
|
|
|
GetLoopOutQuote(ctx context.Context, amt btcutil.Amount) (
|
|
|
|
GetLoopOutQuote(ctx context.Context, amt btcutil.Amount,
|
|
|
|
|
|
|
|
swapPublicationDeadline time.Time) (
|
|
|
|
*LoopOutQuote, error)
|
|
|
|
*LoopOutQuote, error)
|
|
|
|
|
|
|
|
|
|
|
|
GetLoopInTerms(ctx context.Context) (
|
|
|
|
GetLoopInTerms(ctx context.Context) (
|
|
|
@ -93,13 +94,15 @@ func (s *grpcSwapServerClient) GetLoopOutTerms(ctx context.Context) (
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
func (s *grpcSwapServerClient) GetLoopOutQuote(ctx context.Context,
|
|
|
|
func (s *grpcSwapServerClient) GetLoopOutQuote(ctx context.Context,
|
|
|
|
amt btcutil.Amount) (*LoopOutQuote, error) {
|
|
|
|
amt btcutil.Amount, swapPublicationDeadline time.Time) (
|
|
|
|
|
|
|
|
*LoopOutQuote, error) {
|
|
|
|
|
|
|
|
|
|
|
|
rpcCtx, rpcCancel := context.WithTimeout(ctx, globalCallTimeout)
|
|
|
|
rpcCtx, rpcCancel := context.WithTimeout(ctx, globalCallTimeout)
|
|
|
|
defer rpcCancel()
|
|
|
|
defer rpcCancel()
|
|
|
|
quoteResp, err := s.server.LoopOutQuote(rpcCtx,
|
|
|
|
quoteResp, err := s.server.LoopOutQuote(rpcCtx,
|
|
|
|
&looprpc.ServerLoopOutQuoteRequest{
|
|
|
|
&looprpc.ServerLoopOutQuoteRequest{
|
|
|
|
Amt: uint64(amt),
|
|
|
|
Amt: uint64(amt),
|
|
|
|
|
|
|
|
SwapPublicationDeadline: swapPublicationDeadline.Unix(),
|
|
|
|
},
|
|
|
|
},
|
|
|
|
)
|
|
|
|
)
|
|
|
|
if err != nil {
|
|
|
|
if err != nil {
|
|
|
|