verification before payment and email fixes
This commit is contained in:
@@ -23,6 +23,7 @@ class TwoFactorCodePage extends StatelessWidget {
|
||||
Widget build(BuildContext context) {
|
||||
return Consumer<TwoFactorProvider>(
|
||||
builder: (context, provider, child) {
|
||||
final email = provider.pendingLogin?.target ?? '';
|
||||
if (provider.verificationSuccess) {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
onVerificationSuccess();
|
||||
@@ -36,7 +37,7 @@ class TwoFactorCodePage extends StatelessWidget {
|
||||
child: Column(
|
||||
crossAxisAlignment: CrossAxisAlignment.center,
|
||||
children: [
|
||||
const TwoFactorPromptText(),
|
||||
TwoFactorPromptText(email: email),
|
||||
const SizedBox(height: 32),
|
||||
TwoFactorCodeInput(
|
||||
onCompleted: (code) => provider.submitCode(code),
|
||||
@@ -45,7 +46,12 @@ class TwoFactorCodePage extends StatelessWidget {
|
||||
if (provider.isSubmitting)
|
||||
const Center(child: CircularProgressIndicator())
|
||||
else
|
||||
const ResendCodeButton(),
|
||||
ResendCodeButton(
|
||||
onPressed: provider.resendCode,
|
||||
isCooldownActive: provider.isCooldownActive,
|
||||
isResending: provider.isResending,
|
||||
cooldownRemainingSeconds: provider.cooldownRemainingSeconds,
|
||||
),
|
||||
if (provider.hasError) ...[
|
||||
const SizedBox(height: 12),
|
||||
ErrorMessage(error: AppLocalizations.of(context)!.twoFactorError),
|
||||
|
||||
Reference in New Issue
Block a user