Skip to content

Commit

Permalink
Merge commit '800a87630701cd782df3029dd557473eaf1b17f7' into status-b…
Browse files Browse the repository at this point in the history
…uttons
  • Loading branch information
justinenerio committed Dec 17, 2024
2 parents 67f6ebf + 800a876 commit 79b2d93
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 15 deletions.
Original file line number Diff line number Diff line change
@@ -1,11 +1,6 @@
import 'package:kyc_client_dart/kyc_client_dart.dart';

enum DocumentType {
bvn('BVN', 'BVN'),
nin('NIN', 'NIN'),
ninV2('NIN V2', 'NIN_V2'),
ninSlip('NIN SLIP', 'NIN_SLIP'),
driversLicense('Driver\'s License', 'DRIVERS_LICENSE'),
voterId('Voter ID', 'VOTER_ID');

const DocumentType(this.name, this.value);
Expand All @@ -16,19 +11,12 @@ enum DocumentType {

extension DocumentTypeExtension on DocumentType {
IdType toIdType() => switch (this) {
DocumentType.bvn ||
DocumentType.nin ||
DocumentType.ninV2 ||
DocumentType.ninSlip =>
IdType.other,
DocumentType.driversLicense => IdType.driverLicense,
DocumentType.voterId => IdType.voterId,
};
}

extension IdTypeExtension on IdType {
DocumentType? toDocumentType() => switch (this) {
IdType.driverLicense => DocumentType.driversLicense,
IdType.voterId => DocumentType.voterId,
// ignore: avoid-wildcard-cases-with-enums, check if needed
_ => null,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,9 @@ const _guardarianCountries = {
};

const _coinflowCountries = {
'AD', 'AT', 'BE', 'BG', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', 'DE', //
'GR', 'HU', 'IS', 'IE', 'IT', 'LV', 'LI', 'LT', 'LU', 'MT', 'MC', 'NL', 'NO',
'PL', 'PT', 'RO', 'SM', 'SK', 'SI', 'ES', 'SE', 'CH', 'US',
'AD', 'AT', 'BE', 'BR', 'BG', 'HR', 'CY', 'CZ', 'DK', 'EE', 'FI', 'FR', //
'DE', 'GR', 'HU', 'IS', 'IE', 'IT', 'LV', 'LI', 'LT', 'LU', 'MT', 'MC',
'NL', 'NO', 'PL', 'PT', 'RO', 'SM', 'SK', 'SI', 'ES', 'SE', 'CH', 'US',
};

const _scalexCountries = {'NG'};
Expand Down

0 comments on commit 79b2d93

Please sign in to comment.