Skip to content

Commit

Permalink
Merge pull request #614 from threefoldtech/development_cleanup_kyc
Browse files Browse the repository at this point in the history
Enable KYC based on the consumption on tfchain
  • Loading branch information
AhmedHanafy725 authored Sep 11, 2024
2 parents 7083b2b + 427d5b8 commit d4ad0c9
Show file tree
Hide file tree
Showing 19 changed files with 1,104 additions and 241 deletions.
8 changes: 7 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -347,4 +347,10 @@ backend/services/__pycache__/productkeys.cpython-39.pyc
backend/services/__pycache__/socket.cpython-39.pyc

*.pyc
.vscode
.vscode

# reflected files
app/lib/main.reflectable.dart

# pubSpec override
app/pubspec_overrides.yaml
3 changes: 3 additions & 0 deletions app/lib/app_config.dart
Original file line number Diff line number Diff line change
Expand Up @@ -215,4 +215,7 @@ void setFallbackConfigs() {
Globals().redoIdentityVerification = false;
Globals().timeOutSeconds = 10;
Globals().phoneVerification = false;
Globals().chainUrl = '';
Globals().gridproxyUrl = '';
Globals().spendingLimit = 0;
}
4 changes: 3 additions & 1 deletion app/lib/helpers/download_helper.dart
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,9 @@ import 'package:path_provider/path_provider.dart';

// https://www.youtube.com/watch?v=6tfBflFUO7s
Future openFile(File? file) async {
OpenFilex.open(file?.path);
if (file != null && file.path.isNotEmpty) {
OpenFilex.open(file.path);
}
}

Future<File?> downloadFile(String url, String name) async {
Expand Down
6 changes: 6 additions & 0 deletions app/lib/helpers/flags.dart
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,12 @@ class Flags {
await Flags().hasFlagValueByFeatureName('redo-identity-verification');
Globals().phoneVerification =
await Flags().hasFlagValueByFeatureName('phone-verification');
Globals().chainUrl =
(await Flags().getFlagValueByFeatureName('chain-url'))!;
Globals().gridproxyUrl =
(await Flags().getFlagValueByFeatureName('gridproxy-url'))!;
Globals().spendingLimit = int.parse(
(await Flags().getFlagValueByFeatureName('spending-limit')).toString());
}

Future<bool> hasFlagValueByFeatureName(String name) async {
Expand Down
3 changes: 3 additions & 0 deletions app/lib/helpers/globals.dart
Original file line number Diff line number Diff line change
Expand Up @@ -54,12 +54,15 @@ class Globals {
String tosUrl = '';
bool maintenance = false;
bool phoneVerification = false;
String chainUrl = '';
String gridproxyUrl = '';

bool isCacheClearedWallet = false;
bool isCacheClearedFarmer = false;

int smsSentOn = 0;
int smsMinutesCoolDown = 5;
int spendingLimit = 0;

ValueNotifier<bool> hidePhoneButton = ValueNotifier(false);

Expand Down
3 changes: 2 additions & 1 deletion app/lib/helpers/kyc_helpers.dart
Original file line number Diff line number Diff line change
Expand Up @@ -69,7 +69,8 @@ Future<void> handleKYCData(Map<dynamic, dynamic> emailData,
jsonDecode(identityData['identityDocumentMeta']),
identityData['signedIdentityDocumentMetaIdentifier'],
identityData['identityGender'],
identityData['signedIdentityGenderIdentifier']);
identityData['signedIdentityGenderIdentifier'],
identityData['referenceId']);
}
}

Expand Down
Loading

0 comments on commit d4ad0c9

Please sign in to comment.