add trocador key to secrets

This commit is contained in:
Godwin Asuquo 2023-02-06 22:20:46 +02:00
parent 70238c1308
commit a517993961
3 changed files with 6 additions and 2 deletions

View file

@ -111,6 +111,8 @@ jobs:
echo "const anypayToken = '${{ secrets.ANY_PAY_TOKEN }}';" >> lib/.secrets.g.dart
echo "const ioniaClientId = '${{ secrets.IONIA_CLIENT_ID }}';" >> lib/.secrets.g.dart
echo "const twitterBearerToken = '${{ secrets.TWITTER_BEARER_TOKEN }}';" >> lib/.secrets.g.dart
echo "const trocadorApiKey = '${{ secrets.TROCADOR_API_KEY }}';" >> lib/.secrets.g.dart
echo "const trocadorExchangeMarkup = '${{ secrets.TROCADOR_EXCHANGE_MARKUP }}';" >> lib/.secrets.g.dart
- name: Rename app
run: sed -i -e "s/\${APP_NAME}/$GITHUB_HEAD_REF/g" /opt/android/cake_wallet/android/app/src/main/AndroidManifest.xml

View file

@ -43,6 +43,7 @@ class TrocadorExchangeProvider extends ExchangeProvider {
static const onionApiAuthority = 'trocadorfyhlu27aefre5u7zri66gudtzdyelymftvr4yjwcxhfaqsid.onion';
static const clearNetAuthority = 'trocador.app';
static const apiKey = secrets.trocadorApiKey;
static const markup = secrets.trocadorExchangeMarkup;
static const newRatePath = '/api/new_rate';
static const createTradePath = 'api/new_trade';
static const tradePath = 'api/trade';
@ -69,7 +70,7 @@ class TrocadorExchangeProvider extends ExchangeProvider {
'network_to': _networkFor(request.to),
'payment': isFixedRateMode ? 'True' : 'False',
'min_kycrating': 'C',
'markup': '3',
'markup': markup,
'best_only': 'True',
if (!isFixedRateMode) 'amount_from': request.fromAmount,
if (isFixedRateMode) 'amount_to': request.toAmount,
@ -164,7 +165,7 @@ class TrocadorExchangeProvider extends ExchangeProvider {
if (isFixedRateMode) 'amount_to': amount.toString(),
'payment': isFixedRateMode ? 'True' : 'False',
'min_kycrating': 'C',
'markup': '3',
'markup': markup,
'best_only': 'True',
};

View file

@ -25,6 +25,7 @@ class SecretKey {
SecretKey('onramperApiKey', () => ''),
SecretKey('ioniaClientId', () => ''),
SecretKey('trocadorApiKey', () => ''),
SecretKey('trocadorExchangeMarkup', () => '3'),
SecretKey('twitterBearerToken', () => ''),
];