mirror of
https://github.com/cake-tech/cake_wallet.git
synced 2024-12-22 11:39:22 +00:00
Add fiatApiKey
(#858)
This commit is contained in:
parent
9f1325ba0f
commit
7cd4e6583c
3 changed files with 7 additions and 1 deletions
1
.github/workflows/pr_test_build.yml
vendored
1
.github/workflows/pr_test_build.yml
vendored
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -27,7 +27,9 @@ class SecretKey {
|
|||
SecretKey('trocadorApiKey', () => ''),
|
||||
SecretKey('trocadorExchangeMarkup', () => ''),
|
||||
SecretKey('twitterBearerToken', () => ''),
|
||||
SecretKey('anonPayReferralCode', () => '')
|
||||
SecretKey('anonPayReferralCode', () => ''),
|
||||
SecretKey('fiatApiKey', () => '')
|
||||
|
||||
];
|
||||
|
||||
final String name;
|
||||
|
|
Loading…
Reference in a new issue