Submit customer identity proofs and show reviewed limits
This commit is contained in:
1 parent
7bf8b8087a
commit
1354551ae8
50 files changed
+1777
-67
No files matched your search
@@ -8,6 +8,8 @@ import 'package:sxchnge_analytics/sxchnge_analytics.dart';
|
||||
|
||||
import 'package:sxchnge_auth/sxchnge_auth.dart';
|
||||
|
||||
import 'package:sxchnge_kyc/sxchnge_kyc.dart';
|
||||
|
||||
import '../routing/routes.dart';
|
||||
import '../security/challenge.dart';
|
||||
import 'feedback.dart';
|
||||
@@ -127,7 +129,16 @@ class _AuthFormState extends State<AuthForm> {
|
||||
}
|
||||
await login.complete(challenge, grant);
|
||||
if (mounted && login.state.status == AuthStatus.success) {
|
||||
context.go('/accounts');
|
||||
final accepted = login.state.result!;
|
||||
final offer = await context.read<IdentityOnboardingProvider>().offer(
|
||||
accepted.userId,
|
||||
);
|
||||
if (mounted &&
|
||||
!_signUp &&
|
||||
identical(login.state.result, accepted) &&
|
||||
login.state.status == AuthStatus.success) {
|
||||
context.go(offer ? '/identity?onboarding=1' : '/accounts');
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -299,7 +310,9 @@ class _AuthFormState extends State<AuthForm> {
|
||||
const SizedBox(height: 28),
|
||||
FilledButton(
|
||||
key: const ValueKey('submit'),
|
||||
onPressed: state.isLoading ? null : _submit,
|
||||
onPressed: state.isLoading || state.status == AuthStatus.success
|
||||
? null
|
||||
: _submit,
|
||||
child: Padding(
|
||||
padding: const EdgeInsets.symmetric(vertical: 4),
|
||||
child: Row(
|
||||
|
||||
Reference in new issue
Block a user