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
@@ -16,7 +16,8 @@ import 'status.dart';
|
||||
import '../generated/i18n/app_localizations.dart';
|
||||
|
||||
class IdentityPage extends StatefulWidget {
|
||||
const IdentityPage({super.key});
|
||||
const IdentityPage({super.key, this.onboarding = false});
|
||||
final bool onboarding;
|
||||
@override
|
||||
State<IdentityPage> createState() => IdentityPageState();
|
||||
}
|
||||
@@ -98,6 +99,10 @@ class IdentityPageState extends State<IdentityPage> {
|
||||
if (!await allowExit() || !mounted) return;
|
||||
_identity.exit();
|
||||
if (account) {
|
||||
if (widget.onboarding) {
|
||||
context.go('/accounts');
|
||||
return;
|
||||
}
|
||||
if (context.canPop()) {
|
||||
context.pop();
|
||||
} else {
|
||||
@@ -166,7 +171,11 @@ class IdentityPageState extends State<IdentityPage> {
|
||||
key: _feedbackKey,
|
||||
liveRegion: true,
|
||||
child: Text(
|
||||
errorText(l, p.error!),
|
||||
errorText(
|
||||
l,
|
||||
p.error!,
|
||||
photo: p.photoError != null,
|
||||
),
|
||||
key: const ValueKey('kyc-error'),
|
||||
style: TextStyle(color: t.colorScheme.error),
|
||||
),
|
||||
@@ -178,6 +187,16 @@ class IdentityPageState extends State<IdentityPage> {
|
||||
l.kycStatusStale,
|
||||
style: TextStyle(color: t.colorScheme.error),
|
||||
),
|
||||
if (p.error == KycError.sessionExpired)
|
||||
TextButton(
|
||||
onPressed: () async {
|
||||
if (await allowExit() && mounted) {
|
||||
_identity.exit();
|
||||
if (context.mounted) context.go('/');
|
||||
}
|
||||
},
|
||||
child: Text(l.login),
|
||||
),
|
||||
Focus(
|
||||
includeSemantics: false,
|
||||
key: _contentKey,
|
||||
@@ -198,7 +217,7 @@ class IdentityPageState extends State<IdentityPage> {
|
||||
const LimitsPanel(),
|
||||
],
|
||||
const SizedBox(height: 16),
|
||||
if (p.editing)
|
||||
if (p.editing && !widget.onboarding)
|
||||
TextButton(
|
||||
onPressed: p.busy ? null : _leave,
|
||||
child: Text(l.kycSkip),
|
||||
@@ -207,7 +226,15 @@ class IdentityPageState extends State<IdentityPage> {
|
||||
onPressed: p.busy
|
||||
? null
|
||||
: () => _leave(account: true),
|
||||
child: Text(l.wLimits),
|
||||
child: Text(
|
||||
widget.onboarding
|
||||
? (p.record?.status ==
|
||||
IdentityStatus.unverified ||
|
||||
p.editing
|
||||
? l.kycSkip
|
||||
: l.kycContinue)
|
||||
: l.wLimits,
|
||||
),
|
||||
),
|
||||
],
|
||||
),
|
||||
|
||||
Reference in new issue
Block a user