Remove using of api key for sideshift.
M committed
Aug 9, 2022 at 17:51 UTC
d62131e649ae28fdac9744c48708ef57eb8aee48
1 file changed
+2
-4
lib/exchange/sideshift/sideshift_exchange_provider.dart
+2
-4
@@ -25,14 +25,12 @@ class SideShiftExchangeProvider extends ExchangeProvider {
25
.expand((i) => i)
26
.toList());
27
28
- static const apiKey = secrets.sideShiftApiKey;
28
static const affiliateId = secrets.sideShiftAffiliateId;
29
static const apiBaseUrl = 'https://sideshift.ai/api';
30
static const rangePath = '/v1/pairs';
31
static const orderPath = '/v1/orders';
32
static const quotePath = '/v1/quotes';
33
static const permissionPath = '/v1/permissions';
35
- static const apiHeaderKey = 'x-sideshift-secret';
34
35
@override
36
ExchangeProviderDescription get description =>
@@ -96,7 +94,7 @@ class SideShiftExchangeProvider extends ExchangeProvider {
94
final _request = request as SideShiftRequest;
95
final quoteId = await _createQuote(_request);
96
final url = apiBaseUrl + orderPath;
99
- final headers = {apiHeaderKey: apiKey, 'Content-Type': 'application/json'};
97
+ final headers = {'Content-Type': 'application/json'};
98
final body = {
99
'type': 'fixed',
100
'quoteId': quoteId,
@@ -137,7 +135,7 @@ class SideShiftExchangeProvider extends ExchangeProvider {
135
136
Future<String> _createQuote(SideShiftRequest request) async {
137
final url = apiBaseUrl + quotePath;
140
- final headers = {apiHeaderKey: apiKey, 'Content-Type': 'application/json'};
138
+ final headers = {'Content-Type': 'application/json'};
139
final depositMethod = normalizeCryptoCurrency(request.depositMethod);
140
final settleMethod = normalizeCryptoCurrency(request.settleMethod);
141
final body = {