Skip to content

Commit

Permalink
Ask for password while reseller flow.
Browse files Browse the repository at this point in the history
  • Loading branch information
jigar-f committed Jun 24, 2024
1 parent f71e14f commit cb7ac5d
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 23 deletions.
23 changes: 2 additions & 21 deletions lib/account/account_management.dart
Original file line number Diff line number Diff line change
Expand Up @@ -310,30 +310,10 @@ class _AccountManagementState extends State<AccountManagement>
icon: ImagePaths.email,
content: emailAddress,
trailingArray: [
// sessionModel.hasAccountVerified.value == true
// ? Padding(
// padding: const EdgeInsetsDirectional.only(start: 16.0),
// child: TextButton(
// onPressed: () => openChangeEmail(emailAddress),
// child: CText(
// 'change_email'.i18n.toUpperCase(),
// style: tsButtonPink,
// ),
// ),
// )
// : Padding(
// padding: const EdgeInsetsDirectional.only(start: 16.0),
// child: TextButton(
// onPressed: () => openEmailVerification(emailAddress),
// child: CText(
// 'confirm'.i18n.toUpperCase(),
// style: tsButtonPink,
// ),
// ),
// )
],
);
}),
if(Platform.isIOS)
ListItemFactory.settingsItem(
header: 'password'.i18n,
icon: ImagePaths.lockFiled,
Expand All @@ -359,6 +339,7 @@ class _AccountManagementState extends State<AccountManagement>
}),
//Disable device linking in IOS
const UserDevices(),
if(Platform.isIOS)
ListItemFactory.settingsItem(
header: 'danger_zone'.i18n,
icon: ImagePaths.alert,
Expand Down
2 changes: 1 addition & 1 deletion lib/account/auth/create_account_password.dart
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ class CreateAccountPassword extends StatefulWidget {
const CreateAccountPassword({
super.key,
required this.email,
required this.code,
required this.code
});

@override
Expand Down
10 changes: 9 additions & 1 deletion lib/plans/reseller_checkout.dart
Original file line number Diff line number Diff line change
Expand Up @@ -127,18 +127,26 @@ class _ResellerCodeCheckoutState extends State<ResellerCodeCheckout> {

Future<void> onRegisterPro() async {
try {
FocusManager.instance.primaryFocus?.unfocus();
context.loaderOverlay.show();
Locale locale = Localizations.localeOf(context);
final format = NumberFormat.simpleCurrency(locale: locale.toString());
final currencyName = format.currencyName ?? "USD";

await sessionModel.redeemResellerCode(
widget.email,
currencyName,
Platform.operatingSystem,
resellerCodeController.text,
);
context.loaderOverlay.hide();
showSuccessDialog(context, widget.isPro, isReseller: true);
if (!widget.isPro) {
// it mean user is coming from signup flow
openPassword();
} else {
showSuccessDialog(context, widget.isPro,
isReseller: true, barrierDismissible: false);
}
} catch (error, stackTrace) {
print(stackTrace);
appLogger.e(error, stackTrace: stackTrace);
Expand Down

0 comments on commit cb7ac5d

Please sign in to comment.