Merge branch 'beta' of gitlab.com:peter-iakovlev/telegram-ios into beta

This commit is contained in:
Ilya Laktyushin 2023-02-19 00:04:50 +04:00
commit 4dc2d8372d
3 changed files with 8 additions and 6 deletions

View File

@ -68,6 +68,7 @@
@[@"492960", @"492960", @13, @(STPCardBrandVisa)],
@[@"8600", @"8600", @16, @(STPCardBrandOther)],
@[@"9860", @"9860", @16, @(STPCardBrandOther)],
@[@"2", @"2", @16, @(STPCardBrandUnknown)],
];
NSMutableArray *binRanges = [NSMutableArray array];
for (NSArray *range in ranges) {

View File

@ -153,13 +153,14 @@ static NSString * _Nonnull stringByRemovingCharactersFromSet(NSString * _Nonnull
return STPCardValidationStateIncomplete;
}
BOOL isValidLuhn = [self stringIsValidLuhn:sanitizedNumber];
return isValidLuhn ? STPCardValidationStateValid : STPCardValidationStateInvalid;
//BOOL isValidLuhn = [self stringIsValidLuhn:sanitizedNumber];
//return isValidLuhn ? STPCardValidationStateValid : STPCardValidationStateInvalid;
/*STPBINRange *binRange = [STPBINRange mostSpecificBINRangeForNumber:sanitizedNumber];
STPBINRange *binRange = [STPBINRange mostSpecificBINRangeForNumber:sanitizedNumber];
if (binRange.brand == STPCardBrandUnknown && validatingCardBrand) {
return STPCardValidationStateInvalid;
//return STPCardValidationStateInvalid;
}
if (sanitizedNumber.length == binRange.length) {
BOOL isValidLuhn = [self stringIsValidLuhn:sanitizedNumber];
return isValidLuhn ? STPCardValidationStateValid : STPCardValidationStateInvalid;
@ -167,7 +168,7 @@ static NSString * _Nonnull stringByRemovingCharactersFromSet(NSString * _Nonnull
return STPCardValidationStateInvalid;
} else {
return STPCardValidationStateIncomplete;
}*/
}
}
+ (STPCardValidationState)validationStateForCard:(nonnull STPCardParams *)card inCurrentYear:(NSInteger)currentYear currentMonth:(NSInteger)currentMonth {

View File

@ -1,5 +1,5 @@
{
"app": "9.4.2",
"app": "9.4.3",
"bazel": "5.3.1",
"xcode": "14.2"
}