fixes
This commit is contained in:
1
.dart_tool/version
Normal file
1
.dart_tool/version
Normal file
@@ -0,0 +1 @@
|
||||
3.35.7
|
||||
1
.flutter-plugins-dependencies
Normal file
1
.flutter-plugins-dependencies
Normal file
@@ -0,0 +1 @@
|
||||
{"info":"This is a generated file; do not edit or check into version control.","plugins":{"ios":[{"name":"flutter_secure_storage","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.3/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"android":[{"name":"flutter_secure_storage","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage-9.2.4/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_android","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_android-2.2.20/","native_build":true,"dependencies":[],"dev_dependency":false}],"macos":[{"name":"flutter_secure_storage_macos","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage_macos-3.1.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_foundation","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_foundation-2.4.3/","shared_darwin_source":true,"native_build":true,"dependencies":[],"dev_dependency":false}],"linux":[{"name":"flutter_secure_storage_linux","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage_linux-1.2.3/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_linux","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_linux-2.2.1/","native_build":false,"dependencies":[],"dev_dependency":false}],"windows":[{"name":"flutter_secure_storage_windows","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage_windows-3.1.2/","native_build":true,"dependencies":[],"dev_dependency":false},{"name":"path_provider_windows","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/path_provider_windows-2.3.0/","native_build":false,"dependencies":[],"dev_dependency":false}],"web":[{"name":"flutter_secure_storage_web","path":"/Users/juliandalcalaf/.pub-cache/hosted/pub.dev/flutter_secure_storage_web-1.2.1/","dependencies":[],"dev_dependency":false}]},"dependencyGraph":[{"name":"flutter_secure_storage","dependencies":["flutter_secure_storage_linux","flutter_secure_storage_macos","flutter_secure_storage_web","flutter_secure_storage_windows"]},{"name":"flutter_secure_storage_linux","dependencies":[]},{"name":"flutter_secure_storage_macos","dependencies":[]},{"name":"flutter_secure_storage_web","dependencies":[]},{"name":"flutter_secure_storage_windows","dependencies":["path_provider"]},{"name":"path_provider","dependencies":["path_provider_android","path_provider_foundation","path_provider_linux","path_provider_windows"]},{"name":"path_provider_android","dependencies":[]},{"name":"path_provider_foundation","dependencies":[]},{"name":"path_provider_linux","dependencies":[]},{"name":"path_provider_windows","dependencies":[]}],"date_created":"2026-02-27 12:35:56.235180","version":"3.35.7","swift_package_manager_enabled":{"ios":false,"macos":false}}
|
||||
@@ -356,6 +356,17 @@
|
||||
"meta"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "lottie",
|
||||
"version": "3.3.2",
|
||||
"dependencies": [
|
||||
"archive",
|
||||
"flutter",
|
||||
"http",
|
||||
"path",
|
||||
"vector_math"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "top_snackbar_flutter",
|
||||
"version": "3.3.0",
|
||||
@@ -967,6 +978,14 @@
|
||||
"typed_data"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "archive",
|
||||
"version": "4.0.9",
|
||||
"dependencies": [
|
||||
"path",
|
||||
"posix"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "diacritic",
|
||||
"version": "0.1.6",
|
||||
@@ -1185,6 +1204,15 @@
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "posix",
|
||||
"version": "6.5.0",
|
||||
"dependencies": [
|
||||
"ffi",
|
||||
"meta",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "fixnum",
|
||||
"version": "1.1.1",
|
||||
@@ -1307,34 +1335,6 @@
|
||||
"args",
|
||||
"yaml"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "lottie",
|
||||
"version": "3.3.2",
|
||||
"dependencies": [
|
||||
"archive",
|
||||
"flutter",
|
||||
"http",
|
||||
"path",
|
||||
"vector_math"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "archive",
|
||||
"version": "4.0.9",
|
||||
"dependencies": [
|
||||
"path",
|
||||
"posix"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "posix",
|
||||
"version": "6.5.0",
|
||||
"dependencies": [
|
||||
"ffi",
|
||||
"meta",
|
||||
"path"
|
||||
]
|
||||
}
|
||||
],
|
||||
"configVersion": 1
|
||||
|
||||
@@ -1,4 +1,3 @@
|
||||
import 'package:design_system/design_system.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:sf_localizations/sf_localizations.dart';
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'package:auth/src/features/sign_up/presentation/sign_up_steps.dart';
|
||||
import 'package:auth/src/features/sign_up/presentation/state/sign_up_view_model.dart';
|
||||
import 'package:auth/src/features/sign_up/presentation/screens/account_created_screen.dart';
|
||||
import 'package:auth/src/features/sign_up/presentation/screens/secret_code_screen.dart';
|
||||
import 'package:auth/src/widgets/layouts/sign_up_layout.dart';
|
||||
import 'package:design_system/design_system.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -3,13 +3,8 @@ import 'dart:async';
|
||||
import 'package:auth/src/features/sign_up/domain/entities/address_entity.dart';
|
||||
import 'package:auth/src/features/sign_up/domain/entities/sign_up_request_entity.dart';
|
||||
import 'package:auth/src/features/sign_up/domain/entities/sign_up_response_entity.dart';
|
||||
import 'package:auth/src/features/sign_up/domain/entities/two_fa_secret_entity.dart';
|
||||
import 'package:auth/src/features/sign_up/domain/generate_two_fa_sign_up_use_case.dart';
|
||||
import 'package:auth/src/features/sign_up/domain/sign_up_use_case.dart';
|
||||
import 'package:auth/src/features/sign_up/domain/verify_two_fa_code_sign_up_use_case.dart';
|
||||
import 'package:auth/src/features/sign_up/presentation/providers/generate_two_fa_sign_up_provider.dart';
|
||||
import 'package:auth/src/features/sign_up/presentation/providers/sign_up_provider.dart';
|
||||
import 'package:auth/src/features/sign_up/presentation/providers/verify_two_fa_code_sign_up_provider.dart';
|
||||
import 'package:auth/src/features/sign_up/presentation/state/address_view_state.dart';
|
||||
import 'package:auth/src/features/sign_up/presentation/state/sign_up_view_state.dart';
|
||||
import 'package:flutter/material.dart';
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
import 'package:flutter/foundation.dart';
|
||||
import 'package:flutter_riverpod/flutter_riverpod.dart';
|
||||
import 'package:sf_shared/sf_shared.dart';
|
||||
import 'package:activity/activity.dart';
|
||||
import 'home_view_state.dart';
|
||||
|
||||
final homeViewModelProvider =
|
||||
|
||||
@@ -1,6 +1,4 @@
|
||||
import 'package:flutter/services.dart';
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter_treezor_entrust_sdk_bridge/flutter_treezor_entrust_sdk_bridge_method_channel.dart';
|
||||
|
||||
void main() {
|
||||
TestWidgetsFlutterBinding.ensureInitialized();
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
import 'package:flutter_test/flutter_test.dart';
|
||||
import 'package:flutter_treezor_entrust_sdk_bridge/flutter_treezor_entrust_sdk_bridge.dart';
|
||||
import 'package:flutter_treezor_entrust_sdk_bridge/flutter_treezor_entrust_sdk_bridge_platform_interface.dart';
|
||||
import 'package:flutter_treezor_entrust_sdk_bridge/flutter_treezor_entrust_sdk_bridge_method_channel.dart';
|
||||
import 'package:plugin_platform_interface/plugin_platform_interface.dart';
|
||||
|
||||
@@ -349,6 +349,17 @@
|
||||
"dio"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "lottie",
|
||||
"version": "3.3.2",
|
||||
"dependencies": [
|
||||
"archive",
|
||||
"flutter",
|
||||
"http",
|
||||
"path",
|
||||
"vector_math"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "top_snackbar_flutter",
|
||||
"version": "3.3.0",
|
||||
@@ -1034,6 +1045,24 @@
|
||||
"typed_data"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "http",
|
||||
"version": "1.6.0",
|
||||
"dependencies": [
|
||||
"async",
|
||||
"http_parser",
|
||||
"meta",
|
||||
"web"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "archive",
|
||||
"version": "4.0.9",
|
||||
"dependencies": [
|
||||
"path",
|
||||
"posix"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "diacritic",
|
||||
"version": "0.1.6",
|
||||
@@ -1300,6 +1329,15 @@
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "posix",
|
||||
"version": "6.5.0",
|
||||
"dependencies": [
|
||||
"ffi",
|
||||
"meta",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "uuid",
|
||||
"version": "4.5.2",
|
||||
@@ -1436,44 +1474,6 @@
|
||||
"args",
|
||||
"yaml"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "lottie",
|
||||
"version": "3.3.2",
|
||||
"dependencies": [
|
||||
"archive",
|
||||
"flutter",
|
||||
"http",
|
||||
"path",
|
||||
"vector_math"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "archive",
|
||||
"version": "4.0.9",
|
||||
"dependencies": [
|
||||
"path",
|
||||
"posix"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "posix",
|
||||
"version": "6.5.0",
|
||||
"dependencies": [
|
||||
"ffi",
|
||||
"meta",
|
||||
"path"
|
||||
]
|
||||
},
|
||||
{
|
||||
"name": "http",
|
||||
"version": "1.6.0",
|
||||
"dependencies": [
|
||||
"async",
|
||||
"http_parser",
|
||||
"meta",
|
||||
"web"
|
||||
]
|
||||
}
|
||||
],
|
||||
"configVersion": 1
|
||||
|
||||
@@ -35,13 +35,32 @@ class ParentWalletBalanceNotifier extends Notifier<WalletBalanceEntity?> {
|
||||
void applyOptimisticPayin(double amount) {
|
||||
final balance = state;
|
||||
if (balance == null) return;
|
||||
final optimisticTotal = balance.totalBalance + amount;
|
||||
state = balance.copyWith(
|
||||
availableBalance: balance.availableBalance + amount,
|
||||
totalBalance: balance.totalBalance + amount,
|
||||
totalBalance: optimisticTotal,
|
||||
);
|
||||
_refreshTimer?.cancel();
|
||||
_refreshTimer = Timer(const Duration(seconds: 3), () {
|
||||
refresh();
|
||||
_refreshWithRetry(optimisticTotal);
|
||||
}
|
||||
|
||||
void _refreshWithRetry(double expectedTotal, [int attempt = 0]) {
|
||||
const delays = [5, 10, 20];
|
||||
if (attempt >= delays.length) return;
|
||||
_refreshTimer = Timer(Duration(seconds: delays[attempt]), () async {
|
||||
final walletId = _walletId;
|
||||
if (walletId == null || walletId.isEmpty) return;
|
||||
try {
|
||||
final repo = ref.read(treezorRepositoryProvider);
|
||||
final fresh = await repo.getWalletBalance(walletId: walletId);
|
||||
if (fresh.totalBalance >= expectedTotal) {
|
||||
state = fresh;
|
||||
} else {
|
||||
_refreshWithRetry(expectedTotal, attempt + 1);
|
||||
}
|
||||
} catch (_) {
|
||||
_refreshWithRetry(expectedTotal, attempt + 1);
|
||||
}
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user