Add fiatApiKey (#858)

This commit is contained in:
Justin Ehrenhofer 2023-03-31 13:22:51 -05:00 committed by GitHub
parent 9f1325ba0f
commit 7cd4e6583c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1 deletions

View file

@ -114,6 +114,7 @@ jobs:
echo "const trocadorApiKey = '${{ secrets.TROCADOR_API_KEY }}';" >> lib/.secrets.g.dart
echo "const trocadorExchangeMarkup = '${{ secrets.TROCADOR_EXCHANGE_MARKUP }}';" >> lib/.secrets.g.dart
echo "const anonPayReferralCode = '${{ secrets.ANON_PAY_REFERRAL_CODE }}';" >> lib/.secrets.g.dart
echo "const fiatApiKey = '${{ secrets.FIAT_API_KEY }}';" >> lib/.secrets.g.dart
- name: Rename app
run: echo -e "id=com.cakewallet.test\nname=$GITHUB_HEAD_REF" > /opt/android/cake_wallet/android/app.properties

View file

@ -3,6 +3,8 @@ import 'package:cake_wallet/entities/fiat_currency.dart';
import 'dart:convert';
import 'package:flutter/foundation.dart';
import 'package:http/http.dart';
import 'package:cake_wallet/.secrets.g.dart' as secrets;
const _fiatApiClearNetAuthority = 'fiat-api.cakewallet.com';
const _fiatApiOnionAuthority = 'n4z7bdcmwk2oyddxvzaap3x2peqcplh3pzdy7tpkk5ejz5n4mhfvoxqd.onion';
@ -17,6 +19,7 @@ Future<double> _fetchPrice(Map<String, dynamic> args) async {
'interval_count': '1',
'base': crypto.toString(),
'quote': fiat.toString(),
'key' : secrets.fiatApiKey,
};
double price = 0.0;

View file

@ -27,7 +27,9 @@ class SecretKey {
SecretKey('trocadorApiKey', () => ''),
SecretKey('trocadorExchangeMarkup', () => ''),
SecretKey('twitterBearerToken', () => ''),
SecretKey('anonPayReferralCode', () => '')
SecretKey('anonPayReferralCode', () => ''),
SecretKey('fiatApiKey', () => '')
];
final String name;