Skip to content

Commit

Permalink
Fix/chuck (#1946)
Browse files Browse the repository at this point in the history
* update link to transaction block explorer

* move secret keys to .env file

* make .env file work

* add .env.example

* add .env fixes to pubspec
  • Loading branch information
chuck-h authored Apr 30, 2024
1 parent bc6e5b0 commit 3ca7893
Show file tree
Hide file tree
Showing 5 changed files with 15 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# rename this file to .env and fill in the secrets

PAYCPU_SEEDS_KEY=
ONBOARDING_SEEDS_KEY=

7 changes: 5 additions & 2 deletions lib/datasource/remote/api/eos_repo/eos_repository.dart
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import 'dart:async';
import 'package:async/async.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:seeds/crypto/eosdart/eosdart.dart';
import 'package:seeds/datasource/local/settings_storage.dart';
import 'package:seeds/datasource/remote/api/http_repo/seeds_scopes.dart';
import 'package:seeds/datasource/remote/firebase/firebase_remote_config.dart';

abstract class EosRepository {
String cpuPrivateKey = '5Hy2cvMbrusscGnusLWqYuXyM8fZ65G7DTzs4nDXyiV5wo77n9a';
String onboardingPrivateKey = '5JhM4vypLzLdDtHo67TR5RtmsYm2mr8F2ugqcrCzfrMPLvo8cQW';
late final String cpuPrivateKey = dotenv.env['PAYCPU_SEEDS_KEY'] ?? '';

late final String onboardingPrivateKey = dotenv.env['ONBOARDING_SEEDS_KEY'] ?? '';
;
String onboardingAccountName = 'join.seeds';
int guardianRecoveryTimeDelaySec = const Duration(hours: 24).inSeconds;

Expand Down
2 changes: 2 additions & 0 deletions lib/main.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import 'package:flutter/foundation.dart';
import 'package:flutter/material.dart';
import 'package:flutter/services.dart';
import 'package:flutter_bloc/flutter_bloc.dart';
import 'package:flutter_dotenv/flutter_dotenv.dart';
import 'package:hive_flutter/hive_flutter.dart';
import 'package:seeds/datasource/local/member_model_cache_item.dart';
import 'package:seeds/datasource/local/models/vote_model_adapter.dart';
Expand All @@ -20,6 +21,7 @@ Future<void> main() async {
// for details: https://docs.flutter.dev/testing/errors
await runZonedGuarded(() async {
WidgetsFlutterBinding.ensureInitialized();
await dotenv.load(fileName: '.env');
await Firebase.initializeApp();
await settingsStorage.initialise();
await PushNotificationService().initialise();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,7 @@ class TransactionDetailsBottomSheet extends StatelessWidget {
),
InkWell(
customBorder: const CircleBorder(),
onTap: () => Share.share('https://telos.bloks.io/transaction/${transaction.transactionId}'),
onTap: () => Share.share('https://explorer.telos.net/transaction/${transaction.transactionId}'),
child: Container(
padding: const EdgeInsets.all(16),
decoration: const BoxDecoration(color: AppColors.green1, shape: BoxShape.circle),
Expand Down
2 changes: 2 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@ dependencies:
geoflutterfire2: ^2.3.15
firebase_app_installations: ^0.2.3+4
package_info_plus: ^4.1.0
flutter_dotenv: ^5.1.0

dev_dependencies:
flutter_test:
Expand Down Expand Up @@ -193,6 +194,7 @@ flutter:
- assets/animations/send_animation.json
- assets/images/google/powered_by_google_on_white.png
- assets/images/google/powered_by_google_on_non_white.png
- .env
# assets end

fonts:
Expand Down

0 comments on commit 3ca7893

Please sign in to comment.