diff --git a/client.go b/client.go index 37217ca0..3f0a45c8 100644 --- a/client.go +++ b/client.go @@ -843,6 +843,7 @@ func (s *Client) LoopInQuote(ctx context.Context, quote, err := s.Server.GetLoopInQuote( ctx, request.Amount, s.lndServices.NodePubkey, request.LastHop, request.RouteHints, request.Initiator, request.NumDeposits, + request.Fast, ) if err != nil { return nil, err diff --git a/loopin.go b/loopin.go index 59157e5a..8f3b8286 100644 --- a/loopin.go +++ b/loopin.go @@ -130,9 +130,11 @@ func newLoopInSwap(globalCtx context.Context, cfg *swapConfig, // channels is an LND side black box feature. Advanced users will quote // directly anyway and there they have the option to add specific route // hints. + numDeposits := uint32(0) + fast := false quote, err := cfg.server.GetLoopInQuote( globalCtx, request.Amount, cfg.lnd.NodePubkey, request.LastHop, - request.RouteHints, request.Initiator, 0, + request.RouteHints, request.Initiator, numDeposits, fast, ) if err != nil { return nil, wrapGrpcError("loop in terms", err) diff --git a/server_mock_test.go b/server_mock_test.go index d10223e7..43abf648 100644 --- a/server_mock_test.go +++ b/server_mock_test.go @@ -226,7 +226,7 @@ func (s *serverMock) GetLoopInTerms(ctx context.Context, initiator string) ( func (s *serverMock) GetLoopInQuote(context.Context, btcutil.Amount, route.Vertex, *route.Vertex, [][]zpay32.HopHint, string, - uint32) (*LoopInQuote, error) { + uint32, bool) (*LoopInQuote, error) { return &LoopInQuote{ SwapFee: testSwapFee, diff --git a/swap_server_client.go b/swap_server_client.go index 4de4a588..dfe125d1 100644 --- a/swap_server_client.go +++ b/swap_server_client.go @@ -82,7 +82,8 @@ type swapServerClient interface { GetLoopInQuote(ctx context.Context, amt btcutil.Amount, pubKey route.Vertex, lastHop *route.Vertex, routeHints [][]zpay32.HopHint, - initiator string, numDeposits uint32) (*LoopInQuote, error) + initiator string, numDeposits uint32, + fast bool) (*LoopInQuote, error) Probe(ctx context.Context, amt btcutil.Amount, target route.Vertex, lastHop *route.Vertex, routeHints [][]zpay32.HopHint) error @@ -269,7 +270,7 @@ func (s *grpcSwapServerClient) GetLoopInTerms(ctx context.Context, func (s *grpcSwapServerClient) GetLoopInQuote(ctx context.Context, amt btcutil.Amount, pubKey route.Vertex, lastHop *route.Vertex, routeHints [][]zpay32.HopHint, initiator string, - numDeposits uint32) (*LoopInQuote, error) { + numDeposits uint32, fast bool) (*LoopInQuote, error) { err := s.Probe(ctx, amt, pubKey, lastHop, routeHints) if err != nil && status.Code(err) != codes.Unavailable { @@ -285,6 +286,7 @@ func (s *grpcSwapServerClient) GetLoopInQuote(ctx context.Context, Pubkey: pubKey[:], UserAgent: UserAgent(initiator), NumStaticAddressDeposits: numDeposits, + Fast: fast, } if lastHop != nil {