Rewired login confirmation
Some checks failed
ci/woodpecker/push/billing_fees Pipeline was successful
ci/woodpecker/push/bff Pipeline was successful
ci/woodpecker/push/db Pipeline was successful
ci/woodpecker/push/chain_gateway Pipeline was successful
ci/woodpecker/push/fx_ingestor Pipeline was successful
ci/woodpecker/push/fx_oracle Pipeline was successful
ci/woodpecker/push/frontend Pipeline was successful
ci/woodpecker/push/nats Pipeline was successful
ci/woodpecker/push/ledger Pipeline was successful
ci/woodpecker/push/notification Pipeline was successful
ci/woodpecker/push/payments_orchestrator Pipeline was successful
ci/woodpecker/push/bump_version Pipeline failed

This commit is contained in:
Stephan D
2025-11-25 00:46:11 +01:00
parent fc0600d6c4
commit 26a1e284b2
12 changed files with 159 additions and 54 deletions

View File

@@ -15,6 +15,7 @@ import 'package:pshared/provider/locale.dart';
import 'package:pshared/provider/resource.dart';
import 'package:pshared/service/account.dart';
import 'package:pshared/service/authorization/service.dart';
import 'package:pshared/service/verification.dart';
import 'package:pshared/utils/exception.dart';
@@ -77,7 +78,12 @@ class AccountProvider extends ChangeNotifier {
_setResource(Resource(data: outcome.account, isLoading: false));
_pickupLocale(outcome.account!.locale);
} else {
_pendingLogin = outcome.pending;
final pending = outcome.pending;
if (pending == null) {
throw Exception('Pending login data is missing');
}
await VerificationService.requestLoginCode(pending);
_pendingLogin = pending;
_setResource(_resource.copyWith(isLoading: false));
}
return outcome;