improving VMC flow
This commit is contained in:
@@ -78,7 +78,7 @@ class _PollScreenState extends State<PollScreen> {
|
||||
body: ListenableBuilder(
|
||||
listenable: controller,
|
||||
builder: (context, child) {
|
||||
if (controller.model.status == 'SUCCESS') {
|
||||
if (controller.model.pollStatus == 'SUCCESS') {
|
||||
WidgetsBinding.instance.addPostFrameCallback((_) {
|
||||
context.go('/integration');
|
||||
});
|
||||
@@ -90,13 +90,17 @@ class _PollScreenState extends State<PollScreen> {
|
||||
subtitle:
|
||||
'We\'re checking with our gateway if your transaction was '
|
||||
'successful. This won\'t take long.',
|
||||
status: controller.model.status,
|
||||
status: controller.model.pollStatus,
|
||||
isLoading: controller.model.isLoading,
|
||||
errorMessage:
|
||||
controller.model.errorMessage ??
|
||||
'We failed to check your transaction status',
|
||||
pollAttempt: controller.model.pollAttempt,
|
||||
pollMaxAttempts: controller.model.pollMaxAttempts,
|
||||
onRetry: () {
|
||||
controller.model.isCancelled = false;
|
||||
controller.model.pollStatus = 'PENDING';
|
||||
controller.model.pollAttempt = 0;
|
||||
_startPolling();
|
||||
},
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user