mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-23 03:59:23 +00:00
Merge pull request #464 from cake-tech/fix/remove-using-api-key-sideshift
Remove using of api key for sideshift.
This commit is contained in:
commit
dc8729311f
1 changed files with 2 additions and 4 deletions
|
@ -25,14 +25,12 @@ class SideShiftExchangeProvider extends ExchangeProvider {
|
||||||
.expand((i) => i)
|
.expand((i) => i)
|
||||||
.toList());
|
.toList());
|
||||||
|
|
||||||
static const apiKey = secrets.sideShiftApiKey;
|
|
||||||
static const affiliateId = secrets.sideShiftAffiliateId;
|
static const affiliateId = secrets.sideShiftAffiliateId;
|
||||||
static const apiBaseUrl = 'https://sideshift.ai/api';
|
static const apiBaseUrl = 'https://sideshift.ai/api';
|
||||||
static const rangePath = '/v1/pairs';
|
static const rangePath = '/v1/pairs';
|
||||||
static const orderPath = '/v1/orders';
|
static const orderPath = '/v1/orders';
|
||||||
static const quotePath = '/v1/quotes';
|
static const quotePath = '/v1/quotes';
|
||||||
static const permissionPath = '/v1/permissions';
|
static const permissionPath = '/v1/permissions';
|
||||||
static const apiHeaderKey = 'x-sideshift-secret';
|
|
||||||
|
|
||||||
@override
|
@override
|
||||||
ExchangeProviderDescription get description =>
|
ExchangeProviderDescription get description =>
|
||||||
|
@ -96,7 +94,7 @@ class SideShiftExchangeProvider extends ExchangeProvider {
|
||||||
final _request = request as SideShiftRequest;
|
final _request = request as SideShiftRequest;
|
||||||
final quoteId = await _createQuote(_request);
|
final quoteId = await _createQuote(_request);
|
||||||
final url = apiBaseUrl + orderPath;
|
final url = apiBaseUrl + orderPath;
|
||||||
final headers = {apiHeaderKey: apiKey, 'Content-Type': 'application/json'};
|
final headers = {'Content-Type': 'application/json'};
|
||||||
final body = {
|
final body = {
|
||||||
'type': 'fixed',
|
'type': 'fixed',
|
||||||
'quoteId': quoteId,
|
'quoteId': quoteId,
|
||||||
|
@ -137,7 +135,7 @@ class SideShiftExchangeProvider extends ExchangeProvider {
|
||||||
|
|
||||||
Future<String> _createQuote(SideShiftRequest request) async {
|
Future<String> _createQuote(SideShiftRequest request) async {
|
||||||
final url = apiBaseUrl + quotePath;
|
final url = apiBaseUrl + quotePath;
|
||||||
final headers = {apiHeaderKey: apiKey, 'Content-Type': 'application/json'};
|
final headers = {'Content-Type': 'application/json'};
|
||||||
final depositMethod = normalizeCryptoCurrency(request.depositMethod);
|
final depositMethod = normalizeCryptoCurrency(request.depositMethod);
|
||||||
final settleMethod = normalizeCryptoCurrency(request.settleMethod);
|
final settleMethod = normalizeCryptoCurrency(request.settleMethod);
|
||||||
final body = {
|
final body = {
|
||||||
|
|
Loading…
Reference in a new issue