mirror of
https://github.com/aljazceru/btcpayserver.git
synced 2026-02-19 05:04:28 +01:00
24 lines
596 B
C#
24 lines
596 B
C#
using System;
|
|
using System.Net.Http;
|
|
using BTCPayServer.AtomicSwaps;
|
|
|
|
namespace BTCPayServer.Services
|
|
{
|
|
public class AtomicSwapClientFactory
|
|
{
|
|
public AtomicSwapClientFactory(IHttpClientFactory httpClientFactory)
|
|
{
|
|
HttpClientFactory = httpClientFactory;
|
|
}
|
|
|
|
public IHttpClientFactory HttpClientFactory { get; }
|
|
|
|
public AtomicSwapClient Create(Uri serverUri)
|
|
{
|
|
var client = new AtomicSwapClient(serverUri);
|
|
client.SetClient(HttpClientFactory.CreateClient());
|
|
return client;
|
|
}
|
|
}
|
|
}
|